Hello friends, hope you all are fine and enjoying good health. In the previous posts, we have seen How to design a 5V DC power supply in Proteus ISIS and after that we have also discussed How to design a variable DC Power supply using LM317.So, now today we will check how to design a DC Motor Drive Circuit in Proteus ISIS. DC motor is present in Proteus and quite easy to use. First we will simple drive it by applying voltage on its both sides i.e. direct method and after that we will automate it and will drive the circuit using PIC Microcontroller. The microcontroller I am gonna use will be PIC16F877A and the compiler will be MikroC Pro For PIC.

This tutorial is not a correct method of driving any DC motor. In this tutorial, I am just giving an overview of How to design a DC Motor Drive Circuit in Proteus ISIS so you can say this tutorial is more about DC motor in Proteus software. So, don’t try it in hardware. DC motor is a simple motor which needs polarity difference at its two ends. IF this polarity is in forward direction then DC motor moves in one direction and if we reverse the polarity then the DC motor moves in the opposite direction. So, let’s get started with DC Motor Drive Circuit in Proteus ISIS.

#### Simple DC Motor Drive Circuit in Proteus ISIS

• First of all I will show you the simple control of DC Motor in Proteus so that you get an idea how this motor works.
• Add these two components from the Proteus library:
1. Motor
2. Logic State
• Logic State has two states 1 and 0. When its 0 means 0V and when at 1 means 5V.
• Now design the circuit as shown in the below figure:
•  Now I have added two Logic State on both the sides of motor. Direction of motor will depend on these logic. So, their will be total four states:
1. When both states are at 0, motor will not move and remain stationary.
2. When both states are at 1, still the motor will not move and remain stationary.
3. The motor will move Clockwise when upper state is at 1 and lower at 0.
4. The motor will move Anti-Clockwise when upper state is at 0 and lower at 1.

#### DC Motor Drive Circuit Using PIC Microcontroller

• Now we will drive our motor using PIC Microcontroller, add below components from the Proteus library.
•  Join these components and make a circuit as shown in the below figure:
•  Now create a new project in the MikroC Pro For PIC and add the below code into it.

/* Code provided by www.TheEngineeringProjects.com */
#define        M1     PORTB.F7
#define        M2     PORTB.F6
#define        B1     PORTD.F0
#define        B2     PORTD.F1

void main() {
TRISB=0;
TRISD=0xFF;
PORTB = 0;

while(1){
if(B1 == 0){PortB=0xAA;}
if(B2 == 0){PortB=0x55;}
}
}

• Now burn the hex file of this project in the microcontroller of the Proteus file.
• If everything goes well, then when you click one button the motor will move clockwise and when you click other button the motor will move anti-clockwise.
• I have also shown the simulation in the video below.

#### Video Tutorial

• A complete video demonstration of the above tutorial is as follows:

Note:

• The Proteus circuit of DC motor drive and the hex file to burn in the microcontroller has been emailed to all the subscribed members.
• If you need these files, then subscribe to our newsletter and these files will be emailed to you as well.

That’s all about DC Motor Drive Circuit in Proteus ISIS. In the coming tutorial, we will have a look at How to drive a Stepper Motor in Proteus ISIS.

1. i interested with it..
but now i’m having trouble to make a program of my final year project…
will u help me..

2. Hi..i need some help here. im doing a project that need to move 3 motors move 180 degree back and forth in sequence with delay time of 5 seconds each using PIC.this project need only one switch to operate. when the switch is pressed,the first motor will rotate 180 degree back and forth.after the first motor back to its original position,the second motor will operate same as the first motor.same goes to the third motor.the operation stop when the third motor back to its original position.
i need help on circuit diagram as well as coding that can be use in proteus software.

3. N Mohamed Athil says:

Here i need ur help bro i m PG Scholar embedded system major .Give me some tips to do my pg project.my area of specilization is instrumentation + embedded

can you help me with my final year mini project…in this project my lecture want us to do led blinking and when 1 switch have been push the motor will turn anti clockwise for 5 second and clockwise for 5 second…can you give me an idea…

5. Sami Jamal says:

Sir, If i wanna use 8051 microcontroller then for that microcontroller which compiler should i use?
Will MikroC compiler work properly for 8051?
And what in case of ATMEL ATMEGA 8/16/32/..?

6. newaz says:

sir..i subscribed… still not get the Proteus circuit and hex file..

7. SAHIL says:

CAN WE USE 8051 MICROCONTROLLER,AN WHICH PROGRAM TO USEF OR BURNING HEX FILE,I HAVE GENERATED HEX FILE USING U KEIL VISION?

8. Harzallah says:

i receive these message in mikroC when building the project
12 324 Undeclared identifier ‘PORTD’ in expression Motor Work.c