Arduino Projects: Arduino DC Motor Control

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

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.

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.

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:

2 thoughts on “Arduino Projects: Arduino DC Motor Control”

Leave a Comment

X