2
\$\begingroup\$

Is it a good idea to connect a galvanometer (100 μA panel meter) directly to a PWM output of a microcontroller (or any other digital device for that matter)? I set PWM frequency to approximately 10 kHz and duty cycle varies from 0 to 6% for full scale.

enter image description here

My worry is if the push pull output has a dead time, then the inductor will induce spikes on the driver pin. Does it require extra Schottky diodes to the power supply or are the internal protection diodes sufficient?

I have the diodes lying around, it is not a matter of cost, it is a matter of what is best / necessary practice?

Another option would be a 27k resistor in series and use full 0 - 100% duty cycle, but the question remains as the inductor acts as a current source and "doesn't care" about a series resistor.

®Stellaris LM4F120H5QR Microcontroller

Nick Alexeev
38.9k17 gold badges104 silver badges248 bronze badges
asked Jan 21, 2015 at 19:32
\$\endgroup\$
8
  • \$\begingroup\$ What are you trying to do? BTW, galvanometer is not a digital device, but the very opposite - analog..) \$\endgroup\$ Commented Jan 21, 2015 at 19:35
  • \$\begingroup\$ @EugeneSh. The "usual" reason is to use it as an analog "display" of some digital data. \$\endgroup\$ Commented Jan 21, 2015 at 19:43
  • \$\begingroup\$ @EugeneSh. I want an analog read out of a digital value. I works just fine, I just want to know if it is a bad idea to do it without flyback diodes. The difference between need for a PCB with a couple headers and diodes, or two straight wires. \$\endgroup\$ Commented Jan 21, 2015 at 19:47
  • \$\begingroup\$ @jippie You could add a resistor in series with the galvanometer. That could do two things. (1) You could use a wider range of PWM duty cycles, which could improve resolution. (2) Series resistor would provide current limiting for the μC output stage. (disclaimer: The above is based on general understanding. I haven't worked with galvanometers before.) \$\endgroup\$ Commented Jan 21, 2015 at 20:02
  • \$\begingroup\$ @jippie Have a look also at this schematic where a galvanometer is driven with a PWM output from a 555 timer. \$\endgroup\$ Commented Jan 21, 2015 at 20:04

4 Answers 4

3
\$\begingroup\$

Use a series resistor, scaled such that 100% PWM output (i.e. 3.3V or 5V depending on the MCU) gives 100uA or a bit over (up to 50% over).

Direct connection would only allow something like 10% duty cycle before full-scale deflection, not very useful.

And the series resistor will attenuate any inductive spikes from the meter coil well enough to protect the MCU.

It is possible but unlikely that a 2mA overload, e.g. from a software error (integer overflow?) could cause damage to the meter movement. Unlikely to burn the coil out, but it's a fairly violent mechanical movement. 100uA movements should be pretty tough but more sensitive ones used to have delicate jewelled bearings, like watch movements.

answered Jan 21, 2015 at 21:26
\$\endgroup\$
2
\$\begingroup\$

A 100uA meter will be no problem- the outputs are push-pull and do not have a dead time.

I suggest you use a series 1% resistor to get a stable reading. Otherwise the scale factor will be determined by the output's current limit and by the resistance of the meter, both of which are variable and change with temperature. Use a resistor that's just low enough to get a full-scale deflection at maximum duty cycle (or slightly more and throttle it back with a firmware calibration).

answered Jan 21, 2015 at 21:28
\$\endgroup\$
1
\$\begingroup\$

The meter's inductance will cause spikes. However the coil in a moving coil meter is usually wound around an aluminum former which acts as a shorted turn (to damp the movement). When combined with the relatively low inductance and high resistance of the coil, the spikes should be quite weak.

Putting a resistor in series will reduce spike intensity even further, and protect the meter from overload if the PWM ratio goes over 6%. Most microcontrollers have internal protection diodes on their I/O pins, so the only thing to be worried about is whether they can handle the spike current.

With a 27k resistor the spikes would have to exceed 27V to push 1mA into the I/O pin. I tried driving 10KHz 50% PWM into a 50uA meter with a BS107 MOSFET and 27k series resistance. At the meter terminals the spike had a peak amplitude of 1.1V. At the FET it was less than 0.6V.

answered Jan 21, 2015 at 21:40
\$\endgroup\$
0
\$\begingroup\$

AT 10 kHz, your meter will not move at all and integrate the current quite well.

The inductor in the meter will filter the current spikes from the controller and will generate a small over load, but this will be absorbed by the controller without any damage (the spike intensity is smaller than the injected current intensity and the controller is in low impedance when it stops driving the output, so there is no power and therefore no heat and thus no issue).

The real question is the range, but a factor 10 of momentary overload should not be an issue as the average value remains within the specification of the galvanometer.

answered Jan 27, 2015 at 20:06
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.