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:
- Arduino hx711 tutorial
- Arduino magnetic switch
- Best Arduino Kits
- gifts for engineering students
- gifts for engineers
- mpu6050 Arduino projects
- Current sensor Arduino
- Soil Moisture Sensor With Arduino
- Arduino Count up Timer Using the Nokia 5110 LCD
- Arduino Yun: Integrating or Juxtaposing Arduino with Linux
- Arduino Projects: Line Follower Robot
- Arduino RFID Project for Beginners
- Arduino MOSFET Project
- Which Arduino Should You Buy
- What Can You Do With Arduino Boards?
- Great Alternatives to the Arduino Microcontroller
- Arduino Projects: Color Sensor
- Arduino IDE Alternatives
- Arduino Mega vs. Uno
- Arduino Projects: Arduino LCD Display
- Read Arduino Rotary Encoders
- A Selection of the Best Arduino Simulators
- Arduino Projects: IR Receiver
- Arduino Light Sensor Project
- Arduino Projects: Arduino Decibel Meter
- Arduino Stopwatch Project
- Arduino Bluetooth RC Car Project
- Arduino Temperature Logger Project
- Arduino Projects: Arduino 7 Segment Display
- Arduino Projects: Clap ON Clap OFF Light
- Arduino Relay Project
- How to install Arduino Library
- Rain Sensor Arduino Project With Buzzer
- Arduino Projects: RGB LED Arduino
- Arduino Stepper Motor Project
- Arduino Projects: Arduino DC Motor Control
- The Top Affordable Arduino Robot Kit
- Arduino 3D Printed Case
- Arduino Projects: Asynchronous LEDs Blink
- Arduino Projects: Ultrasonic Distance Sensor
- Arduino Projects: LED – 4X4X4 LED Cube
- Arduino Car Projects: Build an Obstacle Avoiding Robot With Less Than $30
- Arduino Projects: Servo Potentiometer Control
- Arduino LED Project: Knight Rider
- Arduino Projects: PIR Motion Sensor
- The Difference between Arduino and Raspberry Pi
- Top 9 Books Every Engineer Should Read
- Top Used Sensors for Arduino
- First Hand on the Arduino Uno Board
(y)
Following these instructions, my motor just rotates constantly at high speed. What could be wrong?