____________________   >   Atlanta   >   System components   >   New Style   >   Tools   >   Stepper motor driver w. single-step rotary encoder K94

Stepper motor driver w. single-step rotary encoder K94


Digital Encoder Controller Kit
Includes PCB and all components
encoder.zip Kit 94 source code 2K
ecw1j.pdf Kit 94 Bourns Grey Switch encoder Data Sheet
This kit uses a Grey switch (bit switch), to single step a unipolar stepper motor in either direction. Uses a PIC 16C54 plus UCN5804 stepper driver IC.
This circuit illustrates the complex operations that can go on inside modern dedicated integrated circuits. The circuit uses a bi-directional digital rotary encoder from Bourn to step a unipolar stepper motor; one click on the encoder steps the stepper motor one step (or half a step as described below.) This discrete motion can of course then be geared up or down to suit your particular purpose. The stepper motor is not supplied in the kit. Six wire unipolar stepper motors are readily obtainable for a couple of $US. The kit is not designed for 4 wire, bipolar steppers.In this kit, we are using a preprogrammed PIC microcontroller (uC) and a dedicated stepping motor driver IC, UCN5804B to replace what would have formerly been board full of discrete gates such as AND, OR, NOT, etc. followed by a set of power transistors.
The PIC16C54 microcontroller takes the input from a mechanical encoder and converts it to two separate signals; pulse and direction. As the encoder is turned it generates two square waves which are in quadrature - 90 degrees apart. By doing a bit of mathematical manipulation, the microcontroller then works out how far the encoder has turned and in what direction.
Once the direction and magnitude of the rotation has been worked out in the uC, it is sent out as pulse and direction signals to pins 7 and 6, respectively of the UCN5804 stepper motor driver IC.
The 5804 stepper driver is one of those marvellous devices that makes life so easy you wonder how you managed to get along without it. There was a very good article on stepping motors and the use of the 5804 in Electronics Australia Oct and Nov '94. The links page of DIY's site (http://kitsrus.com) lists several on-line sources of information about stepper motors.
The driver will operate six - wire motors at up to 35V and 1.25A. The step input is to pin 7 and direction goes to pin 6 of the 5804. Pins 9 and 10 on the PIC control one phase and half step operation, respectively. Pins 1 - 8 are the connections to the stepping motor. five and eight wire steppers can be adapted to use this kit; see kit 113 documentation which can be downloaded from their website.
Half step and single/double phase refer to methods of operating stepping motors. In one phase operation only one coil attracts the rotor at a time. This is also referred to as wave drive. Alternately, two phase drive energises two adjacent phased in each rotor detent position giving much better torque and speed characteristics.
Half step operation is a combination of one and two phase drives causing the rotor to take twie as many steps per revolution. For a more detailed explanation see the Allegro data shoot on the UCN5804 which can be got from Allegro ( ).
Digital Contacting Rotary Encoder
Also called Digital Panel Control, a Bit Switch, Grey switch or Digital Switch, rotary encoders provide a pair of digital Grey-coded signals that allow a uC to determine the speed and direction of the rotation of a shaft. (For example, a computer mouse uses two digital encoders to track the x and y axis movements of a ball in it.) The PIC16Cxx Applications Handbook by Parallax has a section (section 4) on the details of these encoders. The advantage of the encoder is that it permits the direct entry of digitised analog data into a digital circuit without A/D conversion. The data sheet (zipped pdf file) of the ECW1J Bourne digital contacting encoder used in this kit can be obtained from DIY's website, "kitsrus.com/soft.html/."
DIY Electronics Kits are well-designed for useability, uniqueness, and learning value.
Over 200 Kits in production, offer excellent value, sold the world over for more than 20 years.
Experience at making good solder joints and working with electronics is required.
I am not familiar with the design or workings of any kits. I do not have the skill or competence to state an opinion about design, use, or suitability of any kit in an intended application. All the material available is that provided by the manufacturer.



Stepper motor driver w. single-step rotary encoder K94