Saturday, July 16, 2011

Stepper Motor Project

Since I'm waiting for some more parts to come in for my water level sensor I'm building for our aquaponics project, I thought I'd work on a stepper motor controller.

We use these controllers at work, and I wanted to get more experience with them. The ones at work are driven by a MS-Dos powered 486 computer, with a CIO-DIO24 interface card. These cards are obsolete, expensive ($159), and the PC's are old, bulky, and difficult to upgrade to newer hardware. The code was written in assembly and compiled basic, source code no longer available, and doesn't like newer, faster hardware.

The controller we are using is the SD200 Step Motor Drive Module. These are also obsolete, but still available. They retailed for about $135, but I've seen them online for less than $75.

There are 4 power connections. +5vdc and gnd for the controller, and +12-40vdc and gnd for the motor. Motor current may not exceed 2.5 amps. A low ESR, high ripple current 4700 μf capacitor is installed across the motor inputs, pins 13 & 18.

There are 3 inputs necessary, Enable, CW/CCW, and Pulse. Direction is controlled by applying high or low to the CW/CCW pin. Bring Enable high to activate the controller, and send a pwm signal to the Pulse pin.

There is a startup sequence necessary:

1. Bring Enable low
2. Apply 5vdc
3. Apply motor voltage
4. Bring Enable high

To shutdown the motor:

1. Bring Enable low
2. Drop motor voltage
3. Drop 5vdc

There is overcurrent protection. If there is a short, or the motor pulls more than 2.5 amps, pin 11 (enable) will need to be pulled low, or the shutdown/startup procedure will need to be run to reset. I've written two sub routines, called startup and shutdown, and a third called reset, that I can call from within my program. I've installed transistors on pin 12 & pin 18 so that I can enable/disable module and motor power from these subroutines.

The stepper motor I'm using is a Applied Motion HT17-073.

More details to come!