Silicon ChipControl Stepper Motors With Your PC - January 1994 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Some Australian companies still do not give good service
  4. Book Store
  5. Feature: The World Solar Challenge by Brian Woodward
  6. Feature: Electronic Engine Management; Pt.4 by Julian Edgar
  7. Project: 40V 3A Variable Power Supply; Pt.1 by John Clarke
  8. Order Form
  9. Feature: Luxman A-371 Amplifier & D-351 CD Player by Leo Simpson
  10. Feature: Active Filter Design For Beginners by Elmo Jansz
  11. Project: A Switching Regulator For Solar Panels by Otto Priboj
  12. Project: Printer Status Indicator For PCs by Darren Yates
  13. Project: Simple Low-Voltage Speed Controller by Darren Yates
  14. Vintage Radio: Realism realised - the Precedent console receiver by John Hill
  15. Serviceman's Log: It was all a long time ago by The TV Serviceman
  16. Feature: Computer Bits by Darren Yates
  17. Back Issues
  18. Feature: Remote Control by Bob Young
  19. Project: Control Stepper Motors With Your PC by Marque Crozman
  20. Review: Kenwood's DCS-9120 Oscilloscope by John Clarke
  21. Product Showcase
  22. Notes & Errata: Solar-Powered Electric Fence, April 1993; UHF Remote Switch, December 1989 & August 1990
  23. Market Centre
  24. Advertising Index
  25. Outer Back Cover

This is only a preview of the January 1994 issue of Silicon Chip.

You can view 29 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Darwin To Adelaide On Solar Power (October 1993)
  • The World Solar Challenge (November 1993)
  • The World Solar Challenge (January 1994)
Articles in this series:
  • Electronic Engine Management; Pt.1 (October 1993)
  • Electronic Engine Management; Pt.2 (November 1993)
  • Electronic Engine Management; Pt.3 (December 1993)
  • Electronic Engine Management; Pt.4 (January 1994)
  • Electronic Engine Management; Pt.5 (February 1994)
  • Electronic Engine Management; Pt.6 (March 1994)
  • Electronic Engine Management; Pt.7 (April 1994)
  • Electronic Engine Management; Pt.8 (May 1994)
  • Electronic Engine Management; Pt.9 (June 1994)
  • Electronic Engine Management; Pt.10 (July 1994)
  • Electronic Engine Management; Pt.11 (August 1994)
  • Electronic Engine Management; Pt.12 (September 1994)
  • Electronic Engine Management; Pt.13 (October 1994)
Items relevant to "40V 3A Variable Power Supply; Pt.1":
  • 40V 3A Variable Power Supply PCB pattern (PDF download) [04202941] (Free)
Articles in this series:
  • 40V 3A Variable Power Supply; Pt.1 (January 1994)
  • 40V 3A Variable Power Supply; Pt.2 (February 1994)
Items relevant to "A Switching Regulator For Solar Panels":
  • 72W Switching Regulator for Solar Panels PCB pattern (PDF download) (Free)
Items relevant to "Printer Status Indicator For PCs":
  • DOS software for the Printer Status Indicator (Free)
  • Printer Status Indicator PCB patterns (PDF download) [06101941/2, 07101941] (Free)
Items relevant to "Simple Low-Voltage Speed Controller":
  • Simple Low-Voltage Speed Controller PCB pattern (PDF download) [09111931] (Free)
Items relevant to "Computer Bits":
  • Games Card Breakout PCB [07103941] (PCB Pattern, Free)
  • DOS software for Computer Bits, November 1993 & January/February 1994 (Free)
Articles in this series:
  • Experiments For Your Games Card (January 1992)
  • Computer Bits (November 1993)
  • Computer Bits (January 1994)
  • Computer Bits (February 1994)
  • Computer Bits (April 1994)
