Wednesday, January 14, 2015

Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]

                                            

Stepper Motor (animation source : wikipedia)

Stepper Motors and It's Working Principles :

In this tutorial I will show , how to interface stepper motor with microcontroller and in this case I will use pic18f2550 microcontroller .Basically stepper motor works step by step .It can rotate 360 degree by the movements of equal steps.They are available stepper motor with steps 200, 180, 144, 72, 24 with rotation angles 1.8°, 2°, 2.5°, 5°, 15° respectively. Stepper motor moves each step at a time where every steps are equal .
Generally stepper motor works on the principle of electromagnetic induction. A internal rotor is surrounded by electromagnetic stators where rotor and stator like to be stable by achieving different poles.In this way the stepper motor rotate .If one stator gets power , thetab stator attracts the rotor .At this situation the rotor rotates so that the stable state can be achieved .If next stator is on and others are off .The motor will complete the next step .

Generally Stepper Motors are Divided into Three Types :



1.Hybrid Stepper Motor
2.Permanent Magnet Stepper Motor
3.Variable Reluctance  Stepper Motor

[Note : If you would like to learn more about Stepper motor with more details ,please follow the link  wikipedia  ]

According to the arrangement of windings the stepper motors are divided into two types :

1.Unipolar Motor
2.Bipolar Motor

Unipolar : 

This type of stepper motor is very popular and  most preferable for the hobbyists .Unipolar stepper motor contains centre tapped  windings inside .In this case coils are connected through a common wire and the poles can be changed without changing the direction of current .That's why the commutation circuit is very simple for unipolar stepper motor .To control a motor through microcontroller we need H-bridge circuit and we use L293D IC  as a replacement of h-bridge circuit . You know motor is one kind generator of electricity  .Due to the effect of magnetic field the rotation makes back emf  and we shouldn't use a MCU to interface directly with motor.That's why we will use L293D .

Bipolar :

This types of motor have no centre taped windings .For achieving reverse magnetic poles the current should be reversed in direction .In order to control this motor we need L293D ic because it is more complex to control .Basically L293D is used  as the alternative of H-bridge circuit .H-bridge circuit is also used to controlling dc motor .


[Note : If you would like to see "How to Interface Unipolar Stepper Motor " ,Please follow the link]

Now at this situation , we have got necessary information  to create a Project .

Proteus Circuit for Bipolar Stepper Motor:

Let's Create a Project on Proteus .Please Follow the instructions given in the pictures .



Please Complete the circuit as Given below . This Circuit is for Unipolar Stepper Motor
 Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]
 Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]

Now Create a Project in MikroC .If you are a beginner , you can follow the instruction :

MikroC Code  for Bipolar Stepper Motor:


Source Code :


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
void main() {
CMCON = 0x07;
ADCON1 = 0x0F;
Trisb=0x00;
delay_ms(1000);
while(1){
PORTB.F0=0;
PORTB.F1=0;
PORTB.F2=0;
PORTB.F3=1;
delay_ms(1000);
PORTB.F0=0;
PORTB.F1=1;
PORTB.F2=0;
PORTB.F3=0;
delay_ms(1000);
PORTB.F0=0;
PORTB.F1=0;
PORTB.F2=1;
PORTB.F3=0;
delay_ms(1000);
PORTB.F0=1;
PORTB.F1=0;
PORTB.F2=0;
PORTB.F3=0;
delay_ms(1000);
}
}

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

How to run the MikroC and save hex file .

Now go to the proteus circuit to load the hex file
Run the Project

Result :

 Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]
 Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]



                                                      Download Proteus File

                                                       Download Source Hex



                      Just Click on  '' SKIP ADD '' and You will get the download link




Thank You !



Unipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]

                                             Unipolar Stepper Motor


animation source :wikipedia

Stepper Motors and It's Working Principles :

In this tutorial I will show , how to interface stepper motor with microcontroller and in this case I will use pic18f2550 microcontroller .Basically stepper motor works step by step .It can rotate 360 degree by the movements of equal steps.They are available stepper motor with steps 200, 180, 144, 72, 24 with rotation angles 1.8°, 2°, 2.5°, 5°, 15° respectively. Stepper motor moves each step at a time where every steps are equal .
Generally stepper motor works on the principle of electromagnetic induction. A internal rotor is surrounded by electromagnetic stators where rotor and stator like to be stable by achieving different poles.In this way the stepper motor rotate .If one stator gets power , thetab stator attracts the rotor .At this situation the rotor rotates so that the stable state can be achieved .If next stator is on and others are off .The motor will complete the next step .

Generally Stepper Motors are Divided into Three Types :


