Forward and Backward DC Motor circuit using Arduino and LCD in proteus
In this article we will learn how to make Forward and Backward DC Motor circuit using Arduino and LCD in proteus.
In the last post we will learn how to make Relay ON & OFF circuit in proteus using Arduino nano and LCD display. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.
Components:
- Arduino nano
- LCD display
- DC motor
- Relay (12v)
- Diod (4007)
- Transistor (BC547)
- Resistor (10k)
- Jumper wires
Diagram…
Construction…
- Connect VDD pin of LCD display with +ve
- Connect VSS, VEE, & RW pins of LCD display with each other and then connect them with GND
- Connect D2 pin of Arduino with the pin D7 of LCD display
- Connect D3 pin of Arduino with pin D6 of LCD display
- Connect D4 pin of Arduino with pin D5 of LCD display
- Connect D5 pin of Arduino with pin D4 of LCD display
- Connect D6 pin of Arduino with pin E of LCD display
- Connect D7 pin of Arduino with pin RS of LCD display
- Connect D8 pin of Arduino with one side of resistor 10k
- Connect 2nd side of resistor 10k with signal pin of transistor
- Connect ammeter pin of transistor with GND
- Connect collector pin of transistor with one terminal of Relay 1 through +ve side of Diod
- Connect 2nd terminal of Relay 1 with –ve side of diod
- Common 3rd and 4th terminal of Relay 1 and then connect them with one side of DC motor and +ve
- Connect 5th terminal of Relay 1 with GND
- Connect D9 pin of Arduino with one side of resistor 10k
- Connect 2nd side of resistor 10k with signal pin of transistor
- Connect ammeter pin of transistor with GND
- Connect collector pin of transistor with one terminal of Relay 2 through +ve side of Diod
- Connect 2nd terminal of Relay 2 with –ve side of diod
- Common 3rd and 4th terminal of Relay 2 and then connect them with 2nd side of DC motor and +ve
- Connect 5th terminal of Relay 2 with GND
Hardware Image…
Working…
A DC motor control system using an Arduino and an LCD display typically involves two main components: the forward circuit for clockwise rotation and the backward circuit for counterclockwise rotation
Applications…
- Robotics
- Remote Control Cars
- Conveyor Belts
- Gripper Control
- Smart Irrigation Systems
Advantages…
- Direction Control
- Precision Control
- Feedback and Monitoring
- User Interface
- Automation
Program Images…
Program code…
#include <LiquidCrystal.h>
// Define relay module pins
#define RELAY_IN1 8
#define RELAY_IN2 9
// Define LCD pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
void setup() {
// Set relay module pins as outputs
pinMode(RELAY_IN1, OUTPUT);
pinMode(RELAY_IN2, OUTPUT);
// Initialize the LCD
lcd.begin(16, 2);
lcd.print(“Motor Control:”);
delay(2000);
lcd.clear();
}
void loop() {
// Forward direction
lcd.setCursor(0, 0);
lcd.print(“Forward”);
digitalWrite(RELAY_IN1, HIGH);
digitalWrite(RELAY_IN2, LOW);
delay(7000); // Run forward for 2 seconds
// Backward direction
lcd.clear();
lcd.setCursor(0, 1);
lcd.print(“Backward”);
digitalWrite(RELAY_IN1, LOW);
digitalWrite(RELAY_IN2, HIGH);
delay(7000); // Run backward for 2 seconds
// Stop motor
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Stop”);
digitalWrite(RELAY_IN1, LOW);
digitalWrite(RELAY_IN2, LOW);
delay(7000); // Pause for 2 seconds
lcd.clear();
delay(7000);
}
#include <LiquidCrystal.h>
// Define relay module pins
#define RELAY_IN1 8
#define RELAY_IN2 9
// Define LCD pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
void setup() {
// Set relay module pins as outputs
pinMode(RELAY_IN1, OUTPUT);
pinMode(RELAY_IN2, OUTPUT);
// Initialize the LCD
lcd.begin(16, 2);
lcd.print(“Motor Control:”);
delay(2000);
lcd.clear();
}
void loop() {
// Forward direction
lcd.setCursor(0, 0);
lcd.print(“Forward”);
digitalWrite(RELAY_IN1, HIGH);
digitalWrite(RELAY_IN2, LOW);
delay(7000); // Run forward for 2 seconds
// Backward direction
lcd.clear();
lcd.setCursor(0, 1);
lcd.print(“Backward”);
digitalWrite(RELAY_IN1, LOW);
digitalWrite(RELAY_IN2, HIGH);
delay(7000); // Run backward for 2 seconds
// Stop motor
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Stop”);
digitalWrite(RELAY_IN1, LOW);
digitalWrite(RELAY_IN2, LOW);
delay(7000); // Pause for 2 seconds
lcd.clear();
delay(7000);
}