I want to control 2 dc motors using the arduino board directly. One motor must rotate clockwise and the other counter clockwise. The directions doesn't change only the speed of each motors. Can this be done without any shield? Them motors may need a higher voltage than the arduino can provide. If I link the arduino board to a power source of about 15 V (the board is arduino mega limits between 6 and 20 ) and I use "analog.write()" function can I output more than 5 volts(the internal voltage)?

  • If you post a link to the motors you are intending to drive, you might get an even simpler solution. We need to know both the voltage and the current, preferably from the motor's datasheet.
    – gbulmer
    Commented Jun 8, 2016 at 23:17

1 Answer 1


Simplest way to do this is two MOSFETs (one per motor, because you don't need to change direction), and some miscellaneous passives, and a flyback diode for each motor.

See this tutorial for wiring diagrams and details.

  • Great link! You saved me! But I still don't get it. What's the difference between a mosfet and a transistor? I searcher a few more pages and they said a mosfet is a transistor. Does any transistor work?
    – Zbang
    Commented Jun 8, 2016 at 17:34
  • A MOSFET is a type of transistor. BJTs (bipolar junction transistors) are the other dominant type of transistor, and are not as appropriate for this application. The difference between MOSFETs and BJTs is too much to discuss here, but as far as what you should use: use a logic-level MOSFET (low Vgs(on))
    – uint128_t
    Commented Jun 8, 2016 at 17:36
  • @uint128_t it is syaing that link does not exist
    – Ritil
    Commented Jan 8, 2023 at 9:48

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.