1
\$\begingroup\$

I am in hold of an Arduino board and 12V DC motor. I need to be able to control the motor speed gradually, my intention is to output a PWM current in range of between 0 and the maximum 5V of the board to the motor.

My question is what do I need to have in order to multiply the output from the range of 0 - 5V to 0 - 12V to fit the motor?

\$\endgroup\$
2
  • \$\begingroup\$ Why not start with a 12V supply? \$\endgroup\$ Commented Nov 26, 2013 at 10:30
  • \$\begingroup\$ It is 12v supply but the arduino lowers the output to 5v max regardless \$\endgroup\$
    – user33305
    Commented Nov 26, 2013 at 10:34

1 Answer 1

3
\$\begingroup\$

enter image description here
image selected at random from somewhere in the intertubes.

enter image description here
ditto

Some people prefer MOSFETs

enter image description here
ditto

See also prior art

For a bigger motor you might use a BJT to turn on a heftier MOSFET

enter image description here
ditto

Important notes

  • Ensure you use a switching device that can comfortably handle more than whatever maximum current the specific motor will need.
  • It is good practice to have a snubber diode across the motor to prevent it causing damage to the switching elements.
  • The ground of the motor's power source should be connected to the ground of the Arduino's power source (e.g. the header socket marked "GND")
\$\endgroup\$
4
  • 1
    \$\begingroup\$ And have a snubber diode across the motor, either discrete or within the switching device itself. \$\endgroup\$ Commented Nov 26, 2013 at 10:45
  • 2
    \$\begingroup\$ How do we vote to add this to the Wiki as the answer to 50% of all the *duino/pic/Pi questions posted here? \$\endgroup\$
    – John U
    Commented Nov 26, 2013 at 11:55
  • \$\begingroup\$ If it is added to a Wiki type thing, I think it is important to note that 2 of those drawing/schematics explicitly show the common ground between the motor power source and the microcontroller power source and 2 don't. A word about the need for a common ground would be useful in my opinion. \$\endgroup\$
    – mikeY
    Commented Nov 26, 2013 at 15:44
  • \$\begingroup\$ The internal diode in the MOSFET will not replace the external diode in this configuration. When the MOSFET turns off, the voltage on the drain will spike positive (not negative). You still need the diode across the motor. \$\endgroup\$
    – Tut
    Commented Nov 26, 2013 at 16:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.