Stepper motor driven coolant temperature gauge - How to approach?

Hi all,
This will be my first attempt at anything with an Arduino, infact with coding at all. I've read a few forum posts and watched some youtube videos about stepper motor control but want to ensure I get the approach to the project right before getting into the details of the code. My car has an old capillary driven temperature gauge. These things are easily broken and its a common complaint among the owners due to repair costs and turn-round time.

To avoid this problem whilst retaining the original look of the dashboard I'd like to replace the mechanical workings of the gauge with a stepper motor controlled by an Arduino Nano. I've ordered a bipolar stepper, L298 driver, a Bosch NTC Temp sensor and a Nano. I understand that the Arduino can't read resistance directly, therefore a fixed value resistor is required to set up a potential divider circuit from which coolant temperature can be calculated.

The issue I have is with the stepper control strategy and converting voltage/temperature into the number of steps the motor is required to move. The gauge has a stop positioned at the bottom end of the scale (40 Deg C) but no stop at the upper end of the scale (120 Deg C).
I think I should run some setup code to drive the stepper against the stop, with the number of steps/run time calculated by the number of steps/time it takes to wind back from the max temp position, to ensure the needle starts from the fully cold position every time as a reference point. For continued temperature monitoring I suspect I require a lookup table which converts voltage received on the input pin to a number of steps up from the cold stop that the motor is required to turn.

Finally as the code will continually loop I expect I should set a variable which record the number of steps from cold the motor is currently on loop 'n', and then on loop n+1 the new step position can be calculated, the difference between 'n' and 'n+1' positions found and the motor moved the required number of steps forward/back.

Overall is this a sound approach to the project. If not please can you advise a suitable method?

Secondly, assuming a lookup table is the correct approach, how do I interpolate between values in the table?

You can get special stepper motors for use in car instrument systems. They are very small and use very little current and AFAIK they are designed so you can drive them against the end-stop to establish the zero position at startup.

I guess you could run a regular motor against an end stop but the stop, and whatever hits it, would have to be strong enough to resist the motor torque without damage. It is more normal to have the motor trigger a microswitch or break an optical beam.

If you intend to run the motor onto a physical stop then the number of steps to ensure you are at the end-stop should be some number greater than the maximum number of steps required to get the motor back to the end-stop from the furthest point it could be at. Move slowly.

Stepper Motor Basics
Simple Stepper Code

Sounds to me like a job more suited to a servo than a stepper.

Thanks for the replies. The gauge is 52mm in diameter and it carries out 2 functions so space is limited. It's only the water temp that has a capillary and therefore breaks often. The mechanical oil pressure gauge works fine. Any solution doesn't have to fit in the instrument case, but I don't have tonnes of room to play with either, so compact is good.

Are there special small servos available? I used to mess around with RC cars but they'll be too big. I found a 15mm diameter stepper motor, but some sort of micro servo will probably make my life easier.

You can get very small servos. I have one beside me that measures 20x12x5mm. Have a look at the Hobby King website.


Thanks. Bought a Turnigy TGY-R5180MG.