fbpx

Interface Stepper Motor With AVR

Description

A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movement or steps. This motor divides a full rotation of 360 degrees into a number of equal steps.

Stepper Motor Types

  • Stepper Motors are classified into two, based on its winding arrangement.
    1.Unipolar Motors.
    2.Bipolar Motors.

Uni-Polar

  • A unipolar motor has center-tapped windings.
  • By center connection, coils are tied together and used as the power connection.
  • By this arrangement, a magnetic pole can be reversed without reversing the direction of the current.

Bi-Polar

  • Bipolar motor has no center tap connections.
  • Current through a winding should be reversed to reverse the magnetic poles.
  • So the driving circuit should be more complicated.
  • We can solve this by using an H-bridge connection or by using ready-made chips such as L293D.

Driving of Stepper Motor: Stepping Modes

  • There are three types of stepping modes.
    1.Wave Drive: One at On a Time.
    2.Full Drive: Two at On a Time.
    3.Half Drive: One or Two On at a Time.

Wave Drive

  • Only one stator electromagnet is energized at a time.
  • The torque is significantly less.
  • It is rarely used.

Wave Drive Stepping Sequence

Half Drive

  • One and two phases are energized alternatively.
  • Increase the angular resolution of the motor but the torque is less approximately 70%.

Half Drive Stepping Sequence

Full Drive

  • Two stator electromagnets are energized at a time.
  • The motor will run at its full torque.

Full Drive Stepping Sequence

L293D Motor Driver

  • L293D is an H-BRIDGE dc motor controller, which can control dc motor up to 36V.
  • Driver allows dc motor to rotate in both directions,which can interface and control two motors at a time with microcontroller.
  • Driver allows voltage to flow in both direction hence motor can rotate in both clock and anti-clock direction.

Direction Table

Hardware Required

  • Stepper Motor.
  • L293D Motor Driver.
  • Atmega16 MicroController.

Circuit Stepper Bipolar

Circuit Stepper Unipolar

Virtual Circuit

Code

 #include <avr/io.h>
 #include <util/delay.h>
 int main(void)
 {
 DDRC=0xff;
 PORTC=0x00;
 while(1)
 {
 PORTC=0x03;
 _delay_ms(500);
 PORTC=0x06;
 _delay_ms(500);
 PORTC=0x0c;
 _delay_ms(500);
 PORTC=0x09;
 _delay_ms(500);
 }
 } 

Leave a Reply

Your email address will not be published. Required fields are marked *