Driving analog meters with arduino

Hi,
I would like to make some projects with analog volt/ ammeter. I know that i can drive a 5V voltmeter directly off PWM+gnd pins. I have seen ammeters used with PWM+gnd as well, but with an added resistor in series. For a 50mA meter it should be ~1k ohms. What is the maximum feasible ammeter I could control? And is there any way to calculate/ guess the resistor value?
Thank you

The port pins on AVR Arduinos (Uno R3, Mega, classic Nano) can safely handle 20 mA current draw or sink, but the newer processors are generally more limited and 7 mA is typical.
Check the details on the Arduino you are thinking of buying.

You can always use an NPN transistor as a current amplifier, and use PWM to control the meter movement. A basic motor driver circuit like that shown below will work, with an additional current limiting resistor in series with the meter.

Phew,
Thanks for the fast reply, but this seems a bit too much for me. I just recently finished electronics intro and the closest thing we had to do to this was:
image
Would "DIG OUT" in your circuit be the "Pin 5V" in mine? (in other wordds the PWM?
Thank you

That circuit will work too. RB could be 5K - 10K, RL MUST be chosen to limit the meter current to the maximum meter current allowed, or less.

"Pin 5V" would be a PWM output pin on whatever Arduino you choose, and in the program, control the meter with the command analogWrite(pin, value); where value = 0 to 255.

Every analogue meter is basically a current meter.

A resistor in series changes that into a volt meter,
and a resistor across changes that into a less sensitive current meter (for higher currents).

If you can remove the (external or internal) shunt of a 100Amp meter,
then you basically have a 50mA current meter (assuming the basic instrument is 50mA).
Leo..

I would add that meters normally used as "voltmeters" tend to have low full scale currents, typically in the range of 10 uA to 1 mA full scale, whereas those used for current measurement range from 1 mA full scale and upward.

After removing the internal series or parallel resistors, of course.

1 Like

Hint: Not all meters tolerate PWM, add a capacitor across the output of your PWM making it a low pass filter with a DC base.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.