DC Motor Direction Control with Arduino in Proteus

Hello friends, hope you all are fine and having fun with life. Today, I am going to share DC Motor Direction Control with Arduino. I have designed a complete simulation in Proteus, which will help you in understanding the controlling of DC motor. I would recommend you to first read How to Control relay in Proteus ISIS which will help you in understanding the functionality of relays because in today's tutorial, I have used relays to do the DC Motor Direction Control. I have already posted a tutorial on DC Motor Drive Circuit in Proteus ISIS.

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.

DC Motor Direction Control with Arduino in Proteus ISIS

  • You can download the Proteus simulation for DC Motor Direction Control by clicking the below button:
Download Proteus Simulation for DC Motor

  • So, now let's move on with designing it, first of all get the below components from Proteus and place them in your workspace:
  • Now, design a circuit in Proteus software, as shown in below figure:
  • You can see in the above figure that I have used two relays which I have used for DC Motor Direction Control.
  • Moreover, there's a Virtual Terminal through which I am sending the commands.
  • I have used Arduino UNO board for DC Motor Direction Control through Virtual Terminal. You should download the Arduino Library for Proteus so that you can use it in Proteus.
  • Now upload the below code in your Arduino software and get the hex file. You should read how to get the Hex file from Arduino.
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);
}
  • In the above code, I have designed three functions which I am calling on Serial receive.
  • The code is quite self explanatory but if you got problem then ask in comments and I will resolve them.
  • Once everything's done then run your simulation and if you have done fine then it will start working as shown in below figure:
  • Obviously, you can't see a moving DC motor in an image but you can get the idea from Relays position in above figure. :)
  • The below video will give you the better idea of How it works.

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. :)

Genuino Library for Proteus

Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a new Genuino Library for Proteus. Genuino boards are just the same as Arduino boards but with slight difference of color and shape. I have already posted a tutorial on Arduino Library for Proteus in which I have explained how to download the Arduino Library and use it in Proteus. Today, I am going to post a similar library but for Genuino boards. Their functionality is exactly the same as the Arduino Library but they have better look and Genuino Color.

II hope you are gonna like this library as well. Other bloggers are welcome to share this library with their reader but do mention our link in creator section, we will be really obliged. Now, let's start with the Genuino Library for Proteus.

Genuino Library for Proteus

  • First of all, download the Genuino Library for Proteus from the below button:
Genuino Library for Proteus

  • In the above link, you will get an rar file which will have two files, named as:
    • GenuinoTEP.LIB
    • GenuinoTEP.IDX
  • Now place these two files in the Library folder of your Proteus software.
Note:
  • Now start your Proteus software and go to Component searching section and search for GenuinoTEP as shown in the below figure:
  • Now place them in your Proteus work space and they will look like as shown in below figure:
  • In the above figure, five of these genuino boards are visible. The sixth board is Arduino Mega1280, which is similar to Arduino Mega 2560 in shape so that's why I have omitted it in the above image.
  • Now you can design any of your project on Genuino board quite easily in Proteus using this Genuino Library for Proteus.
  • In order to upload the code in any of these boards you need to double click it to open its properties.
  • For example I double click the Arduino UNO baord then the Properties panel will look like as shown in below figure:
  • In the above figure, you can see a section named Program file, that's where you are gonna browse your hex file.
  • You should read How to get Hex file from Arduino, if you don't know already.
  • So, get the hex file and upload here and your Genuino board will get active.
  • In the below video, I have explained in detail How to use this Genuino board in Proteus and have already tested the blink example.

That's all for today, I hope you will enjoy this Genuino Library for Proteus. Let me know your suggestions about this library. Have fun !!! :)

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir