Here is a Detailed Guide on Arduino 3V DC Motor Control To Have a Basic Idea On Control With Transistor, IC etc. This is Basic of Robotics. There are lot of things to know and we are assuming that the reader knows nothing. What we expect? we will code via Arduino IDE and control the rotation per minute or even can reverse it.
If you more nice but easy guide, you can follow our guide on Arduino 3V Motor Speed Variation Control with one transistor, two resistors and one diode. That guide also has video and easy for a beginner.
Arduino 3V DC Motor Control : Basics
If you start with a 3V DC Motor, it becomes easy as previously described external power for breadboard is not required. A 3V DC Motor is brush motor which has two legs. It basically works like a resister. You should use a multimeter to check both – resistance of the motor and the points where the motor will be added. Obviously, if the voltage goes below 1 volt or closer, motor is unlikely to start. There is a concept of controlling the voltage to drive the motor slower – it is basically like “when car runs faster more wind flows inwards” theory. That type of control is too basic & we are not discussing here. That has one usage – on drone like stuffs, other Laws of aerodynamics work. So, “when car runs faster more wind flows inwards” theory might be useful there. But basically we need “signal based control”.
---
We can control with transistor or IC. A diode needed for direction and resisters are needed for precise voltage control. All DC motors have specs. Voltage and Amperage are most important parameters. When we say use 1N4001 diode, that means, use any diode from 1N400x series. The series we said actually not hugely great, it is general purpose, the series as a whole can withstand a higher reverse voltage (Vr) :
1N4001: 50V
1N4002: 100V
1N4003: 200V
1N4004: 400V
1N4005: 600V
1N4006: 800V
1N4007: 1000V
Coming towards IC and transistor, IC are better choice but may be difficult to construct by a newbie. That is why we provided diagrams of both IC and transistor circuits. Let us assume that we connect a 3V, 600 RPM rated motor to digital pins of Arduino UNO board, the maximum voltage that can be supplied by a digital pin of Arduino is 5V as the maximum output of the board is 5V. RPM is rotation per minute. If we drop the voltage to 3V with resister or some other way, that becomes 100% right, taking the amperage, frequency are right.
If we drop the voltage to 1.5V, the speed should drop to 300 RPM. But, what range the motor works is very important to know. It might not rotate at all.
Arduino board has voltage supply system to external components, that is written as POWER on the board. Theoretically, after 5V, we need an external supply of power. Motor works in the same way like register. So, if you add the motor to blink program, a very small motor might start-stop-start-stop- like blinking! But if the need of voltage is 12V, then the digital pin can not supply so much power. The digital pin’s output voltage is becoming signal. Using that signal, if we control the external voltage supply to the motor, it will nicely work. IC and transistors do that work.
Additional danger of adding a motor directly to Arduino like with Blink program is damage of the board. The motor will try to run. Electricity is like flow of water. Virtually a 3V motor will create a “vacuum” when we are adding the 3V motor to the board with Blink program. This is why we need a circuit precise control of the “electricity water” incoming towards the circuit of motor as signal. In the same way, we need a precise control of the “electricity water” incoming towards the Arduino GND – that is why we added a 10K resister on the (-)ve pole just before attaching to the board in mini christmas light.
So how does a driver works? Driver is that IC or Transistor. Think an IC as a matchbox. One side 3V is incoming, on box’s opening side, 12V external supply is coming inside, the matchbox has such a magic that it can use the “pattern” of incoming 3V to the incoming 12V and output 10V to the motor. As what is incoming is like “water”, if we do not add choking system (=resister), flow direction valve (=diode), the Arduino board or IC will get destroyed. 12V is more water. That water can back flow towards 3V “pipe” to “Arduino tank”. The computer’s motherboard can get destroyed in extreme case.
Arduino 3V DC Motor Control : Basic Circuit With Transistor
A PN2222 Transistor is a general purpose transistor. Search to get the data sheet of PN2222 Transistor. There is Wikipedia article on PN2222 Transistor. Second we have a breadboard, external power supply or Arduino’s power supply. Third the motor. Forth is a 1N400x series diode. Fifth are resistors which you should put by measuring with multimeter. We have given a diagram as Option 1 and here is sample code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | /* Adafruit Arduino - Lesson 13. DC Motor */ int motorPin = 3; void setup() { pinMode(motorPin, OUTPUT); Serial.begin(9600); while (! Serial); Serial.println("Speed 0 to 255"); } void loop() { if (Serial.available()) { int speed = Serial.parseInt(); if (speed >= 0 && speed <= 255) { analogWrite(motorPin, speed); } } } |
You will add a 10K Ohm resister on (-)ve pole going to GND of Arduino. Pull down resistor.
Now let us think about IC circuit. Instead of the Transistor, we are using LM293D IC. Circuit is given and here is the code with credit :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | // code written by by Vijayenthiran Subramaniam // Adapted from http://www.erfssn.org // code starts from next line int motor_forward = 7; int motor_reverse = 6; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(motor_forward, OUTPUT); pinMode(motor_reverse, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(motor_forward,1); //terminal D1 will be HIGH digitalWrite(motor_reverse,0); //terminal D2 will be LOW delay(5000); //creates a 5 seconds delay //Motor will rotate in forward direction for 5 seconds digitalWrite(motor_forward,0); //terminal D1 will be LOW digitalWrite(motor_reverse,1); //terminal D2 will be HIGH delay(5000); //creates a 5 seconds delay //Motor will rotate in reverse direction for 5 seconds digitalWrite(motor_forward,0); //terminal D1 will be LOW digitalWrite(motor_reverse,0); //terminal D2 will be LOW delay(5000); //creates a 5 seconds delay //Motor will stop rotating for 5 seconds //again the loop() will run from the begining until the board is turned OFF } |
Properly measure the output with a multimeter, you’ll not die. Do not burn 3V motor by supplying 12V by wrong circuit, if “water leaks”, it will pass via the wire “pipes” and blast the coil. $2-$3 multimeter if blows away, you will buy another but be careful about “backflow”.
If you can customize the parts and just follow our principle, from newbie you will become one step higher. Controlling motor is very important.
Last option is used for bigger works – there are ready to use boards on the market.
Tagged With how to drive 3v dc motor arduino , arduino 3v motor , 3v motors arduino , https://thecustomizewindows com/2015/08/arduino-3v-dc-motor-control-transistor-ic-more/ , arduino motor 3v , 3v dc motor arduino , 3v dc motor , 3v-6v fan motor arduino wiring , 3v dc motor and control , 1pc fan blade and 3-6v motor