4
\$\begingroup\$

How do you make / connect an Analogue gauge with Arduino?

\$\endgroup\$
1
5
\$\begingroup\$

The simplest analog gauge is an ammeter. Connect one end to an analog output pin, the other to the middle pin of a potentiometer, and another pin of the pot to ground. You'll need to tweak the potentiometer to calibrate the range of the output. Make sure that you measure the resistance across the ammeter and don't short out the arduino's output pin. You can use analogWrite() to move the needle.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ @littlebirdceo To avoid shorting, could be better to insert a fixed resistor between the lower end of the pot and the ground \$\endgroup\$
    – clabacchio
    Feb 3 '12 at 8:26
3
\$\begingroup\$

I did this recently with a few gauges I picked up from a friend. I found the best solution was to drive the base of a transistor (BC547, in my case) with PWM from the Arduino. Connect the collector to Vcc (+5, +3.3, etc.), and put a resistor between the positive side of the gauge and the emitter to limit the current to the value that will result in a full swing of the needle (and obviously the negative side of the gauge goes to ground). Then the PWM output of the Arduino will swing the gauge ratiometrically between 0 and 100%.

\$\endgroup\$
3
\$\begingroup\$

Inspired by this question, I wrote the following arduino routine and made the following circuit. Linky... http://www.w1xbs.com/?p=430 This is basically what Blalor said.

\$\endgroup\$
2
\$\begingroup\$

As an alternative to using an ammeter, you can use the cheap automobile instrument stepper motors like the Switec X25.168 or clones from VID and MCR. You can pick up the steppers on eBay for less than $5 each, and drive them directly from the Arduino I/O lines without a controller; without any other components whatsoever. They have enough internal friction to hold their position when the coils are unpowered, which might be useful in some battery-powered systems.

The SwitecX25 driver library is available on github, and the Gaugette blog has spec sheets and more info, including a source for some cheap gauge housings to mount them in.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.