Custom Gauges With A Stepper Motor Breakout Board

Throw some blinking LEDs on a project and it’s bound to make the front page of Hackaday. We do love builds of a more analog character, though, and this analog gauge stepper motor breakout board seems like just the ticket to make those projects a reality.

The idea behind the project is simple: take a stepper motor, put a needle on it, and connect it to an Arduino. Instant analog gauge, measuring anything an Arduino can calculate.

The motor used in the build is a Switec X27.168, the same motor used in the dashboard of tens of thousands of automobiles from dozens of different makes and models. Controlling the motors is done through [Guy Carpenter]’s Switec X25 library for the Arduino, allowing an Arduino Uno to control up to three stepper motor gauges simultaneously.

The movement of the needle is amazingly smooth and quite fast, as seen in the video after the break. A pretty cool piece of kit if you want a more analog display than LEDs and LCDs can provide.

[youtube=http://www.youtube.com/watch?v=p-9aR8eVrJY&w=580]

26 thoughts on “Custom Gauges With A Stepper Motor Breakout Board

  1. the video should really show some intermediate motion, smaller moves, stops, basically some motion that is similar to what it will actually be expected to perform as a gauge, not full swings….

      1. i hardly see the point as driving an analogmeter on a µC is less than trivial.
        surely a lot less trouble then this setup.

        i guess this would be more accurate if anything, but i fail to see the point.

        1. The last time I had a look at analog meter prices this is about twice the price as a cheap ebay ones, more reputable ones were 40 or 50 dollars. So this is probably going to be better.

        2. One advantage of the Switec gauges is that they will rotate something like 300 degrees, which means you can easily make a 270 degree scale. Ordinary moving-coil meters are limited to about 90 degrees. With a bit of hacking, you can remove the end-stop from the Switec gauges and make a continuously-rotating meter. You’d need some sort of zero-position detector, of course, like in a stepper motor rig.

        3. I know that this is an old thread, but the advantage of using a stepper is a wide angle of movement. Galvanometers with a 270 degree arc are rare, and the magnetic circuit is bulky. They are also quite delicate, having a pair of “watch” springs to carry the current to the armature.

      2. I realise that this is a fairly old thread, but : is there an interface device that doesn’t need user programming, that will take an analog voltage and turn it into stepper control ?

    1. Indeed. The way CPU sensors work with huge chunks vs smooth analog motion is kinda the point of a gauge. I ordered 2 of these motors along with DRV8825 drivers and Nanos to see whats what. Hope to get a speedo and tach with hall sensors. I will test different step resolutions vs speed to see, what kind of combination works best.

  2. This is a perfect solution to broken gauges (speedos, tachs, etc) in vintage cars. With repairs to old analog gauges costing upwards of 300 smackers, this is very cost effective. I’ve just ordered two boards.

  3. I’ve worked with these motors. It’s easy to get smooth-looking motion at high speed, but slow speed is a different story. If he were to move across 10% (as outlined in this gauge) over 5 seconds, you would see steps.

    One of the things Switec discusses at great length is the angular momentum of the pointer. Increasing momentum will smooth out stepping bumps somewhat. I noticed he’s got a big long, wide pointer mounted to the motor.

    Microstepping the motor also helps smooth motion.

    They are nice analog indicator devices, if you don’t mind stepping motion. The motors are approximately 1 inch diameter by 1/3 inch tall. The two windings are intended to be driven at 5V, 20mA, and could be driven directly from 4 I/O pins on a PIC16C74.

    I was building a replacement automotive dashboard, implementing speed, tach, water temp, oil pressure, fuel gauge, and corresponding idiot lights (LEDs in charliplexing). I was largely successful, except smooth motion was a big requirement and ultimately killed the project. Driving more than one gauge at a time smoothly emulating microstepping was simply not possible with the peripherals available then.

  4. car clusters use servoes? i always thought they used the same design as the ANCIENT meter dials from long long ago…

    i never considered that they are exposed to vibrations (driving) and would be useless when actrually driving

    its when moving you need to know your speed ;)

  5. Been searching for a race gauge for my race car for some time. That could do lap timing as well as have a analog tacho only thing on the market is Defi gauge and Stack gauge both dont have GPS Speedo both are very limited and upwards of $2000 this could be my answer into designing my own gauge

      1. Thanks Mike, want to upgrade some speedo’s of my vintage motorcycles. Found similar motors on ebay. Is easier for shipping to europe. Anyway, good idea with the breakout board …

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.