Converting the potentiometer resistance to voltage

Hi all,

I want to connect a variable resistance output of sensor to the SensorNode. But, sensor node only takes voltage input. So, I am after the resistance-to-voltage-converter.

I looked for a converter in the market but couldn’t find one that met my needs.

The requirement is: Sensor output resistance is between 0 to 20 K ohm and input voltage should be between 3-5 V.

Does anyone have any insights onto it?

2 Likes

Hi Preeti
Welcome.

Yes, Lots.

I am afraid it does not work like that. It is a little more complicated. There will be a voltage drop across a resistance when a current is passed through it BUT you need a voltage in the first place to force that current through the resistance.

Could use a water analogy.
Header tank providing water pressure = voltage source, battery etc. Voltage could be likened to pressure like EMF = ElectroMotive Force.
Pipe = wire to carry the water to do something = electrical current.
Tap = resistance. Turned fully on more water, less resistance more current. Turned partially on, less water, more resistance less current.

That is about as basic and simple as I can think of. There is a wealth of information on the subject and if you look through Cores Tutorials I feel sure there is something of educational use to you.

A sketch showing EXACTLY what you are attempting would be useful. As much information as possible.
Cheers Bob

4 Likes

Your potentiometer should have 3 pins ground, v-ref and value. Connect on pin to ground, the other to 5V. The lower the resistance the higher the voltage.

