Professional Documents
Culture Documents
2. Hardware Requirements:
➢ 1 x Arduino Uno
➢ 1 x Breadboard
➢ 2 x DC Motor
➢ 1 x Battery
➢ 1x motor-driven IC
3. Software requirements:
Tinkercad
4. Theory (Related to IC293D Motor Driver IC):
Arduino Uno:
- Microcontroller board based on the ATmega328P chip.
- Acts as the central control unit, interfacing with sensors and controlling outputs.
Certainly, here are three concise points about the L293D motor driver IC:
H-Bridge Design: L293D utilizes H-bridge circuits to control the direction and speed of DC
motors effectively.
Current and Voltage Handling: L293D can manage currents up to 600mA per channel and
voltages up to 36V, making it suitable for a wide range of motor applications.
Built-in Protection: It features built-in diodes to safeguard the IC and other components from
voltage spikes when the motor stops, enhancing reliability.
Case 3:
Coding:
int enA = 6; // Enable pin for motor A (L293D)
int in1 = 2; // Input pin 1 for motor A
int in2 = 3; // Input pin 2 for motor A
// Motor B connections (connected to Arduino pins)
int enB = 10; // Enable pin for motor B (L293D)
int in3 = 4; // Input pin 1 for motor B
int in4 = 5; // Input pin 2 for motor B
void setup()
{
// Set all the motor control pins to outputs
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
pinMode(in3,OUTPUT);
pinMode(in4,OUTPUT);
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
// At Initial stage turn off both motors (set all control pins to LOW)
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);
}
void loop()
{
// Set motors to maximum speed using analogWrite for pulse-width modulation
// For PWM maximum possible values are 0 to 255
analogWrite(enA, 255);
analogWrite(enB, 255);