Home Arduino Projects Arduino Projects: Arduino DC Motor Control

Arduino Projects: Arduino DC Motor Control

by Nikodem Bartnik

Lots of beginners are having some issues with connecting a motor to the Arduino board. Some even try to connect the motor directly to the board’s pins. huge fail. Do not do this! That would likely damage your Arduino Board regardless of the size of the motor.

The maximum current that the Arduino can supply is 20 mA and the smallest motor can easily draw 100 mA. That would be a way to kill the Arduino board in no time flat.

In this project, I will show you how you can use a simple and cheap transistor to control your motor. This will be just a simple circuit, not a fully functional H bridge.

Arduino DC motor control

Arduino Projects: Arduino DC Motor Control

Here are the part needed:

First, the wiring part.

Make sure that the transistor is connected correctly. If you do not have the BC547 you can use a different NPN transistor, just make sure its maximum voltage and current are sufficient enough for your motor.

You can also experiment with the resistor value, for me 47 kΩ works the best. There are some formulas to calculate those values, but you should measure some values with a special multimeter and it can be hard for beginners to make.

Arduino Projects: Arduino DC Motor Control
Arduino Projects: Arduino DC Motor Control
Arduino Projects: Arduino DC Motor Control

The program for this project is super simple, just two for loops to slowly turn ON and OFF the motor using PWM (Pulse Width Modulation). This project is more about hardware than software, that’s the reason why code is so simple.

Arduino Projects: Arduino DC Motor Control

Here is how our motor works.

That’s the cheapest way to control your motor and you can use it for your robotic projects.

You might also like:

Related Posts

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy