Stepper Motor ConTroller

A. PREFACE



        There are many integrated stepper motor controller chips selling at the market right now. Stepper motor is a kind of small permanent magnet motor for hobbyist uses (like disk stepper motor drive), I prefer to make it from discrete IC, beside the the price can be cut down to about a half or third the price for dedicated controller. Dedicated controller has many option integrated. When we build it from discrete, this option depends on the purpose or the complexity of the circuits. It also take the layout design more complex compare to dedicated version.

B. SCHEMATIC

        This circuit schematic I got from the book : "Robot Builder - Bonanza" refer to the reference book below for detail, and it purpose to support my little arm robot driver. The driver plan to use all stepper motor type. There are 6 stepper motors, but this circuit only for 4 drivers stepper motor controller, because 2 stepper motors used its own driver. The drive only can move maximum up to ± 360 ° or below it, so to protect the mechanical drive from worn out or over drive, we put the limit switch delimiter circuits. If one of the limit switch touch, move to this direction not allowed (motor stop), but it can move to another direction. For the output driver, because its only take up to 300 mA, I used an ULN driver, this can sink or source up to 500 mA. Of course you can use any transistor driver, like usual, but the layout will be to complex. But my design not a complete state right now, it may be changed to something else when I found difficulty or obstacles. Here are the schematics for this arm robot :
Note that you must grounded pin 4, 7, 9 and 12 of IC type CMOS version 4027 (TTL version 74LS76). I used a CMOS version circuit.
        One of dedicated stepper motor controller chis is UCN5804B, this chip can drive small stepper motor, like our purpose. First I want to use it, but the price is about 2 to 3 times when I wired it from discrete. But it has many options like selected input half step or full step, direction input, enable input. Still a good one to choose.

C. LAYOUT

        I already design the PCB of these circuits. It consists of 3 parts : power supply board, stepper driver board and delimiter control board. But infact I also drawing the circuit using UCN5804B and driver board for stepper motor which has take more than 500mA current. Here are the layouts :

D. STEPPER MOTOR SPECIFICATIONS

        Among stepper motors that I could find until now here are the specifications and many important things about it :
  • Stepper motor ex "TEAC" diskette drive 5.25" :
    • Type : KP-19HMZ-008B
    • 1.8 °/step
    • Japan Servo Co. Ltd. (Singapore)
    • US Paten No. 4.347.457
    • No. 7821
    • Has 6 wires; brown (coil-1), red (CT), orange (coil-2), black (coil-3), red (CT), yellow (coil-4) 
  • Stepper motor ex printer drive :
    • Type : PXB43H-03A-C2
    • 1.8 °/step
    • Rw = 38.5 Ohm
    • Oriental Motor
    • Made in Japan
    • UT7-MN030P7
    • Has 6 wires; blue (coil-1), white (CT), red (coil-2), black (coil-3), yellow (CT), green (coil-4)
  • Stepper motor ex printer drive :
    • Pulse Motor
    • Type : PF3-48
    • 150 Ohm/phase
    • 7.5 °/step
    • 80 mA/phase
    • Nippon Pulse Motor Co. Ltd. Japan
    • Has 6 wires; red (coil-1), white (CT), yellow (coil-2), white/yellow (coil-3), white/green (CT), white/red (coil-4)
  • Stepper motor ex printer drive :
    • Pulse Motor
    • Type : PF42-48C3G
    • 70 Ohm/phase
    • Gear Ratio 1 : 30
    • 170 mA/phase
    • Nippon Pulse Motor Co. Ltd. Japan
    • Has 6 wires; orange (coil-1), red (CT), yellow (coil-2), black (coil-3), red (CT), brown (coil-4)
  • Stepper motor ex "TEAC" diskette drive 3.5" :
    • 14769430-00
    • =0824H
    • PL20S-020-TH03
    • Has no identifier with 4 wires
All the first 4 stepper motors can be connect bipolar or unipolar 2-phase, the last one only bipolar 2-phase.

