Introduction: Arduino + L298 Motor Driver Integrated

About: I am electronic engineering.

A motor controller is a device that serves to govern in some predetermined manner the performance of an electric motor. A motor controller might include a manual or automatic means for starting and stopping the motor, selecting forward or reverse rotation, regulating the speed and torque, and protecting against overloads and faults.

This Dual Motor Controller is easy to use, thank's to the L298 motor driver chip. This chip allows for direct drive of two bi-directional DC motors, and incorporates high-speed short diodes for protection. Drive current up to 2A per motor output. The driver uses a broad-brush design to reduce wire resistance.

Materyal list:

- 1 x Arduino uno

- 2 x DC motors

- 1 x L298 motor driver integrated

- 1 x 9 - 12V Battery

Step 1: L298 Dual H-Bridge DC Motor Controller

L298 Dual H-Bridge

• Based on popular L298 Dual H-Bridge Motor Driver Integrated Circuit

• Motor supply: 7 to 24 VDC

• Control logic: Standard TTL logic level

• 4 Direction LED indicators

The L298 Dual H-Bridge DC Motor Controller will allow you to easily and independently control two motors of up to 2A each in both directions.It is ideal for robotic applications and well suited for connectionto a microcontroller requiring just a couple of control lines per motor.It can also be interfaced with simple manual switches, TTL logic gates,relays, etc

Step 2: Circuit Design

So the circuit connection is shown in the appendix.

Each motor is controlled by two pins on the motor controller:

OUTA and OUTB connect MOTOR1

OUTC and OUTD connect MOTOR2

INTA ------ pin 6 on Arduino for control MOTOR1

INTB ------ pin 5 on Arduino for control MOTOR1

INTC ------ pin 4 on Arduino for control MOTOR2

INTD ------ pin 3 on Arduino for control MOTOR2

VCC ---- between 4,8V and 48V

GND ---- Common Ground

+5 ---- +5V from Arduino

Step 3: Software and Video

first the motors will rotate in the forward then all motors stop next the motors will rotate in the back.

// Software

int input1 = 3; // Arduino'nun 3. digital pinine bağlanmıştır.
int input2 = 4; // Arduino'nun 4. digital pinine bağlanmıştır.

int input3 = 5; // Arduino'nun 5. digital pinine bağlanmıştır.

int input4 = 6; // Arduino'nun 6. digital pinine bağlanmıştır.

void setup() { // Serial.begin (9600);

//Motorları sürmek için input pinleri çıkış olarak ayarlandı.

//Motors have been set up to drive the input to the output pins.

pinMode(input1,OUTPUT);

pinMode(input2,OUTPUT);

pinMode(input3,OUTPUT);

pinMode(input4,OUTPUT);

}

void loop() { //MOtorlar İleri //forward digitalWrite(input1,HIGH); digitalWrite(input2,LOW); digitalWrite(input3,HIGH); digitalWrite(input4,LOW); delay(1000); //1 saniye bekle //1 second wait

// Motorlar DURSUN // stop digitalWrite(input1,LOW); digitalWrite(input2,LOW); digitalWrite(input3,LOW); digitalWrite(input4,LOW); delay(500); //0,5 saniye bekle //0,5 second wait

//Motorlar Geri // back digitalWrite(input1,LOW); digitalWrite(input2,HIGH); digitalWrite(input3,LOW); digitalWrite(input4,HIGH); delay(1000); //1 saniye bekle // 1 second wait

}

Thanks everybody.