1.Hybrid Stepper Motor
2.Permanent Magnet Stepper Motor
3.Variable Reluctance  Stepper Motor

[Note : If you would like to learn more about Stepper motor with more details ,please follow the link  wikipedia  ]

According to the arrangement of windings the stepper motors are divided into two types :

1.Unipolar Motor
2.Bipolar Motor

Unipolar : 

This type of stepper motor is very popular and  most preferable for the hobbyists .Unipolar stepper motor contains centre tapped  windings inside .In this case coils are connected through a common wire and the poles can be changed without changing the direction of current .That's why the commutation circuit is very simple for unipolar stepper motor .

Bipolar :

This types of motor have no centre taped windings .For achieving reverse magnetic poles the current should be reversed in direction .In order to control this motor we need L293D ic because it is more complex to control .Basically L293D is used  as the alternative of H-bridge circuit .H-bridge circuit is also used to controlling dc motor.

[Note : If you would like to see "How to Interface Bipolar Stepper Motor ", Please follow the link]

Driving Operation of Stepper Motor :


Wave drive Operation (One becomes On at a time) :
In this case each stator gets power at a time and the rotation continues to the next .

 Unipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]
 Bipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]



Full Step Drive Operation(Two  become On at a time) :
In this case two stators get power at a time and the rotation continues to the next .This is very popular method .
 Unipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]





Half Drive Operation(One or Two  become On at a Time) :

In this case one or two stators get power and this makes the rotation of  half drive operation .
 Unipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]
  Unipolar Stepper Motor Interfacing With PIC Microcontroller (PIC18F2550) in Proteus [step by step]



Share and Bookmark this Blog

Tags

: (1) 18F2550 (1) 36KHz (3) and (1) Based (1) battery (1) Bipolar (1) Blinking (1) blinks (1) Bluetooth (1) bluetooth device interfacing (1) bluetooth module (1) button (1) circuit (1) clock (1) control (1) crystal oscillator (3) Db9 (1) DC Motor (2) digital (2) Digital Voting Machine (1) digital voting machine using pic (1) display (2) DS1307 (1) electronic (1) embedded c programming tutorial (11) embedded c tutorial (11) experiment kit (4) external interrupt (4) flash (1) flashing (1) Gas Leakage detector (1) HC-06 (1) home (1) how (1) How to (10) i2c tutorial (1) in (1) indicator (1) infrared Connection (3) interface (8) interfacing (3) Interrupt (3) Introduction (1) IR Connection (3) IR Receiver (4) IR Transmitter (4) key pad (1) keypad (1) lavel (1) Lcd 16x2 (2) lcd 2x16 (2) led (1) lm35 (2) LPG (1) machine (1) make (1) Make bootloader (1) making (1) matrix (1) max232 (1) membrane keyboard (1) meter (2) Micocontroller (1) microchip (4) microchip pic (2) microchips (3) microcontroller (9) microcontroller based (3) microcontroller programming (3) Microcontroller Project (4) Microcontroller Projects (1) microcontroller_project (2) microcontrollers (4) Microprocessor (2) mikroC (5) mikroc code to start and stopstart and stop dc motor (1) mikroc pro for pic (2) Motion detector (1) MQ-9 Gas Sensor (1) musical (1) NEC Protocol (4) pcb (5) PIC (3) pic controller (11) pic microcontroller (11) pic microcontroller tutorial (11) pic programming (1) pic programming in c (12) pic proteus (1) Pic Tutorial (12) pic18 (2) pic18f2550 (11) picmicrocontroller (4) picRFモジュール (1) PIR Motion Sensor (1) printed circuit board (1) proteus (6) pulse width modulation (1) push (1) push button (1) PWM (1) real (1) rf transmitter (3) Rs 232 (1) Rs232 (1) scroll (1) scrolling (1) Serial communication (1) Serial Connection (1) Serial Port (1) serial port rs232 (1) Servo Motembedded c programming tutorial (1) simulation (2) Soil Moisture Meter (1) speed control (1) step by step (7) step bystep (1) Stepper Motor (2) text (2) Thief Detector (1) time (1) timer (4) timer0 (4) tone (1) TSOP38236 Receiver (4) tutorial (2) Unipolar (1) USART Connection (1) USB (1) usb 1.0 (1) USB bootloadere (1) USB HID (1) using (9) voltmeter (1) voting (1) water level indicator (3) with (2) work (1)

Live Traffic Feed


Live Traffic Feed
Live Traffic Feed

Comment Option isn't working properly

Comment option isn't working properly. If you have anything to say, you are requested to use the "Contact Form" below here.

Leave Your Message Here

Name

Email *

Message *

Google+ Followers

Like on Facebook