Articles in this series:
  • Remote Control (October 1989)
  • Remote Control (November 1989)
  • Remote Control (December 1989)
  • Remote Control (January 1990)
  • Remote Control (February 1990)
  • Remote Control (March 1990)
  • Remote Control (April 1990)
  • Remote Control (May 1990)
  • Remote Control (June 1990)
  • Remote Control (August 1990)
  • Remote Control (September 1990)
  • Remote Control (October 1990)
  • Remote Control (November 1990)
  • Remote Control (December 1990)
  • Remote Control (April 1991)
  • Remote Control (July 1991)
  • Remote Control (August 1991)
  • Remote Control (October 1991)
  • Remote Control (April 1992)
  • Remote Control (April 1993)
  • Remote Control (November 1993)
  • Remote Control (December 1993)
  • Remote Control (January 1994)
  • Remote Control (June 1994)
  • Remote Control (January 1995)
  • Remote Control (April 1995)
  • Remote Control (May 1995)
  • Remote Control (July 1995)
  • Remote Control (November 1995)
  • Remote Control (December 1995)
Items relevant to "Control Stepper Motors With Your PC":
  • DOS software for Stepper Motor Control (Free)
  • Stepper Motor PC Interface PCB pattern (PDF download) [07201941] (Free)
Control stepper motors with your PC Ever wondered how stepper motors work & how you might control them using your PC? This article gives you the answers & presents a design for a stepper motor controller. By MARQUE CROZMAN Having a computer is one thing but haven’t you always wanted it to do something in the real world? Robots and computer controlled mechanical devices have always created intrigue for young and old alike but the problem has always remained: how can you easily control mechanical devices with your computer. A partial answer is sitting inside your very own PC at home. In each floppy and older hard disc drives sits a little stepper motor that accurately positions the heads over the sur­face of the disc. When hard discs and floppies die it 80  Silicon Chip usually is not the fault of the stepper. Normally it is either a case of the heads taking a nose dive into the disc or the spindle motor reaching the end of its life-span. This opens a rich supply of small stepper motors just waiting to be put to use in robots and toys, as well as more serious endeavours such as controlling antennas, plotters, servo systems and NC mach­ines; your imagina­tion is the only limit. Steppers are not like normal motors. When you apply power to them, they will only move through a small arc and stop, as op­posed to a regular motor that just keeps turning. They are thus highly suited to numerical positioning, where computers store positions as discrete numbers. Stepper motors can be used in an open loop system; ie, you can operate them without feedback. All other methods of accurate positioning require feedback to let the system know what the current position of the motor is and to correct it if there is an error. One common method used with steppers is to rotate the stepper until whatever is being moved reaches a limit switch. The controller then has a reference point to work against and therefore it knows where the stepper is. If you listen to a floppy drive power up, you will hear it find its reference point. The drive controller will then know how many steps to move the head to read a given track. With a more conventional motor, the magnetic attraction between the motor’s stator and rotor causes the rotor to turn in an attempt to make the poles align. By continually moving or advancing the field, by AC or brushes and split commutator, the rotor keeps turning. A stepper motor, on the other hand, lets the rotor’s magnet­ic field line up with the stator, as a compass does when you bring a magnet near to it. We can further this analogy by imagin­ ing a large number of magnets around the circumference of a compass. By switch­ing their magnetic attraction on and off, we could have the needle of the compass rotate, by energising each magnet in turn. Thus, we could stop the needle of the compass at any point by stopping the switching sequence. The magnets in the stator of a stepper motor consist of a ring with iron teeth. Each tooth has a coil wound on it, so that it becomes an electromagnet when it is energised. A coil on the opposite side of the stator is energised in opposition to create the other pole – see Fig.1(a). Increasing the number of teeth on the ring in­creases the resolution of the stepper; ie, the number of steps per revolution. We can also double the resolution if we switch on two adjacent magnets, making the rotor come to rest midway between two poles. This is called half stepping and also has the effect of increasing the available torque – see Fig.1(b). Steppers generally have quite a high number of poles or steps per revolution, with 100 to 400 being common. This is not to say that there are that many electromagnets in the stator. By placing teeth in the rotor as well, the number of poles will be effectively multiplied by the number of teeth in the rotor. So if there are 3 stator poles and 8 teeth in the rotor, the stepper will have 24 steps per revolution or a 15 degree step angle. Using a digital controller to energise the stator coils gives the sort of control you could expect from a normal DC servo but without feedback. All that has to be done is to calculate how many turns (or degrees) you want, then send that many steps to the motor. The rate at which you send the steps controls the speed or angular velocity of the shaft. Types of stepper motor Stepper motors can be divided into three basic classes: variable reluc- An assortment of stepper motors. The top middle motor is a variable reluctance type with a rotary encoder on the rear of the shaft, while at bottom left is a rare earth disc stepper. The rest are hybrid types. The motor at bottom right is typical of the steppers found in floppy & hard disc drives. S SHAFT STATOR S STATOR POLE SHAFT (a) STATOR POLE ROTOR ROTOR N STATOR N (b) Fig.1(a) at left shows a hybrid stepper motor with one stator pole energised. The nearest rotor pole moves to align itself with the energised pole (the other stator coils have been omitted for clarity). Fig.1(b) shows a hybrid stepper with two stator coils energised. In this case, the nearest rotor pole moves to align itself between the energised poles. tance, permanent magnet and hybrid. Variable reluctance motors have a soft iron multi-tooth rotor. You can recognise this type by rotating the shaft with your fingers. As the rotor has no magnetism, it rotates freely without poling, whereas permanent magnet and hybrid types have magnetic rotors and pole or “cog” when turned. Variable reluc­tance steppers are renowned for their high stepping rates and accuracy. Permanent magnet steppers have a toothless rotor which is radially magnetised, with alternating poles. The stator has two halves, each of which contains a coil. The rotor’s poles are attracted to the stator coils when energised. The rotor remains attracted to the closest stator pole even when no power is ap­plied, giving a “detent” torque. These steppers are economically competitive but suffer in terms of accuracy and speed in compari­son to other types. Hybrids are the most popular style of stepper and are the most common in computer equipment. The hybrid combines the stator of the variable reluctance type and the rotor of the permanent magnet stepper to produce a motor with high detent, holding and dynamic torque while retaining high stepping rates. The newest type of stepper motor is a variation on the permanent magnet type – the rare earth permanent magnet stepper – see Fig.2. These are also known as disc magnet steppers. The rotor is a thin disc which is axially January 1994  81 Table 1: Wave Stepping SHORT MAGNETIC CIRCUIT USING HIGH QUALITY IRON LAMINATIONS Step Phase 1 Phase 2 Phase 3 Phase 4 1 ON – – – 2 – ON – – 3 – – ON – 4 – – – ON NO MAGNETIC COUPLING BETWEEN PHASES Table 2: Two Phase Stepping Step Phase 1 Phase 2 Phase 3 Phase 4 1 ON ON – – 2 – ON ON – 3 – – ON ON 4 ON – – ON Table 3: Half Phase Stepping Step Phase 1 1 2 LOW INERTIA ROTOR Fig.2: layout of a permanent magnet stepper motor. This particular layout is for one of the new rare earth magnet disc steppers. Note that the magnets are axially aligned with the rotor. magnetised. This results in a motor with a very low moment of inertia, high acceleration and good dynamic behaviour. Disc magnet steppers outperform all other types. They are the most efficient and have by far the highest holding torque and power output per kilogram of motor, superior accuracy and high start/stop frequencies – see Fig.5. Identifying the sex of motors There are two methods of winding stepper motors – unipolar and bipolar, as shown in Fig.3. Bipolar steppers have one winding on each stator pole (monofilar wound). The magnetic polarity of the stator pole is changed by reversing the current in the coil. Reversing the current through the coil requires a circuit capable of switching polarity. Unipolar steppers have two coils per stator pole, one for each direction (bifilar wound). Changing the direction of move­ment involves switching the current from one coil to the other. Phase 2 Phase 3 Phase 4 ON – – – ON ON – – 3 – ON – – 4 – ON ON – 5 – – ON – 6 – – ON ON 7 – – – ON 8 ON – – ON Commonly, the two coils have a common connection to reduce the number of wires exiting the motor. The power supply can be much simpler than that for the bipolar, as you simply need single switches to turn different coil segments on and off. However, uni­ polar steppers have a lower torque than bipolars because only half of each winding is energised at a time – see Fig.4. Identifying steppers is easy. Bipolar steppers have four leads and unipolars have either five or six. Reading the V+ PHASE V+ PHASE OR FOUR LEADS 2 PHASE FIVE LEADS SIX LEADS 4 PHASE Fig.3: the diagram at left shows a bipolar winding arrangement, while at right are two unipolar winding arrangements. In the unipolar arrangement, only one half of the coil on each stator is energised at any given instant. 82  Silicon Chip (a) (b) Fig.4(a) at left shows a unipolar switch, while Fig.4(b) shows a bipolar (or H-bridge) switch. The unipolar drive arrangement only needs one switch per coil whereas the bipolar drive requires four switches per coil. The photo above shows the pole arrangement of a rare earth permanent magnet stepper motor. Its rotor is damaged but the axial rare earth magnet segments in the remaining thin disc section can still be clearly seen. At right is the view inside a hybrid stepper motor. Note that both the magnetic rotor & the stator have teeth. The stator coils can also easily be seen in this photo. It has the sequence of 1, 12, 2, 23, 3, 34, 4, 41, 1 or in the opposite direction, 1, 14, 4, 43, 3, 32, 2, 21, 1. The torque produced increases because the step length is reduced and each alternating step has two windings energised. The positional accuracy is also increased but it means that two steps have to be sent for every previous single full step. The power supply will also need to be of the same capacity as the two-phase drive – see Table 3. 12 9 LOSS (WATTS) name plate will also give an idea as to what type it is. To make the motor step, power is applied to each coil in turn. Steppers have three different stepping formats: wave, two-phase and half-step sequences. Each has its own advantages and disadvantages. Wave drive energises one coil at a time and the sequence is 1, 2, 3, 4, 1 or 1, 4, 3, 2, 1, depending on direction. Wave drive is the most economical as the power supply has only to provide enough current to drive one coil at a time, making it less expen­sive – see Table 1. Two-phase drive is similar to wave drive as far as step length is concerned but consists of energising two adjacent coils at the same time. The coils are energised in the order 12, 23, 34, 41, 12 or 14, 43, 32, 21, 14, depending on the direction. This increases the amount of torque produced over the wave-drive, as the rotor moves from the tug of two energised windings to the tug of the next two energised windings. The disadvantage is that the power supply requirements are increased – see Table 2. Half-stepping alternates between wave and two-phase step­ping to double the number of steps per sequence. HYBRID 200 STEPS/REV 6 DISC MAGNET 100 STEPS/REV 3 0 0 2500 5000 SPEED (STEPS/SECOND) 7500 10000 Fig.5: comparison of losses between hybrid & rare earth permanent magnet disc stepper motors operating at the same torque. The cheapest source of stepper motors is discarded floppy and older hard disc drives. Computer repair companies usually have a whole hoard of goodies from dead machines and will part with them for a token price. Ram Computers at Manly, NSW is one place that has a whole stock of steppers from printers, floppies, hard discs and other various bits of dead equipment. Stepper controller board This has been designed to be as flexible as possible and can be run from any parallel printer port. It will drive two steppers, either unipolar or bipolar types, or both. In the IBM PC compatible, the printer port is normally latched, in that once the data has been written to the port, it remains there until more data is written to it. This is not the case with some other computers though. Using a latch on the card fixes the problem with unlatched printer ports but there is another advantage. It allows us to implement selectable addressing. One parallel port can then drive up to four cards, each with its own address, giving control of up to eight motors simultaneously. January 1994  83 VCC IC6a 74HC04 14 2 16 11 1 10 13 12 IC6f IC2 74HC139 15 1 5 11 IC6e 10 IC4d 7406 9 +12V VCC 14 10k 8 1k B 8 C 6 DB25 MALE CONNECTOR STROBE AUTOFEED INIT SELECT D0 D1 D2 D3 D4 D5 D6 D7 IC6d 9 1k 8 B 7 14 2 1 1 14 2 16 3 Q1 BD682 C Q2 BD681 3 MOTOR 1 E 13 3 19 2 IC4c 16 5 10k 1k Q3 BD682 B D0 D1 D2 D3 11 2 18 3 3 4 17 5 4 6 14 7 7 12 8 13 1 9 8 1k 20 IC1 74HC374 Q4 BD681 B +12V Q5 BD682 E B +12V 4 17 E 4 E Q6 2 C BD681 B E RC SEE TEXT C D4 D5 D6 D7 20 15 6 22 14 2 10 11 IC7e 74HC04 14 10 11 5 6 13 3 IC7c IC3 74HC139 16 VCC 6 1 IC7a 2 VCC IC5a 10k 7406 14 2 1 5 1k B 13 IC7f 1k 12 B 7 15 7805 GND 560  1 VCC 1k 1k 1 16VW Q10 BD681 4 MOTOR 2 Q11 BD682 B E  B C 3 C Q14 1 C BD681 B 2 E C C I GO STEPPER MOTOR CONTROLLER 8 IC5d 9 1k +12V K B CE 10k 1k E C RC SEE TEXT A 84  Silicon Chip Q12 BD681 +12V Q13 BD682 E B E 0V LED1 13 C +12V +12V 1k IC4f Q9 BD682 E 10k IC5b 3 4 OUT Q8 BD681 B 12 E +12V IN 10k 1k +12V C 8 Q7 BD682 B RC SEE TEXT VCC 24 1k E 12 9 21 23 11 +12V C 19 IC4e E C E VCC 10 C 1 C 10k 1k E RC SEE TEXT Q15 BD682 B 10k 1k Q16 BD681 B 1k 6 IC5c 5 Q14 Fig.7: refer to this diagram for the lead colours & pin connections when connecting the stepper motor to the controller board. Note that the centre taps for a unipolar stepper are tied directly to the +12V supply rail. Warning – some steppers use a different colour coding & you may need a multimeter to sort out the windings. the printer port, viz, Strobe, Autofeed, INITialise or Select. These are by way of links on the PC board and are select­ ed when you build it. In this way, it is possible to build four separate controller boards and have them all running from the printer port simultaneously. The software does the selection for each controller; ie, the relevant line is toggled for the data sent to each controller. The four least significant bits (D0D3) are used to control motor 1 while the four most significant bits (D4-D7) control motor 2. Unipolar motors The circuit description above refers to bipolar stepper motors. If you propose to use unipolar motors, the H-bridges are not required. Instead, the buffered outputs from IC6 and IC7 directly drive the NPN Darlington Q6 Q8 1k 1k 1k 1k 10k 1k 10k PIN4 YEL Fig.8: install the parts on the PC board as shown here & note that those transistors & ICs marked with an asterisk can be omitted if the board is to control a unipolar stepper motor. Refer to the text for the linking options at top left. Q16 Q10 4 Q9  Q11  Q15 3 MOTOR 2 2 1  SE E TEXT 10k 10k 1k 10k 1k 10k 1k 1k 1k 1k Q12  Q13 RC 1uF PIN3 WHT 1 1k 1 PIN2 BLU PIN3 +12V PIN4 GRN WHT GRN/ WHT I C5 7406 1 RC 7805 Q4 I C4 7406 1 0V  Q1  Q5 1k 10k 1 1k 1 10k 1 IC2 74HC139 K Q7 IC6 74HC04 LED1 IC7 74HC04 +12V IC3 74HC139 4 3 2 1 560  MALE DB25 PIN2 RED/ WHT 1k MOTOR 1 1 2 3  Q3 4 Q2 RC The circuit of the controller board is shown in Fig.6. Essentially, the printer is connected to IC1, a 74HC374 octal D latch. This can be considered as eight D-type flipflops with one common latch enable or clock input, pin 11. Data can be loaded into the eight inputs and then when the latch enable pin goes high, that data appears at the eight outputs (pins 19, 2, 16 & 5 and pins 15, 6, 12 & 9). To send a byte of data to the controller, the computer writes a byte of data to the printer port and then toggles pin 11 high. This data then appears on the outputs of the latch, as noted above. The output lines drive a pair of PIN1 RED +12V BLK RC How it works PIN1 RED 1k Having a latch on the card is also useful if you are not using a printer port but perhaps driving the card from a micro­ controller such as the Southern Cross Z80 computer recently described in this magazine. In this case, the end section of the board that has the DB25 connector on it can be removed, leaving a header that ac­cepts 8 data lines and an enable line. However, we are getting ahead of ourselves. 74HC139s, which are dual two to four line decoders. Pins 5 and 6 of IC2 are the used outputs for the first decoder (two outputs are unused) and pins 10 and 11 are the used outputs for the second decoder. IC6 inverts the decoder outputs from active low to active high for the driver circuit. The driver circuit is an H-bridge comprising transistors Q1, Q2, Q3 and Q4. Q1 and Q2 are complementary switches so that when Q1 is on, Q2 is off and similarly when Q3 is on, Q4 is off. All four switches can be operated in such as way that the supply voltage is applied to the motor coil with one polarity or the other, or all four switches may be off so that no power is ap­plied to the coil. The state of the switches is controlled by decoder IC2 which only responds to valid data at its inputs. Note that IC6 only controls the NPN transistors in the H-bridge. The PNP transistors are driven by IC4, a 7406 hex invert­er with open collector outputs. IC4 is there for two purposes. First, it provides level translation from the 5V (TTL) outputs of IC6 to the 12V bridge circuit and second, it inverts the signals again to give the correct sense for the PNP transistors. IC2 controls two H-bridges, the second comprising Q5-Q8, and this acts in the same way, to control one motor (with two coils). IC3, its associated buffers (IC5 and IC7) and the H-bridge drive the second stepper motor. Note that pin 11 of IC1 is shown as connected to one of four lines from IC1 74HC374 ▲ Fig.6 (left): data from the printer board is latched into IC1 & decoded by IC2 & IC3 which each drive two H-bridges. Each pair of H-bridges then drives one stepper motor. Note that for unipolar stepper motors, the H-bridges are not required & therefore IC4, IC5 & the PNP transistors can be omitted (see text). January 1994  85 Table 2: Resistor Selection 5V stepper current rating Current limiting resistor 500mA 15R 800mA 8R2 1A 6R8 1.5A 4R7 Table 5: Motor Codes Phase Energised Motor 1 (HEX) Motor 2 (HEX) 1 01 10 2 02 20 3 04 40 4 08 80 Table 6: Debug To load a byte into the controller o 378 (mcode) Load motor code into port A o 37A 05 Assert card1’s latch enable low 0 37A 04 Pull the latch enable high to load the data into the latch q Quit from using debug Table 7: Motor Outputs Phase Motor 1 Motor 2 Output 1 D0 D4 1+ 2 D1 D5 3+ 4- 3 D2 D6 1- 2+ 4 D3 D7 3- 4+ 2- Table 8: Card Selection Card Selected Printed Signal Port C Value (HEX) No card selected – 04 Card 1 -STROBE 05 Card 2 -AUTOFEED 06 Card 3 +INIT 00 Card 4 -SELECT 0C transistors; ie, Q2, Q4, Q6 and Q8 for IC6 and Q10, Q12, Q14 and Q16 for IC7. IC4, the PNP tran­sistors and their resistors can be omitted. Similarly, for the second motor, IC5, the PNP transistors and their resistors can be omitted. Note that the centre taps of the motor winding are then connected to +12V – see Fig.7. Putting it together The stepper motor controller board 86  Silicon Chip measures 187 x 103mm and is coded 07201941. It has a DB-25 male socket at one end and two lines of plastic transistors at the other – see Fig.6. Start assembly by checking the board against the printed artwork for flaws such as bridges between tracks or broken tracks. These should be repaired with a utility knife or solder­ing iron if needed. Assuming all is well, construction can com­mence with the PC pins and wire links. If the board is being built for 12V steppers, install wire links in place of the current limiting resistors R1-R4. 5V steppers will require the current limiting resistors, as specified in Table 4. The resistors and the 1µF electrolytic capacitor can go in next, followed by the 4-way, 2-pin header for address selec­tion. This done, install the 5V regulator and LED, making sure they’re in the right way. If you desire, IC sockets can be used for all the integrat­ ed circuits. Otherwise, directly solder in all the ICs, taking care while handling them, as most are CMOS devices. As noted above, if the board is being constructed to cater for unipolar motors only, ICs 4 and 5 may be left out, as can all the PNP Darlingtons and associated resistors. All these components are marked with an asterisk on the component overlay diagram of Fig.8. Lastly, install the male DB25 plug. Be careful not to bridge any pins together whilst soldering it in, as it can be quite fiddly. Bridging could lead to some fairly weird problems later on. PARTS LIST 1 PC board, code 07201941, 187 x 103mm 1 DB25 right-angle male socket 1 4-way 2-pin header 1 header jumper 10 PC pins 1 1µF 50VW PC electrolytic capacitor 8 10kΩ 1% 0.25W resistors 17 1kΩ 1% 0.25W resistors Semiconductors 1 74HC374 octal D-latch (IC1) 2 74HC139 dual decoder (IC2,3) 2 74HC04 hex inverter (IC6,IC7) 2 7406 hex inverter (IC4,IC5) 8 BD681 NPN Darlington transistors (Q2,Q4,Q6,Q8, Q10,Q12,Q14,Q16) 8 BD682 PNP Darlington transistors (Q1,Q3,Q5,Q7, Q9,Q11,Q13,Q15) 1 7805 5V regulator 1 5mm red LED (LED1) How to buy the software The software for driving the stepper controller can be ob­tained by send­ing $6 plus $3 for postage and packing to SILICON CHIP, PO Box 139, Collaroy, NSW 2097 or by faxing your credit card authoris­ ation to (02) 979 6503. Please nominate your choice of 3.5-inch or 5.25-inch floppy disc to suit IBM compatible comput­ers. We accept credit card authoris­ ations for Bank­card, Visa­card and Master­card. Testing Apply 12V to the board and check that +5V is present at pin 14 of ICs 4, 5, 6 and 7, at pin 16 of IC2 and IC3, and at pin 20 of IC1. If any of the Darlington transistors gets hot, you have a problem. If so, power down and recheck the placement and orien­ta­tion of all components. When all is OK, connect the board to the printer port, then turn on the computer, power up again and run the test program on the stepper software disc which is available from SILICON CHIP – see parts list. If you don’t have this software, using debug, load the motor codes into the base address of the card, then write a 1 to the enable bit followed by a 0. These last two writes load the data into the latch – see Tables 5 and 6. After each step in the program or after manually writing each set of codes, check the voltage on the outputs of each phase where the motors connect to the board. There should be 12V across each phase that is on – see Table 7. All things being equal, it’s time to connect up a stepper motor and run the stepper software included on the stepper soft­ware disc. This contains example programs written in Qbasic and C, as well as the initial testing program. The C programs are more efficient and allow the motors to spin up to full speed. All programs are fully documented and the disc comes with a READ.ME file which provides K ALEX The UV People ETCH TANKS ● Bubble Etch ● Circulating LIGHT BOXES ● Portuvee 4 ● Portuvee 6 ● Dual Level TRIMMER ● Ideal PCB DRILL ● Toyo HiSpeed MATERIALS ● PC Board: Riston, Dynachem ● 3M Label/Panel Stock ● Dynamark: Metal, Plastic ✸ AUSTRALIA’S NO.1 STOCKIST ✸ K ALEX 40 Wallis Ave, East Ivanhoe 3079. Phone (03) 9497 3422, Fax (03) 9499 2381 AUDIOPHILES! Now high audiophile quality components & kits are available in Australia. Buy direct & save. *Kimber, Wonder, Solen & MIT Capacitors *Alps Pots *Holco resistors *High Volt. Cap. *Gold Terminals & RCA *WBT Connectors *Kimber Cables * Interconnect Cables *Output Transformers (standard or customised) *Power Transformers *Semiconductors *Audio Valves & Sockets *Wonder Solder *Welborne Labs Accessories Fig.9: this is the full-size etching pattern for the PC board. The board measures 187 x 103mm & carries the code number 07201941. other helpful information on stepper motors. Cascading controller boards If you want to use two or more controller boards from the printer port, they can be daisy-chained using a 25-way ribbon cable and IDC DB-25F plugs. You then need to set the linking via the DIP header to use one of the four enable lines – see Table 8. Acknowledgments Our thanks to RAM Computers at Manly, NSW for the supply of sample steppers from dead floppy disc drives. Thanks also to the University of Technology which supplied information on rare earth magnet stepper motors. Valve & Solid State Pre-Power Amplifier Kits *Contan Stereo 80 Valve Power Amp. (As per Elect. Aust. Sept. & Oct. ’92) *Welborne Labs Hybrid Preamp. & Solid State Power Amplifier Send $1.00 for Product Catalog PHONE & FAX: (03) 807 1263 CONTAN AUDIO 37 WADHAM PARADE MT. WAVERLEY, VICTORIA 3149. January 1994  87