I’m seeking some design assistance with a project involving a Panda II and an analog panel meter. In fact, it is this meter: http://www.sparkfun.com/products/10285.
My goal is to be able to drive the position of the meter using the PWM output. The accuracy is not critical, but (ideally) a PWM duty cycle of 0% should result in the meter being at it’s resting position (or very close) and a PWM duty cycle of 100% should be at the full-scale deflection position (or very close).
Since the PWM output is 3.3v and full-scale deflection on the meter is at 5v, I need to bump up the voltage. For that, my plan is to switch the 5v rail coming off the Panda II board to the meters using a NPN transistor (like a 2N2222) in the way you would expect (PWM output to base through a small resistor of 470 ohms, emitter to ground, meter between 5v rail and collector).
The meter reportedly draws 0.75mA at 5v.
Some questions about this plan:
-
I assume that varying the duty cycle between 0% and 100% will linearly position the meter. That is, at 10%, I would expect the voltage to be 0.5v, at 20% the voltage will be 1.0v, etc. Is this correct?
-
I assume that if the PWM frequency is around, say, 500Hz, the physics of the meter will effectively smooth the signal-- I don’t need to add any capacitors to keep the meter from visibly wigging. Is this correct?
-
I assume that because the meter is effectively a coil around a magnet, that it presents an inductive load to the transistor. It’s probably very small, but because of this, I imagine I need to protect the transistor with a small diode. Is this correct?
I’m an experienced software engineer and comfortable with digital electronics. I’m less comfortable with the analog side of things and would appreciate any insights.