If you need the range to be 3v (potentiometer at maximum resistance, and 5v at minimum you’ll meed to put another resistor in series. For a 20k ohm potentiometer you’ll need a 30k ohm resistor in series, that divides the voltage so it’s 3v drop over the 30k and 2v drop over the 20k potentiometer.

Here’s a guide on how to set it up.

4 Likes

Hi Doug
Preetis variable resistance could very possibly be a thermistor of some sort. While your description of a potentiometer and the tutorial is valid as is the method of changing the voltage range all this could be a bit confusing for Him/Her (sex unknown) and I think more information is required before any massaging is done.

If the “sensor” and the “Node” are meant to go together it may only be a case of connecting them. With a bit of luck additional information, like EXACTLY what is the sensor and node will help.
Cheers Bob

3 Likes

Hi Robert,

Good point. Though the title is “Converting the potentiometer Resistance to voltage” so it seemed a ralatively safe assumption.

BTW. As an unrelated aside: singular “them” is usually better than “Him/Her” where you don’t know the gender. Singular “they” (and related words) have been in common use since at least 1375. For example: “My cousin is visting so I’m taking them sightseeing” - “Great, where are you taking them?” Would be a natural exchange where the second person doesnt know the gender of the cousin.

2 Likes

Hi Doug
Yes the title does not agree too well with the text so for the moment we can go with both.

My English lesson for the day. But “cousin” to me is singular while “them” implies plural. Great language this English aint it.
Cheers Bob

2 Likes

Thank you for your responses, @Doug27394 and @Robert93820 That was extremely beneficial to me, and now I have understood both concepts.

I am trying to connect the wind direction sensor to the SensorNode. The wind direction sensor is a potentiometer. The wind direction sensor is an ‘Analog sensor’.

This sensor works as potentiometer where a value of 0% impedance between wiper and ground equals 0 degrees (direction) and a value of 100% equals about 360 degrees (direction). Sensor output or potentiometer range is between 0 to 20 K ohm.

Please correct me, if I am wrong. I am after some circuit/ component/ converter for converting the potentiometer to voltage.

Because the Sensor Node only takes voltage input.

Does anyone have any insights what should be next step. Thank you

2 Likes

Hi Preeti,

Welcome :slight_smile:

I’d check out a tutorial on ohms law: Ohm's Law - Practical Examples for Makers - Tutorial Australia

As Bob outlined very elegantly there are relations between the voltage, current, and resistance (impedance).

Doug quoted a 30k resistor which will work perfectly as the bottom leg in a voltage divider: Voltage Divider Conversion Calculator | DigiKey

With the information that Doug and Bob provided getting it all put together is your next step!
Grab some resistors and assemble the circuit :smiley:

Liam

2 Likes

Hi Preet1
Now we know that the sensor is actually a variable resistor. That is all. Is it actually a potentiometer, that is does it have 3 connections. If we knew EXACTLY what flavour of anemometer it was you might stand a chance of getting the correct information.

What EXACTLY is the “SensorNode”, That term could mean anything, RPi, Arduino, part of your weather station or anything. Accurate information please.

That would still be very useful.
Cheers Bob

3 Likes

I’m asssuming that it’s no limited to 360 and you cna keep turning past that with the resistance dropping to 0 right after you hit 360.

Based on that and assuming the sensor node takes 5V input and has a “signal” pin that can take analog values from 3V to 5V (more detail would be helpful). The circuit would be something like this:
image

3 Likes

Hi Doug

Going by that the sensor seems to accept an analog voltage so on the information available to date your circuit is good.

Don’t know why it is so hard to get accurate information. I have stated before it is sometimes like pulling teeth. If these are off the shelf items surely it is not too hard to look at them and note any Make, model or type number.

Anyway I think I will park my magic wand for he evening and go watch some telly.
Cheers Bob

3 Likes

Thank you everyone for the responses. It has helped me to understand a lot.

I am trying to connect the anemometer-6410 (Davis Instruments) to (Sensor Node Digital matter). There are 2 signals that it puts out, wind direction and speed. The DIRECTION is resistance. I understand from the spec sheet that it has a potentiometer.

I am trying to connect it to the Sensor Node from Digital matter. It has 2 analog inputs and 2 digital inputs.

The anemometer-6410 comes with a RJ-11. I might need to cut the RJ-11 to wire it with the external resistor. From the below information, I was assuming I can cut the RJ-11 and still make it work.

Davis Anemometer.

I was originally looking for a resistor-to-voltage-converter, which is incorrect.

I am trying to utilise the devices I already have.

Alternatively, Would you please suggest, if using ADA1733, Anemometer Wind Speed Sensor can solve my issue?

1 Like

Hi Preeti
That is a little bit better although I was unable to get any meaningful info re the anemometer you linked except it was out of stock.

Where did that come from. It has caused a bit of confusion I think.

So the anemometer output IS a potentiometer of 20kΩ. That is now established and output is 0 to 20kΩ so to get a voltage output proportional to direction you firstly have to provide a voltage to the top of the pot.

The input to the SensorNode can be 0 to 30V or 0 to 5V. Use the 5V mode as you won’t have 30V anyway.

Use the circuit Doug posted a couple of reply back but leave out the 30kΩ resistor as you now need 0 to 5V.
I am assuming the connections you list are correct so…
Red = Ground
Yellow = pot supply, 5V
Green = direction signal, 0V to 5V

The wind speed I know nothing about. It is stated as a contact closure but that could mean relay contacts or NPN open collector. The same terminology is used for both.

As far as the SensorNode is concerned I know almost nothing about that. Someone else need to jump in here if you have any problems with it.
Cheers Bob

2 Likes

Looks like it’s easier than I thought. based on this: IoT Devices - Analogue Input : Digital Matter Support you can configure the output voltage for reading the analog sensor you connect the 3.3V to the Yellow wire of the Anemometer, ground to red, then the sensor to the green. It’ll detect a voltage ranging from 0 to 3.3V for the full compass, so if North is 0/3.3v then south will be 1.65V. East and West will be 2.475V and 0.825V or vice versa.

The wind speed looks to be pulses so you’d connect it to digital (black) and convert the pulses per second to speed (they give you the equation)

The configuration of the SensorNode is a whole other thing, but that’s probably a jod for the sensor node support

2 Likes

Hi Doug
Apparently the SensorNode input is 0 to 5V (as per the device linked) so the pot supply would be 5V not 3.3V although it may not matter only you would only be using two thirds of the ADC range. I don.t know how this is used at the end of the day so as I said it may not matter.
Cheers Bob

2 Likes

Thanks again for going through all the datasheet of the devices.

A confusion I have is, the output of the potentiometer or wind direction is always resistance, but the output signal is voltage from the RJ-11. how?

Is there already any circuit in the anemometer-6410, like mentioned in reply post and due to the presence of that circuit in the anemoeter-6410, it is measuring the voltage drop in potentiometer’s resistance side and finally we can get voltage as output from the RJ-11.

The output can be either current or voltage. If the output is current, I can’t connect it to sensor Node.

As can be seen in the diagram below, the potentiometer’s output is always the change in resistance value.

I have a doubt, if connecting the green wire to the sensorNode, it will get voltage.

1 Like

Hi Preeti
You need to do a bit of reading on resistors and potentiometers. We can’t do an electronics course on the run.
If you connect the “top” of the pot to a voltage and the “bottom” to Gnd or the other side of that voltage what you see on the “slider” connection is a proportion of that voltage dependant on the position of that slider. Thus you will be presenting a variable voltage on the green wire to the SensorNode device.

I have absolutely no idea what you mean by that. The only other resistor mentioned is the additional 30kΩ in Doug’s circuit and you have already been advised to ignore that. Just connect the way the last drawing you posted shows. "Vref will be 5V marked as “power”, yellow wire.
Cheers Bob

3 Likes

A confusion I have is, the output of the potentiometer or wind direction is always resistance, but the output signal is voltage from the RJ-11. how?

Is there already any circuit in the anemometer-6410, like mentioned in reply post and due to the presence of that circuit in the anemoeter-6410, it is measuring the voltage drop in potentiometer’s resistance side and finally we can get voltage as output from the RJ-11.

The output can be either current or voltage. If the output is current, I can’t connect it to sensor Node.

I have edited the previous reply as well to make it meaningful.

2 Likes

Hi Preeti,

It would be worth having a look into some electronics tutorials about how resistors and potentiometers work, this guide is a good start: How a Potentiometer Works? Basics, Symbol, Types

Yes, a potetntiometer is the part of the circuit that will adjust the voltage based on its angle.
If you connect pin 2 (Yellow) to 5V, pin 4 (Red) to GND and Pin 3 (Wind direction) to the 5V analog input you will have a sweeping voltage as the anemometer rotates.

The current, voltage resistance relationship is very very common in electronics, check out Michaels guide on Ohms law: Ohm's Law - Practical Examples for Makers - Tutorial Australia

@Robert93820 's analogy at the start of the topic explains it very well.

Liam

1 Like

Hi Preeti
Liam’s reply says it all

Why don’t you just try it and then you may have a better idea about what is happening. Get yourself a voltage source ( battery or similar) It doesn’t have to be 5V for this exercise. Then measure the voltage to ground on the green wire.

You do have a multimeter don’t you ??

This will save all this discussion. As I said we can’t do an electronics course on the run so you will have tom do some reading for yourself. Liam’s link would be a start.
Cheers Bob

2 Likes