0
\$\begingroup\$

I'm using a PWM control signal that ranges from 0-24V to drive a stepper motor. However, the datasheet in the driver says it should range 0-5V.

How can I bring down the amplitude of my PWM control signal? Would I use a 5V regulator or does a potentiometer make more sense? If neither of these, then what?

\$\endgroup\$
  • 1
    \$\begingroup\$ Where does your 24V PWM signal come from? \$\endgroup\$ – Dwayne Reid Feb 6 '15 at 23:27
  • \$\begingroup\$ Is the 24 V signal just a control voltage for some driver chip/module, or is it the actual power output for the motor? \$\endgroup\$ – tomnexus Feb 7 '15 at 3:54
1
\$\begingroup\$

Not the voltage regulator. That will try to give a constant voltage at the output, but PWM at the input won't allow this. Anyway, the regulator won't work, but your PWM signal will be lost.

A potentiometer will work, and allow you to vary the output level, but if you know what level you want (5V) then a resistor divider is cheaper. 3k9 for the higher resistor, and 1k for the lower one will give you 4.9V. Both values are E12, so they are more common that the values Nick suggests.

edit
Nick suggests higher resistance values, like 39k and 10k. Lower values mean less susceptibility to noise and other disturbances, and if you're working with stepper motors you can afford the extra few millis; the stepper motor will consume a lot more.

\$\endgroup\$
  • 2
    \$\begingroup\$ They'll also waste 5mA; I'd suggest multiplying the values by 10, assuming the PWM is in the kilohertz range. \$\endgroup\$ – Nick Johnson Feb 6 '15 at 11:43
  • \$\begingroup\$ @NickJohnson: if you're driving stepper motors anyway, then 5 mA won't matter much. \$\endgroup\$ – Joris Groosman Feb 7 '15 at 9:20
  • \$\begingroup\$ Perhaps not, but why waste power when you don't need to? \$\endgroup\$ – Nick Johnson Feb 7 '15 at 17:34
0
\$\begingroup\$

You can simply use a resistor divider for this - feed your PWM signal into the top of the divider, and take the 5v signal from the center.

A resistor divider with a 10k resistor on top and a 2.61k resistor on the bottom will give you 4.96v out for 24v in.

\$\endgroup\$
  • \$\begingroup\$ It might be worth noting the 2.61K resistor is a 2% (E48 series) value. \$\endgroup\$ – JIm Dearden Feb 6 '15 at 11:22

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.