Hey everybody
I'm having some trouble hooking up a fuel gauge to my Arduino. In a normal situation the sender is basically a variable resistor. The gauge I have is programmable and uses a stepper motor to move the needle. It has a range of 0 - 270 ohms. Full and empty can be at either end and the gauge will compute the proper level and display it.
What I'm having issues with is making the Arduino output a linear resistance that the gauge can use. I've done a bunch of research and can't quite find something that works properly. Most things I've tried will work nice near one end of the scale, but will jump on the other end.
I'm not sure how many steps the gauge actually has, but I'd like to have as many as possible to have as smooth of sweep as possible.
eric_f:
Hey everybody
I'm having some trouble hooking up a fuel gauge to my Arduino. In a normal situation the sender is basically a variable resistor. The gauge I have is programmable and uses a stepper motor to move the needle. It has a range of 0 - 270 ohms. Full and empty can be at either end and the gauge will compute the proper level and display it.
What I'm having issues with is making the Arduino output a linear resistance that the gauge can use. I've done a bunch of research and can't quite find something that works properly. Most things I've tried will work nice near one end of the scale, but will jump on the other end.
Is the pot you're using a linear one or a logarithmic one?
I'm not using a pot. I've use a resistor ladder to simulate by hand the varying resistances.
After playing around tonight, I've managed to get something that seems to work. Using a MOSFET and two resistors, analogwrite outputs a linear range, and the gauge responds like it should. The only issue I can see is there is a little bit of smoothing that is needed. I will have to play with cap placement and values to see what works best.