# Going from a voltage to a resistance

Discussion in 'General Electronics Chat' started by oak, Dec 4, 2014.

1. ### oak Thread Starter New Member

May 6, 2013
4
0
I have a sender unit that outputs 0-5v. (0 for empty to 5v for full) I need to build a circuit or use some device that will convert this range to a 30-212ohm resistance. Is this possible? (Pots. do exactly the opposite)

2. ### WBahn Moderator

Mar 31, 2012
17,748
4,796
The devils are in the details -- most notably the details you haven't provided.

A FET can be viewed as a voltage-controlled resistance over a portion of its range of operation.

3. ### ISB123 Well-Known Member

May 21, 2014
1,239
527
Digital potentiometer.

4. ### cmartinez AAC Fanatic!

Jan 17, 2007
3,573
2,541
Yeap... a digital pot would be the way to go... though you'd first have to convert the signal using an ADC, then have a microcontroller communicate with the digpot to tell it what value to use. Some MCUs out there already have an ADC embedded in them... you'd have to check and see.

5. ### Lestraveled Well-Known Member

May 19, 2014
1,957
1,215
This is not a simple conversion. What is your skill level?

panic mode likes this.
6. ### ISB123 Well-Known Member

May 21, 2014
1,239
527
He could use Attiny85 which is cheap has 8kb and 10-bit ADC.

7. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,392
1,605
So is that also 30 ohms empty and 212 ohms for full?

What is it that pots do opposite?

A resistor sitting in free space doesn't have much use. Will you actually be connecting this resistance to something?

I strongly suspect a very simple analog circuit will do the conversion you seek, but that requires knowing what the floating resistance will be connected to.

8. ### wayneh Expert

Sep 9, 2010
12,127
3,048
Isn't this just another gas gauge sender project and thus a forbidden topic here?

shortbus likes this.
9. ### WBahn Moderator

Mar 31, 2012
17,748
4,796
Maybe, maybe not. If this is a sender unit for a tank that he is using to water his geraniums would it be forbidden?

10. ### GopherT AAC Fanatic!

Nov 23, 2012
6,058
3,820
Only if the tank is his radiator. And the radiator is on an automobile. For some reason a generator's radiator seems ok to mods.

11. ### crutschow Expert

Mar 14, 2008
13,016
3,235
It would likely be easier to determine what current the 30-212 ohms resistance corresponds to and convert the 0-5V to that current. I assume this is to drive a tank level analog gauge that normally responds to a resistance value in series with it.

12. ### oak Thread Starter New Member

May 6, 2013
4
0
Exaxtly. This is a tank level probe on a tractor design I'm working on. I measured the current values at 0 and 5v, but I don't understand how I can go to my analog gauge with this...?

13. ### GopherT AAC Fanatic!

Nov 23, 2012
6,058
3,820
The way you are looking at this is a bit upside-down. Can you start over and explain that you have a sender unit. It puts out zero to 5 volts. I understand that. What I don't understand is, why don't you just measure the 0 to 5 volts with something like, say, a volt meter? No current needs to flow (unless you have an open collector output).

On the other hand, you can put a fixed resister in the circuit and add an ammeter in series and measure current.

What I don't understand with your desire for a 30-212 ohm resistance, how do you expect to measure resistance, especially when an unknown voltage from 0 to 5 volts is present on the circuit?

14. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,800
1,104
Here's the basis of how you could do it the good old analogue way:-

The vertical axis volts simulate the synthesised resistance Ohms as seen by the gauge. The horizontal axis represents the sender signal. Trim1 sets the 30Ω limit and Trim2 sets the 212Ω limit. Resistor values may need to be tweaked, depending on the gauge internal resistance.
B1 in the sim divides the FET drain voltage by drain current, merely for displaying the synthesised resistance.
Opamp and NFET type are not critical.

oak likes this.
15. ### oak Thread Starter New Member

May 6, 2013
4
0
Can the 9V supply be upgraded to something like 13V, similar to the gauge voltage supply, with some minor changes?

16. ### cmartinez AAC Fanatic!

Jan 17, 2007
3,573
2,541
I don't see why you couldn't add a 7809 regulator to the circuit, and get a 9V output from your 13V source

17. ### panic mode Senior Member

Oct 10, 2011
1,320
304
use vco to control hobby servo that turns real potentiometer

18. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,800
1,104
Not with minor changes. But why would you want to? The circuit needs a stable voltage, which the 13V supply is presumed not to be. A 7809, as represented by the 9V source in the sim, can provide the stable voltage from a varying 12V or greater supply.

19. ### oak Thread Starter New Member

May 6, 2013
4
0
Its just lack of experience and now I understand this. Overall, I like the design a lot. If I had these components on hand, then I would have tried to build it. At this point, I'm either going to get rid of the gauge and build a level gauge using a led driver lm3914 that displays a level from 0-5v or build and test your circuit design. The response curve also helps and should work pretty well in my application. Thanks for the post and circuit design, Ill try to follow up as things progress.

20. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,800
1,104
Good luck with whichever option you go for.
If it helps with component sourcing, you could replace the FET with any NPN transistor able to handle at least 200mA or so.