E. CONVENSION OF TERMINAL USED

        Convension for connectors description :
  • Stepper control boad :
    • CON1~4 : Connect to stepper motor
      • 1 = GND
      • 2 = Coil-2 stepper motor
      • 3 = Coil-1 stepper motor
      • 4 = Coil-3 stepper motor
      • 5 = Coil-4 stepper motor
      • 6 = CT stepper motor (+12V)
    • CON5~8 : Input from computer
      • 1 = Direction, lo = Reverse, hi = Forward
      • 2 = Step pulse, active lo
    • CON9~11 : Input power supply
      • 1 = +5V
      • 2 = GND
  • Stepper driver board :
    • CON1, CON4, CON 9, CON10 : Connect to stepper motor
      • 1 = Coil-1 stepper motor
      • 2 = Coil-2 stepper motor
      • 3 = Coil-3 stepper motor
      • 4 = Coil-4 stepper motor
      • 5~6 = CT stepper motor (+12V)
    • CON2, CON5, CON8, CON11 : Input from stepper control board
      • 1 = Coil-1 stepper control board
      • 2 = Coil-2 stepper control board
      • 3 = Coil-3 stepper control board
      • 4 = Coil-4 stepper control board
      • 5~6 = GND
    • CON3, CON6, CON7, CON12 : Input power supply
      • 1 = +12V
      • 2 = GND
  • 4 stepper drive limit board :
    • CON1, CON3, CON5, CON7 : Input driving
      • 1 = Direction, lo = Reverse, hi = Forward
      • 2 = Step pulse, active lo (input from computer)
      • 3 = Step pulse, active lo (output to stepper control board)
    • CON2, CON4, CON6, CON8 : Input from limit switch
      • 1 = Limit switch reverse
      • 2 = Limit switch forward
    • CON9~11 : Input power supply
      • 1 = +5V
      • 2 = GND
  • 2 stepper drive limit board :
    • CON1, CON3 : Input driving
      • 1 = Direction, lo = Reverse, hi = Forward
      • 2 = Step pulse, active lo (input from computer)
      • 3 = Step pulse, active lo (output to stepper control board)
    • CON2, CON4 : Input from limit switch
      • 1 = Limit switch reverse
      • 2 = Limit switch forward
    • CON5 : Input power supply
      • 1 = +5V
      • 2 = GND
  • Dedicated UCN5804B controller board :
    • CON1 : Input from computer control
      • 1 = Enable output
      • 2 = Direction, lo = Reverse, hi = Forward
      • 3 = Step pulse
      • 4 = Select half / full step
    • CON2 : Connect to stepper motor
      • 1 = GND
      • 2 = Coil-2 stepper motor
      • 3 = Coil-4 stepper motor
      • 4 = Coil-3 stepper motor
      • 5 = Coil-1 stepper motor
    • CON3 : Input power supply
      • 1 = +12V
      • 2 = GND
    • CON4 : Input power supply
      • 1 = +5V
      • 2 = GND

F. ANOTHER KIND OF STEPPER CONTROLLER

        Another kind of stepper controller introduce by elector - elektuur magazine 1996 edition, using a GAL type chip (GAL16V8). This chip can be programmed to be a dedicated stepper controller, same like the dedicated UCN5804B type. But it needs a programmer. Besides that it also cheaper too (about fourth to fifth price from the dedicated controller).  I use GalBlast Ver1.4 type programmer, create by Manfred Winterhoff. It is free with software. This is my GAL programmer prototype, with modification from original. I used a voltage doubler to powered programming voltage, so I can use a single 12V-AC supply. Using GAL16V8 type, it takes 6 inputs (clock, direction, half/full step, step enable, reset, and output enable), and 7 outputs (3 to generate  the binary sequence, and 4 for the output stepper motor). Here is the package before and after modification. First I tried to program using the jedec file created by him, but the file failed crc check. So I compile it again using PLAN2 program (eqn2jed) from National Semiconductor, and make some changes to the equation logic. I plan to use this controller to drive bipolar or unipolar stepper types for my MRD-04 robot and my another projects 'brute' - cnc pcb milling. Below are my stepper motor data :
  • Ex Nema-17 type stepper motor (Same as disk drive 5.25" size) :
    • Model : AX050057A
    • Serial no : STH-39D1102, 23261, 11Y51, 24Y51
    • 2 phase stepper
    • Rating  : 3.2 V - 1.2 A
    • 1.8 deg/step
    • Shinano Kenshi Co., Ltd., Japan
    • Has 6 wires; yellow (coil-1), green (CT), brown (coil-2), violet (coil-3), red (CT), blue (coil-4)
    • Renamed cable colour : yel-yel, gre-blu, bro-bro, vio-bro, red-red, blu-blu
  • Ex Nema-23 type stepper motor :
    • Model : C6244-9212K
    • Serial no : AX06 0081A, SY7 20179 and AX06 0081A, TP7 29279
    • Vexta - Stepping Motor
    • 2 phase stepper
    • Rating : DC 5.7 V - 1.6 A
    • 1.8 deg/step
    • Oriental Motor Co., Ltd., Made in Japan
    • Has 6 wires; blue (coil-1), white (CT), red (coil-2), green (coil-3), yellow (CT), black (coil-4)
  • Ex Nema-23 type stepper motor :
    • Model : STH-54D500
    • Serial no : 127K94120, 31120
    • 2 phase stepper
    • Rating : DC 6.5 V - 1.3 A
    • 1.8 deg/step
    • Thermally Protected
    • Shinano Kenshi Co., Ltd., Japan
    • Has 5 wires; blue (coil-1), white (CT), red (coil-2), green (coil-3), yellow (coil-4)
        Here is the schematic related to the stepper motors above and PCB layout of my GAL stepper controller prototype. Note that +Vcc trace are connect together both for IC/signal and for stepper motor power supply. If stepper motor power used Vcc more than +5V than this trace must be cut out. I used 2 kind of Vcc; ie: +5V and +9V. I can't find the perfect resistance for the coils. For more info about how to determine the resistance, please download the program at http--www.e-zflight.com-files-stepcalc102.zip. The complete GAL 16V8 stepper motor controller package can be obtain here.

G. MODIFIED 5-PHASE STEPPER CONTROLLER

        This is one of the alternative to run bipolar or unipolar stepper motor using my 5-phase stepper controller with changed firmware. First of this firmware ask by a reader (an experimenter), Roberto, who build my CNC concept design. But he has difficulty to find the same stepper motor type like mine (Vexta 5-phase stepper motor, this may obsolete, only can be found at second market/junk market). So he change it to the usual bipolar/unipolar type stepper motor, without change the hardware too much. Very little change to the hardware any way, but the PIC microcontroller must be reprogrammed to support the new step sequence. The PIC still use PIC16F84A type. Change to the I/O map are like this :
  • I/O port A-0 = LED indicator phase-1 stepper
  • I/O port A-1 = LED indicator phase-2 stepper
  • I/O port A-2 = LED indicator phase-3 stepper
  • I/O port A-3 = LED indicator phase-4 stepper
  • I/O port A-4 = Reserved (was changed)
  • I/O port B-0 = Coil phase-1 stepper
  • I/O port B-1 = Coil phase-2 stepper
  • I/O port B-2 = Coil phase-3 stepper
  • I/O port B-3 = Coil phase-4 stepper
  • I/O port B-4 = Input select half/full step (was changed)
  • I/O port B-5 = Input step pulse
  • I/O port B-6 = Input direction
  • I/O port B-7 = Input enable motor
Note that for I/O port A-4 pin, it will become reserved and I/O port B-4 pin, it will become selected input for half or full step. The others are still the same. Here is the complete firmware for this '2-phase stepper controller' by my concept and design. Enjoy the new era!

1 comment:

Followers