# Convert a voltage from 0-12V into a resistance from 0-264 ohm

I have a fuel sender that works on 12V and sends the reading to the engine. The engine wont start with it disconnected (hence the diode). What I need is to copy the resistance of the fuel sender using the voltage output by the fuel sender to create an equivalent resistance value between 0 and 264 (or somewhere inbetween but 264 is the maximum)

I have looked into using a arduino to read the fuel sender signal with a voltage divider in between and a digital potentiometers but the digital pots have a minimum resistance of 1k which is far too high for this application. I also tried using PWM to control the signal into the cerbo gx however it does not work. I could not find a simple explaination of how to use a JFET as a voltage controlled resistor for a specific range if this is possible what is the recommended layout?

Is there a way to do this as per the diagram or otherwise without fitting another fuel sender in the tank?

Note: The Ameter is a guess at how the cerbo gx (fuel reader input) determines the resistance and outputs a number.

• Is the voltage across the variable resistor relatively constant? Apr 16 at 7:01
• There is a way to make it work with MCU. You just have to make your own digital pot out of a bunch of identical resistors connected in series and one or more analog MUXes. However I feel pure analog solution would be much more elegant and reliable. Apr 16 at 8:19
• Use a servo to turn a potentiometer? Apr 16 at 9:13
• Most likely you can fool the input by sinking current. If you have a DC current sink, the input will see it as a resistor. The DC current sink will sink a current controlled by the sending unit voltage. Apr 16 at 9:26
• I agree with @mkeith. I think you have come up with a solution and are asking us how to make it work. Instead describe the problem (what the device is and how it was supposed to work) and ask for help with a solution on how to drive the old device (a fuel guage?) with your new sensor / transmitter. Apr 16 at 10:52

That's a really tricky circuit since you don't actually know what will your simulated resistor will be subjected to… AC? DC? Pulses? sensor calibrators have such emulation circuitry and they have specified all of the limits in the user manual.

The simplest thing is to design for DC, assuming something like an 5-18V supply for your sensor excitation. 5V since it could be driven from some logic supply, 18V since it's the maximum 'safe' value found on electrical systems in car, usually.

Another thing is how is your resistor 'floating' in the electrical circuit: is it powered from the supply and read from the low side, grounded and the current read from the top or what else? In the general case you should assume both terminals in the supply range.

Sadly a digital pot is not really feasible because of the needed range: they usually work in the range of kiloohms. 264 ohm is really a low value for a level pot, it's almost 50 mA (that would also out of the range of most digital pots).

To emulate a resistor you need to check both voltage and current. Luckily your is a slow system so you can delegate the computation in software. I'd do it like this:

• Measure the voltage at the terminals of the 'resistor'; a difference amplifier is perfect for the job;
• Using a shunt measure the current on the 'resistor'; another difference amplifier with some more gain (they call them current sense amplifiers);
• Some transistor (BJT or MOSFET doesn't really matter) driven by an opamp using a signal from some PWM channel: integrating the PWM with a capacitor you will adjust the base currrent/gate voltage and so the current sink by the transistor.

The tricky part is referring the transistor emitter/source to the low terminal (which is somewhere about ground in the general case).