WHY we use a motor driver ?

Hello all,

Could you plz help me understand why we use motor drivers like H-Bridge L293D with arduino ? Wherever i searched on the internet they say it is used to rotate motors in clockwise and anticlockwise directions. But i believe we can achieve it with arduino itself by making a pin HIGH and another pin as LOW and then reversing the pin state. Using codes something like below :---


void setup()
{
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
}

void loop()
{
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
delay(1000); // Wait for 1000 millisecond(s)

digitalWrite(10, HIGH);
digitalWrite(11, LOW);
delay(400); // Wait for 1000 millisecond(s)
}

Hello Faizanarduino144,
Welcome to the forum.

Please read 'how to use this forum - please read' the go back and edit your code according to the instructions in item #7.

I don't understand why you did not post this in 'Motors and mechanics'. I've asked a moderator to move it.

If you continue to ignore the forum rules you will find people won't be very helpful.

Could you plz help me understand why we use motor drivers like H-Bridge L293D with arduino ? Wherever i searched on the internet they say it is used to rotate motors in clockwise and anticlockwise directions. But i believe we can achieve it with arduino itself by making a pin HIGH and another pin as LOW and then reversing the pin state.

An Arduino pin is not capable of supplying anything like enough current to power a motor and many, most motors need a higher voltage than the Arduino runs on. A motor driver provides this.

Thread moved as requested.

OK so TWO moderators involved.

Really people cmon.

Bob.

Faizanarduino144:
Could you plz help me understand why we use motor drivers like H-Bridge L293D with arduino ?

You can use the Arduino outputs once, ... maybe. After that the chip's outputs are destroyed.

The key is in the word 'driver'. This means a device that can comfortably deliver much more current (usually) to operate something than the device issuing the signal. Compare the current capability (what it can provide) of an Arduino output versus the needs of your motor. Remember, too that an inductive load like a motor will draw considerably more current at startup than while running.

And, don't forget the jolt of the inductive kickback generated when an inductive load is shut off.

Here are the numbers:

Arduino logic output: 5V, 0.04A absolute maximum (meaning 0.02A is the normal limit). Total power output 100mW

miniature motor: 3, 6, 12V, maybe 1A. thats 25 times more current than an Arduino pin, and voltages above 5V, and power in the several watts range

electric drill motor: 20V 25A - 4 times the voltage, 1000 times the current, hundreds of watts.

Basically a logic signal is not power.

I have driven a microscopic motor direct from Arduino pins, but it took two pins per motor connection and schottky diodes for kick-back protection. The motor was a stepper motor 6mm long and 5mm wide even that required 0.06A IIRC - well above a single Arduino pin's ability.

“ I have driven a microscopic motor direct from Arduino pins, but it took two pins per motor connection and schottky diodes for kick-back protection. The motor was a stepper motor 6mm long and 5mm wide even that required 0.06A IIRC - well above a single Arduino pin's ability.”