Controlling DC motors using Arduino UNO

In this tutorial we will figure out how to run and control movement of a basic DC motor utilizing an Arduino Uno Rev3 with the assistance of a motorarduino_h_bridge driving incorporated circuit chip. We will likewise figure out how to control the rate of the motor utilizing PWM.

There are three kind of motors which you may run over in apply autonomy application, DC motor, servo motor, and stepper motor. Today we will figure out how to utilize DC motor.

DC Motor

It is a motor that keeps running on DC voltage. The toy autos and robots may have one or more DC motor to move their wheels or arms. Actually in mechanical technology it is the most prevalent one. It is made out of a lasting tube shaped magnets and a wire wound shaft. It has two force associations with apply the voltage. One is termed as positive and the other is negative. On the off chance that we apply no less than 1.5 volts DC to the motor it will begin moving in a clockwise course, It can acknowledge up to 6 volts. On the off chance that we switch the extremity then it will move in the other way. It is called as a 3 volt motor because of the commonplace voltage rating. The current needed to move the motor is higher than the Arduino pin can straightforwardly supply.

Arduino, as specified already, can just give 40mA current through its port pins, which is not adequate to run motors which require more than 40mA current. To utilize Arduino for such sort of control applications we as a rule utilize either a MOSFET transistor or some other incorporated circuit (IC) chip.

H – Bridge IC

A H- Bridge IC motor driver IC is utilized to control the motor. The pin arrangement of the IC is indicated in the information sheet”. Typically data with respect to the electric or electronic gadget is accessible on an information sheet”, which is distributed by the important maker. It gives you the capacity of the device, complete design of every pin on the gadget and now and then even interior circuit if there should arise an occurrence of a coordinated circuit.

It likewise gives us the complete mechanical and electrical qualities of that part. It would be ideal if you go through the data-sheet” of L293D IC, joined as informative supplement A. It will brief you as the amount of current or voltage can be given to info sticks or can be taken from yield pins.l293d

L293D is a 16-bit IC, with 2-direct motor control or as such, you can control and move two motors utilizing this IC both as a part of clockwise and against clockwise heading. Every channel has a different empower pin, 2 data pins, 2 ground pins, and 2 output pins. We will utilize one and only channel throughout today’s investigation.

There is one supply voltage pin and a rationale reference voltage pin. PIN 1 and PIN 2 will be stopped to positive and negative terminal of the DC motor.

Microcontroller ATmega328
Voltage 5V
Input Voltage 7  – 12V
Digital I/O Pins 14
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32Kb
Clock Speed 16MHz

Components Requiredcomponents_l293d

  1. DC Motor
  2. L293D
  3. Motor Driver IC
  4. 10KΩ Potentiometer
  5. Toggle Switch
  6. 10KΩ Resistor

Note:    Buy Arduino UNO from our store for lowest price Rs: 550/-

Buy Now

In the first place, verify your Arduino is fueled off by unplugging it from the USB link. Presently, take the obliged parts and interface them as demonstrated in Figure 5-3. Once more, check the circuit completely before driving it up. The L293D gets VERY hot when being used. Consequently, Be cautioned that the temperature can get sufficiently hot to dissolve the plastic on a breadboard or any wires touching it. Try not to touch the heatsink as you may blaze yourself. Try not to leave the circuit fueled up and unattended on the off chance that it overheats. It might be reasonable to utilize strip board rather than a breadboard for this undertaking to spare harming your breadboard because of warm.


Arduino Sketch