For an upcoming Steampunk/Electronics project, I want to use an analog meter and an Arduino. My idea is to use the PWM (Pulse Width Modulation) feature of an Arduino to swing the analog gauge around.
Digging around on Google, I found a site that describes using an Analog Gauge with an Arduino and gives me the key information I need, which is that you need an inline resistor to change the 5V generated by the Arduino into whatever the Analog Gauge is calibrated to. The small gauges I got via ebay were a 0-50uA (microamps) and a 0-1mA (milliamps), so I’d definately need a resistor. The article above happens to use a 0-1ma meter like one of the two I bought, so I knew I’d need a 4.7k resistor for it. Using a convenient online Ohm’s Law Calculator I found that for the uA meter, I’d need a 100k resistor.
I breadboarded up the setup — its very easy: connect Arduino digital pin capable of PWM to the proper sized resistor and then to the plus side of the meter, and the negative side of the meter to ground. I used the standard Arduino Fading LED Tutorial to make the analog dial swing, here is the rough result with to 0-1uA meter:
[youtube]ZilBQzy0UWw[/youtube]
The next step will be to write an Arduino sketch that sets the meter to a somewhat random value and “bounces” around that value for some dramatic effect. I may also include a potentiometer (a variable resistor) so I can use a dial to “tune” the analog meter in the final project.