Unipolar stepper motor

From RoboCup

Jump to: navigation, search

Project for testing unipolar stepper motors with HB2 module

Based on the example program for bipolar stepper motors, modified by David Mouritzen during Cybercamp 2007, for use with unipolar stepper motors.

Image:unipolar_motor.jpg

Software

We used Cerebot board (based on ATmega64) with UART1 connected to PC's serial port.

Setup:

Connect UART1 to PC, either through a RS-232 level converter, or a bluesmirf module.
Connect the HB2 module to stepper motor through diodes.
Connect HB2 to cerebot.

Download: unipolar_pwm.zip.

Connections:

Image:Up_stepper_schematic_small.png
Zoom

HB2 stepper motor

1A -|<-pin1
2A -|<-pin2
-- pin3 - connect to +5V on cerebot
1B -|<-pin4
2B -|<-pin5

cerebot HB2
T1 DIR1
OC1A EN1
T2 DIR2
OC1B EN2
GND GND


connect TXD1, RXD1, GND and VCC to RS-232 level converter or bluesmirf.


The connections on your stepper motor may be different to find out, measure the resistance between the different pins, there should be one pin with half the resistance of the other pins, connect this pin to the positive supply. You can then try to connect the other pins to ground, one at a time, and see how the motor moves.

We have used PM55L-048-HP69 motor of Minebea Electronics taken from an old HP Deskjet printer.

Running:

On Windows: Compile the program with WinAVR. If running Linux: just make sure you have avr-gcc installed, and run make in the project directory.

Connect with some terminal program (for example HyperTerminal(Windows or minicom(linux)) to virtual serialport.

Download the .hex file with your favourite downloader program (for example Digilent AVR Programmer)

Then you can test controlling the stepper motor.

External Links

Personal tools