So, for DC Motor Direction Control, I have used Arduino UNO baord, so you should also download this Arduino Library for Proteus so that you can use Arduino boards in Proteus software. I have also provide the simulation and the code for DC Motor Direction Control but I would recommend you to design it on your own so that you learn from it. If you have any problem then ask in comments and I will try to resolve them. In this project, I have used Serial Terminal. So, whenever someone, sends character "C" on serial terminal then the motor will move in Clockwise Direction and when someone sends character "A" then it will move in Anti-clockwise Direction and will stop on character "S". Anyways, lets get started with DC Motor Direction Control with Arduino in Proteus ISIS.
int Motor1 = 2; int Motor2 = 3; void setup() { pinMode(Motor1, OUTPUT); pinMode(Motor2, OUTPUT); Serial.begin(9600); } void loop() { if(Serial.available()) { char data = Serial.read(); Serial.println(data); if(data == 'C'){MotorClockwise();} if(data == 'A'){MotorAntiClockwise();} if(data == 'S'){MotorStop();} } } void MotorAntiClockwise() { digitalWrite(Motor1, HIGH); digitalWrite(Motor2, LOW); } void MotorClockwise() { digitalWrite(Motor1, LOW); digitalWrite(Motor2, HIGH); } void MotorStop() { digitalWrite(Motor1, HIGH); digitalWrite(Motor2, HIGH); }
So, that's all for today. Hopefully now you have got the idea of How to do DC Motor Direction Control with Arduino in Proteus ISIS. In the next tutorial, I am gonna add speed control of DC Motor. So, till then take care and have fun. :)
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w