Converting resistance range to 0-5v

Hi. I am not sure the best way to go here.

I have a resistance that varies from 9.56 kOhms down to 0.50 kOhms (to ground). I need to 'convert' that range to 0-5v (so 9.56k = 0v, .5k = 5v)

Of course, my 1st reaction was to use an Arduino, but that seems like it might be 'overkill' and wondered if there would be a better 'electronics only' solution. (This would be a motorcycle, but would have a relatively stable 5v feed.) Thanks for your thoughts.

The Arduino doesn't have a digital-to-analog converter (no true analog output). If [u]PWM[/u] won't work for your application, the Arduino isn't the best solution.

If your resistor is a potentiometer (3 terminals) then it's easy to get 0-5V.

If it's just a variable resistance (2 terminals) you can make a [u]Voltage Divider[/u] connected to (regulated) 12V, with the variable resistance as the "bottom" resistor. But, you'd then need to make an inverting buffer amplifier (form an op-amp) because zero resistance with the voltage divider would give you zero volts.

The voltage divider wouldn't be perfectly linear, and you'll have the same issue with the Arduino except you can linearize it with software.

Hmm. I hadn't thought about a dac; The wiring is:

{ground/frame of bike} - temp sensor (varies resistance) - wire - ECU I can tap that wire to read the resistance to ground. I hadn't thought about a simple voltage divider; I'll have to play with that idea -- the 0-5v doesn't need to be exact or exactly linear.


Maybe map your input to a servo with a mechanical link to a pot.