Silicon ChipBuild The Railpower; Pt.1 - October 1999 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: DC power in the home; would it make sense?
  4. Feature: Sharing A Modem For Internet & Email Access by Greg Swain
  5. Project: Backup Battery For Cordless Phones by Leo Simpson
  6. Serviceman's Log: Did lightning strike at all? by The TV Serviceman
  7. Project: Build The Railpower; Pt.1 by John Clarke & Leo Simpson
  8. Feature: Introducing Home Theatre by Louis Challis
  9. Feature: Internet Access - Reduced Prices by SILICON CHIP
  10. Order Form
  11. Project: Semiconductor Curve Tracer by Charles Hansen & Rick Walters
  12. Project: Autonomouse The Robot; Pt.2 by John Clarke
  13. Product Showcase
  14. Vintage Radio: Jim Birtchnell and his radios by Rodney Champness
  15. Feature: The Ultimate Programmable Remote Control by Leo Simpson
  16. Project: An XYZ Table With Stepper Motor Control; Pt.6 by Rick Walters
  17. Book Store
  18. Back Issues
  19. Notes & Errata
  20. Market Centre
  21. Advertising Index
  22. Outer Back Cover

This is only a preview of the October 1999 issue of Silicon Chip.

You can view 37 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.

Items relevant to "Backup Battery For Cordless Phones":
  • Cordless Phone Battery Backup PCB (PDF download) [12512991] (PCB Pattern, Free)
Items relevant to "Build The Railpower; Pt.1":
  • Railpower PCB pattern (PDF download) [09308991] (Free)
  • Railpower panel artwork (PDF download) (Free)
Articles in this series:
  • Build The Railpower; Pt.1 (October 1999)
  • Build The Railpower; Pt.1 (October 1999)
  • Railpower Model Train Controller; Pt.2 (November 1999)
  • Railpower Model Train Controller; Pt.2 (November 1999)
  • Railpower Model Train Controller; Pt.3 (December 1999)
  • Railpower Model Train Controller; Pt.3 (December 1999)
Items relevant to "Semiconductor Curve Tracer":
  • Semiconductor Curve Tracer PCB patterns (PDF download) [04110991/2] (Free)
  • Semiconductor Curve Tracer panel artwork (PDF download) (Free)
Items relevant to "Autonomouse The Robot; Pt.2":
  • Autonomouse The Robot PCBs patterns (PDF download) [08409991-3] (PCB Pattern, Free)
Articles in this series:
  • Autonomouse The Robot (September 1999)
  • Autonomouse The Robot (September 1999)
  • Autonomouse The Robot; Pt.2 (October 1999)
  • Autonomouse The Robot; Pt.2 (October 1999)
Items relevant to "An XYZ Table With Stepper Motor Control; Pt.6":
  • DOS software and sample files for the XYZ Table with Stepper Motor Control (Free)
  • XYZ Table PCB patterns (PDF download) [07208991-2, 08409993] (Free)
  • XYZ Table panel artwork (PDF download) (Free)
Articles in this series:
  • An X-Y Table With Stepper Motor Control; Pt.1 (May 1999)
  • An X-Y Table With Stepper Motor Control; Pt.1 (May 1999)
  • An X-Y Table With Stepper Motor Control; Pt.2 (June 1999)
  • An X-Y Table With Stepper Motor Control; Pt.2 (June 1999)
  • An X-Y Table With Stepper Motor Control; Pt.3 (July 1999)
  • An X-Y Table With Stepper Motor Control; Pt.3 (July 1999)
  • An XYZ Table With Stepper Motor Control; Pt.4 (August 1999)
  • An XYZ Table With Stepper Motor Control; Pt.4 (August 1999)
  • An XYZ Table With Stepper Motor Control; Pt.5 (September 1999)
  • An XYZ Table With Stepper Motor Control; Pt.5 (September 1999)
  • An XYZ Table With Stepper Motor Control; Pt.6 (October 1999)
  • An XYZ Table With Stepper Motor Control; Pt.6 (October 1999)

Purchase a printed copy of this issue for $10.00.

BUILD THE RAILPOWER A remote controlled throttle for model railways Do you have a model railway layout? Does your speed con­troller have remote control, simulated inertia and facilities for auxiliary outputs? If you said “no” to any of those questions, then have a look at this completely new design which incorporates all the wanted features from previous versions of our highly success­ful Railpower speed controller. PART 1: By JOHN CLARKE & LEO SIMPSON 24  Silicon Chip O VER THE YEARS SILICON CHIP has produced some notable model railway circuits with perhaps the most popular of all time being the Railpower Walk­ around Throttle published in the April & May 1988 issues. Since then, we have produced a version with infrared remote control in 1992 and a microprocessor-based version in 1995 but none of the later versions was as popular with model railway enthusiasts. And while the original Walkaround Throttle was a good design in its time, it’s now 11 years old and lacking a lot of features that enthusiasts now want. About six months ago we decided to review our previous circuits and come up with a completely new design. The new cir­cuit would obviously incorporate all the good features of the original design but would have things like LED indicators to show all the various modes. Each time you press a That’s right – there are no front panel controls on the Railpower; just eight indicator LEDs and a speed meter. All control inputs come from the handpiece which has buttons for Stop, Inertia, Forward, Reverse and Speed, plus two more button to switch a couple of auxiliary outputs. button on the rem­ote, something lights up on the control panel. So what were the good features of our original design? They include pulse power for very smooth and reliable loco opera­tion, motor backEMF monitoring for excellent speed regulation even at crawling speeds and simulated inertia (momentum) so that the model loco acts as though it is pulling the hundreds of tonnes of a real train. As well, there was the very desirable feature of full over­load protection including a buzzer and LED indicator to show the fault condition. After all, nothing is more annoying than having your model train come to an abrupt stop for no apparent reason. If you have inadvertently placed a short across the rails or the loco was derailed when crossing points, the Rail­power Walkaround Throttle gave an immediate indication of the fault condition. OK, OK, if the Walkaround Throttle was a brilliant design, what were its drawbacks? The most apparent, and one which applies to virtually all model railway controllers, is that it was possi­ble to throw the loco into reverse while it was barrelling along in the forward direction. This is highly undesirable, for two reasons. First, it is not very realistic, is it? If a real train went straight from forward into reverse (or vice versa) without slowing down, all the passengers would end up in a pile at the ends of the carriages with multiple fractures, swearing and lawsuits! Second and more important for railway modellers, the loco and carriages usually derail and all the rolling stock can end up on the floor, which also can cause breakages and swearing! The way around this problem is to prevent the circuit from throwing the loco into reverse while ever there is voltage pres­ent across the track. This requires some logic so that even if you inadvertently press a button to change the direction of the train, the circuit won’t do anything unless the train has come to a full stop. Another problem involved the simulated inertia. While this provides a very realistic effect in enabling the train to gradu­ally build up speed, it can be a problem when you are doing shunting. That’s easily fixed though; the remote has a button to switch the inertia feature on or off. No more buzzing And finally, there was the buzzing. With the original Wal­karound Throttle, locos often buzzed while they were stationary. Why was that? All model locomotives require a few volts DC (sometimes as much as 6V) before they will even start moving, so the circuit features a “minimum” setting so that the loco moves off immediately when you increase the track voltage slightly by winding up the throttle knob. But because the track voltage from our circuit is pulse width modulated, October 1999  25 Main Features •  Pulse output for smooth low speed operation. •  Back-EMF detection for excellent speed regulation. •  Full remote control of all operating features. •  Speed setting displayed on a meter. •  Simulated inertia can be switched on or off. •  Forward/Reverse lockout to prevent derailment. •  Over-current protection with audible and visible indicators. •  LED indicators for forward, reverse, stop, reverse lockout, inertia and track voltage. the very narrow pulses fed to the loco while it was stationary would often cause the motor to buzz. Sometimes they would also cause the loco to creep forward imperceptibly too, which could be a bad thing when it was supposed to be sitting at the lights waiting for the “all-clear” signal! This problem has been solved in this latest version, so that if you press the Stop button on the remote control, not only does the loco come to a complete stop but the track voltage is completely removed. Result: no buzzing, no creeping. Remote control We’ve already mentioned the Inertia and Stop buttons on the remote control. But there are seven buttons in all. There are two buttons to switch two auxiliary outputs on or off and another two buttons select forward or reverse operation. Finally, there is an elongated button to speed up or slow down the locomo­tive. The Railpower itself is housed in a plastic instrument case with nine LEDs on the front panel, a power on/ off switch and a small analog meter to indicate the speed setting. At the back of the case are a pair of terminals for the track connections, another pair of terminals for the 12VDC output and an access hole for the wiring to the auxiliary outputs. Inside the Railpower case is a large 26  Silicon Chip PC board which takes up most of the available space. All the LED indicators are along the front edge of the board while the four power transistors and power supply components are near the back edge. The components are well spread out to make construction as easy as possible. There are six trimpots provided to set the following: maxi­mum track voltage, minimum track voltage, inertia, braking, meter calibration and the forward/reverse lockout adjustment. The maximum track voltage (VR1) is usually set to the rated voltage for the particular locomotive, typically 12V. The minimum track voltage (VR2) is set to just below the threshold before the loco begins to move. This setting will be a compromise to suit most of the locos used on your layout. The inertia adjustment (VR4) determines the time the train takes to accelerate to its set speed, as indicated by the analog meter on the front panel. Typically, the time taken to reach maximum speed can be adjusted from about five seconds to about one minute. If you have a large layout and run long trains you will want the long inertia setting and conversely, if you have a small layout and run short trains, then you will want the small inertia setting. By way of explanation, inertia also affects the braking of the train. So if you have a large inertia setting the train will take a long time to stop, if you just wind the throttle setting down. The Stop trimpot (VR5) has its own inertia setting and can bring the train to a halt more quickly. The adjustment range is from about 10 seconds down to half a second. VR3 is the Lockout adjustment, to set the track voltage speed at which the forward/reverse buttons can be used. You can set between 0V and about 2.5V. VR6 sets the full-scale reading on the speed meter. This is simply set so that the meter reads 100% when the train speed is set at maximum. Its adjustment is made after the maximum and minimum speed settings have been finalised. Block diagram & circuit The block diagram for the Railpower is shown in Fig.1. The infrared receiver (IC1, IC2) decodes all the commands from the handheld remote. Depending on which button is pressed, one of IC2’s outputs goes high to drive a particular section of the circuit. The full Railpower circuit is shown in Fig.2. It requires three different supply rails. The infrared receiver circuit needs 5V while most of the rest of the circuit runs from 12V so quite a few transistors are required to shift from the 5V output of IC2 to the 12V levels of the rest of the circuit. IC1 & IC2 are supplied with 5V from regulator REG1. IC1 is a 3-pin infrared receiver which incorporates a filter centred on 38kHz and a de­modulator to recover the digital coding pulses produced by the infrared transmitter. Its output at pin 1 is inverted by transistor Q1 and then fed to pin 2 of IC2, the decoder chip. The 39kΩ resistor and .001µF capacitor at pin 13 set the oscillator so that it matches the transmitter. IC2 has toggle outputs and momentary outputs. The momentary outputs are high only while the respective transmitter buttons are pressed. The toggle outputs alternate between high and low, each time their respective buttons are pressed. We use the toggle outputs to control the Aux1 output (pin 10) of the Railpower and the Inertia on/off feature (pin 9). Hence, if the Inertia button is pressed once, the Inertia can be turned on and the next press will turn it off. Similarly, one button press turns the Aux1 output high and the next press turns it off. All the other outputs are momentary and are high only while the respective transmitter pushbuttons are pressed. As noted above, trimpots VR1 and VR2 set the maximum and minimum track voltage. Op amp IC3a buffers VR1 while IC4a buffers VR2 and these buffered voltage sources are used to set the range of track voltages which are stored in capacitor C1, depending on how the speed button is pressed. Op amp IC4a is actually set up as a voltage clamp so that C1’s voltage cannot go below the setting of VR2. If C1’s voltage goes above the setting of VR2, as it will when the speed setting is increased, diode D2 becomes reverse biased and therefore has no effect on the capacitor voltage. So let’s look at how the speed setting is increased or decreased, when the speed button on the remote is pressed. When pin 6 (Speed+) of IC2 goes high Fig.1: the block diagram for the Railpower. The infrared receiver (IC1, IC2) decodes all the commands from the handheld remote control unit. Depending on which button is pressed, one of IC2’s outputs goes high to drive a particular section of the circuit. it turns on transistor Q2 and this pulls pin 9 of analog switch IC5a low, turning it on. This causes C1 to charge via the 10MΩ resistor towards the +12V supply rail. Ultimately, C1’s voltage is limited by D1 which will conduct to clamp the voltage according to the setting of VR1. Thus C1 is limited to the voltage set by VR1 plus the forward voltage of D1. When pin 6 of IC2 goes low, Q2 turns off and switch IC5a goes open circuit, leaving C1 to sit at the previously stored voltage. When pin 5 (Speed-) of IC2 goes high, it turns on transis­tor Q3 which discharges capacitor C1 via a 4.7MΩ resistor. Note that C1 is prevented from totally discharging by the clamping action of IC4a and diode D2, as described above. Some readers may be wondering why we used such a complicat­ ed system to charge and discharge C1. Couldn’t we have simply charged and discharged C1 via high value resistors from the wipers of trimpots VR1 & VR2? The answer lies in how a capacitor charges up via a resistance. Initially, the capacitor charges at quite a fast rate but when the voltage reaches about 2/3rds of its final value, it takes much longer to complete the charge. The response is exponential. In practice, this means that C1’s voltage would be very slow to rise above the medium to fast settings and be similarly slow when going from a slow setting to stop. If we charge and dis­charge capacitor C1 from the full supply rail and clamp the voltage at around 1/3rd and 2/3rds the supply, then we are charg­ing and discharging over a more linear range. Thus the speed buttons have a much better response, particularly at the very slow and fast speeds. Capacitor C1 is buffered with FET-input op amp IC4b. Its very high input impedance means that it has virtually no effect on C1’s voltage. The 1kΩ resistor in series with pin 5 probably looks unnecessary in view of the high circuit impedance but is included to prevent any chance of spurious oscillation. IC4b drives the analog meter via VR6 and charges the iner­tia capacitor C2 via the inertia trimpot VR4, the 10kΩ resistor and analog switch IC5c. Switch IC5c is arranged as a single pole double-throw (change-over) type, so that its pin 14 connects to pin 12 or pin 13, depending on the state of its control pin 11. Stop function Pin 11 is controlled by pin 1 of IC6a, a 4013 D-type flip­flop. When pin 1 of IC6a is high, it causes pins 13 & 14 of IC5c to connect together which conFig.2 (following page): it controls the speed of the locomotives by applying a variable pulse width modulation (PWM) waveform (from pin 7 of IC8b) to a H-bridge transistor output stage (Q15-Q22). October 1999  27 28  Silicon Chip October 1999  29 instead will force the circuit to be in reverse mode at power up. Pulse width modulation The H-bridge transistors (Q16, Q17, Q20 & Q21) are all mounted on the rear panel, which provides the necessary heatsinking. nects the Stop trimpot, VR5, across capacitor C2. C2 then discharges so that the train comes to a stop. At the same time, pin 1 of IC6a turns on transistor Q13 which powers the LED4, Stop indicator. Pin 1 of IC6a is toggled low or high at each positive tran­sition of the clock input at pin 3, as driven by IC7c and tran­sistor Q5. So each time the Stop output from pin 7 of IC2 goes momentarily high, IC6a is clocked and it selects or deselects the Stop function via switch IC5c. Flipflop IC6a is also controlled by the speed (+) or speed (-) outputs of IC2, ie, pins 5 & 6. If either of these outputs go high, diode D3 or D4 will conduct, turning on transistors Q6 & Q7 which pulls the reset at pin 4 of IC6a high. This sets the Q output (pin 1 of IC6a) low, to release the stop function. Inertia on/off Pin 9 of IC2 controls the inertia function and as mentioned above, it is a toggle output and it drives transistor Q4. When pin 9 is high (Inertia Off), Q4 is on, pulling the control pin 10 of switch IC5b low, closing the switch; ie, pin 2 of IC5b con­nects to pin 15. This shorts the inertia trimpot, VR4, and this means that C2 charges and discharges almost instantaneously in response to speed changes. At the same time, LED3 lights to indicate that Inertia is off. Comparators IC3c and IC3d monitor the voltage across ca­pacitor C2. Pin 14, the output of IC3c, goes low whenever the voltage across C2 is above the voltage set by the Forward/Reverse 30  Silicon Chip Lockout trimpot, VR3. Pin 14 going low causes both diodes D5 & D6 to conduct which prevents the forward and reverse outputs, pins 3 & 8 of IC2, from having any effect. Buzz off Comparator IC3d prevents the locos from buzzing when they are stationary, as mentioned above. Its non-inverting input, pin 10, monitors the voltage between IC3a and IC3b’s outputs via a voltage divider comprising a 100kΩ resistor and a 1kΩ resistor. This voltage is only slightly higher than the minimum track voltage setting provided by trimpot VR2 (ie, buffered by IC3b). So when the voltage across C2 is below pin 10 of IC3d, pin 8 goes high, pulling up pin 6 of NAND gate IC7d. If the Stop function is also activated, then IC7d’s pin 4 will go low and prevent the pulse width modulation circuit from working. We’ll come back to that section later. Forward & reverse So what happens when the lockout comparator and diodes D5 & D6 are not inhibiting the forward/reverse outputs from IC2? When pin 8 is momentarily high to select Forward operation, Q11 is turned on and this sets flipflop IC6b via gate IC7b. This causes pin 13 of IC6b (the Q output) to go high and pin 12 to go low. IC6b controls the direction of the motor drive circuit, as we will see later on. The 0.1µF capacitor at pins 8 & 9 of IC7b will force the circuit to be in the forward mode when the power is applied to the circuit. Placing the 0.1µF capacitor at pins 12 & 13 of IC7a As mentioned previously, the Rail­ power provides pulse drive to the track, using a system called pulse width modulation. This is widely used these days in switching power supplies and refers to the fact that the average DC voltage is varied by varying the width of pulses applied to the load or in this case, the railway track. However, while switching power supplies use pulse width modulation to obtain high efficiency, in the Rail­power we use it not so much for efficiency (although that is an advantage) but to obtain very smooth and reliable low speed running from the loco­motives. Part of the reliable running comes about because the pulse vol­tage applied to the loco’s motor is considerably higher than if DC was applied. For example, in the Railpower the pulse amplitude is around 16V or so, regardless of the average voltage applied to the track. Consider how this affects starting and low speed running. Normally, with a conventional train controller, if you want to run the loco at low speed, you must use a low track voltage and you increase the throttle setting gradually to make the smoothest possible starts. The problem is that model loco motors don’t necessarily respond well to low track voltages. The slightest bit of friction in the gears, a bit of dirt on the track or less than perfect contact between brushes and commutator can mean that the loco does not start smoothly or it may not start at all. Or perhaps the track voltage needs to be wound up to quite a high level at which point the loco suddenly lurches forward – hardly the most realis­tic model operation. With the Railpower however, the track voltage is always high (ie, 16V) and we just vary the pulse width to vary the amount of power fed to the loco. Result: much more reliable starting and really realistic low speed running, even with long trains, double-headed locomotives and dirty track and so on. After using a conventional train controller, the Railpower is a revelation! The pulse width modulation (PWM) circuit comprises op amps IC8a, IC8b, Most of the parts are mounted on a single large PC board, so that the Railpower is a snap to build. We’ll give the full wiring details in next month’s issue. the comparator from delivering pulses to the motor drive circuit. IC8c and IC8d, all in one LM324 quad op amp package. IC8d is connected as an oscillator and it produces a triangular (sawtooth) waveform by alternately charging and discharging a 0.1µF capacitor via a 560kΩ resistor. Capacitor C2 (the inertia capacitor) is buffered with op amp IC8a which is connected as a unity gain non-inverting stage. Its variable DC output is fed to pin 5 of IC8b via diode D9. IC8b is connected as a comparator, comparing the triangle waveform at its pin 6 with the DC voltage at pin 5. Whenever the triangle waveform at pin 6 goes below the DC at pin 5, IC8b’s output at pin 7 goes high and conversely, whenever the triangle waveform at pin 6 goes above the DC at pin 5, the output at pin 7 goes low. The result is a pulse waveform running at about 160Hz and with a duty cycle which is directly proportional to the DC vol­tage at pin 5. If the DC voltage at pin 5 is high, the duty cycle H-bridge motor drive of the pulse waveform will be high and the average DC output will be high also, say 9V or higher. The operation of the pulse width modulation circuit is shown in the oscilloscope waveforms of Fig.3. The upper trace is the pulse output waveform at pin 7 of IC8b. This has a nominal 10% duty cycle, giving an average DC track voltage of about 1.7V, assuming that the supply is 17V. The lower trace is the triangle waveform at pin 13 of IC8d and the horizontal line (Ref1) is the DC voltage at pin 5 of IC8b. If the voltage at pin 5 rises then the pulse width at pin 7 of IC8b increases to provide more track voltage. As noted previously, when the train is brought to a stop with the speed down control, the track voltage pulses will be very narrow and while the loco may stop, its motor may buzz. However, if the Stop button is pressed, IC7d’s output will go low and pull pin 5 of IC8b low via diode D10 and this stops The motor drive circuit uses four Darlington transis­ t ors (Q16, Q17, Q20 & Q21) connected in an H-bridge configura­ tion. The beauty of this circuit is that it can drive the motor in the forward or reverse directions, depending on which two diagonally opposite transistors are turned on. For example, to make the motor go forward, Q21 is turned on continuously, while Q16 is pulsed on and off at 160Hz. Conversely, to make the motor go in reverse, Q20 is switched on continuously, while Q17 is pulsed on and off. Tran­sistors Q15 & Q18 ensure that Darlington transistors Q16 & Q17 turn on hard so that their power dissipation is minimal. They also provide voltage translation from the 12V logic control signals from IC9a and IC9c to the +17V supply for Q16 & Q17. Q19 & Q22 ensure that their respective Darlingtons turn on fully, again to October 1999  31 Fig.3: these waveforms show the operation of the PWM circuit. The top trace is the pulse output waveform at pin 7 of IC8b, the lower trace is the triangle waveform at pin 13 of IC8d and the horizontal line is the DC voltage at pin 5 of IC8b. If the voltage at pin 5 rises, then the pulse width at pin 7 of IC8b increases to provide more track voltage. ensure that their power dissipation is minimal. As we noted previously, flipflop IC6b controls the H-bridge circuit and thus the direction of the motor. For forward motor operation, the Q output, pin 13, of IC6b is high and the Q-bar output, pin 12, is low. So pin 13 switches on transistors Q22 & Q21. Meanwhile the pulse waveform from IC8b drives pin 1 of the 3-input NAND gate IC9a and thence Q15 & Q16. For reverse operation, the Q output of IC6b is low and Q-bar is high. Thus IC9a’s output will not follow the pulse wave­form at its pin 1, since its pin 2 is low. But pin 13 of IC9c is now high, being connected to the Q-bar output of IC6b. So the pulsed waveform from IC8b passes through to drive Q18 & Q17. And Q19 & Q20 are switched on by the Q-bar output of IC6b. The forward and reverse modes are indicated by LEDs 6 & 7 which are driven by the Q-bar output of IC6b, AND gate IC9b and transistor Q25. When the Q-bar output from IC6b goes high, Q25 switches on and LED6 is powered via the 1.2kΩ resistor, to in­dicate the reverse mode. When IC6b changes state for the forward mode, Q25 is turned off and LED7 can turn on via diode D13. Overload protection The Railpower incorporates overload protection so that if the loco stalls while crossing points or a short is placed across the track, the current is limited to a safe value. What happens 32  Silicon Chip Fig.4: how the motor back-EMF is monitored. The top trace is the track voltage applied to the motor and the back-EMF is the wavy line between the pulses. The lower trace is the voltage fed to op amp IC8c. Note how the back-EMF is shorted out by Q14 during the period that the pulses are applied to the track. is that the motor current flows through the emitter of Q20 or Q21 and then via a common 0.1Ω resistor which is used to monitor the pulse current supplied to the track. The voltage developed across the 0.1Ω resistor is filtered with a 10kΩ resistor and 0.1µF capacitor and fed to the base of transistor Q23. If the averaged track current exceeds more than about 5 or 6A, Q23 will turn on and pull pins 8 & 11 of IC9 low. This causes the outputs of IC9a and IC9c to stay low and stops any pulse drive to the H-bridge. Q23 also lights overload LED8 and switches on the buzzer via transistor Q24. Q24 also pulls the positive side of the 22µF capacitor connected to Q23’s base high which main­tains base drive while the capacitor charges. With the track current shut down to zero and the 22µF ca­pacitor at Q23’s base fully charged, Q23 & Q24 turn off. Gates IC9a or IC9c then reapply What About A Walk-Around Throttle Version? For those who want to build the Rail­ power without infrared remote control, it is possible to build a walk-around throttle version with a small handheld control which you can plug into sockets at various points around your layout. The modifications are quite simple and involve omitting IC1 and IC2 on the Railpower PC board. Depending on available space, we hope to publish the details next month or in December. switching pulses to their respective transistors to power up the track again and the 22µF capacitor discharges via the buzzer. However, if the overload condition has not been fixed, Q23 & Q24 will turn on again and repeat the cycle. In effect, the circuit keeps “looking” to see if the fault has been removed and the buzzer keeps sounding at about one-second intervals. Speed regulation One of the outstanding features of the Railpower is its speed regulation and this contributes to smooth and reliable running at any speed setting. The circuit accomplishes this by moni­ toring the back-EMF from the motor. Model locomotives mostly use permanent magnet motors and these produce a back-EMF which is directly proportional to their speed. So this circuit monitors the motor back-EMF and varies the pulse drive to ensure that the back-EMF is maintained more or less constant for a given speed setting. This ensures that the loco does not slow down when going up an incline and also enables much more realistic shunting manoeuvres. The trick is, how do you measure motor back-EMF while power is applied to it? The answer is that we measure the back-EMF in the time between the individual track pulses, using two 10kΩ resistors, one connected to each rail. Depending on whether the loco is going forward or backwards, the back-EMF comes from only one rail and the respective 10kΩ Parts List For RailPower Controller 1 PC board, code 09310991, 216 x 170mm 1 front panel label, 246 x 75mm 1 remote control label, 28 x 62mm 1 plastic instrument case, 260 x 190 x 80mm 1 8-channel infrared remote control transmitter & receiver (from Oatley Electronics) 1 60VA 24V centre-tapped or 2 x 12V transformer (see text) 1 MU45 1mA panel meter 1 mini buzzer 1 SPST mains rocker switch with Neon indicator (S1) 1 IEC mains cord 1 IEC mains panel socket with 1A fuse 1 IEC insulating boot 1 red binding post terminal 1 black binding post terminal 2 white binding post terminals 5 TO-220 mica washers or silicone insulating washers 5 TO-220 insulating bushes 2 eyelet terminals for earth connection 1 3mm star washer 5 self-tapping screws for PC board 8 M3 x 15mm screws and nuts 2 M4 x 10mm screws and nuts 2 4mm flat washers 3 10mm OD 5mm ID rubber grommets 4 cable ties 15 PC stakes 1 400mm length of brown 250VAC wire 1 200mm length of blue 250VAC wire resistor feeds this voltage via D11 to pin 3 of IC8c, the error amplifier. Note that Q14 is turned on when ever a pulse is fed to the track and this shorts out the voltage signal from the respective 10kΩ monitoring resistor. Hence, op amp IC8c never “sees” the track voltage pulses and we effectively monitor the motor back-EMF only while no voltage is applied to it. The oscilloscope waveforms of Fig.4 shows how the motor back-EMF is monitored. The top trace is the actual track voltage applied to the motor. The back-EMF is the wavy line between the pulses. The lower trace is the voltage fed to op amp IC8c. Note how the back-EMF is shorted out by Q14 during the period that the pulses are 1 200mm length of green/yellow 250VAC wire 1 250mm length of blue heavy duty wire 1 200mm length of red heavy duty wire 1 75mm length of black heavy duty wire 1 75mm length of yellow light duty hookup wire 1 75mm length of red light duty hookup wire 1 30mm length of black 20mm diameter heatshrink tubing 1 30mm length of black 5mm diameter heatshrink tubing Semiconductors 1 PIC12043 infrared receiver (IC1) (Oatley Electronics) 1 SM5032B 8-channel decoder (IC2) (Oatley Electronics) 2 LM324 quad op amps (IC3,IC8) 1 TL072, LF353 dual JFET op amp (IC4) 1 4053 CMOS analog switch (IC5) 1 4013 dual D flipflop (IC6) 1 4093 quad 2-input NAND gate (IC7) 1 4073 triple 3-input AND gate (IC9) 1 75L05 5V low power regulator (REG1) 1 7812 12V regulator (REG2) 1 BC548 NPN transistor (Q1) 17 BC338 NPN transistors (Q2Q6, Q8-Q11, Q13-Q15, Q18, Q19, Q22, Q23,Q25) 3 BC328 PNP transistors (Q7,Q12,Q24) applied to the track. Back to the error amplifier: this has a gain of 3.2 and it amplifiers the chunks of motor back-EMF and filters them with the 22kΩ resistor and 2.2µF capacitor at its output. The resulting smoothed DC voltage is used to shift the output of the triangle waveform generator, IC8d. If the back-EMF from the motor is lower than it should be, the DC level of triangle waveform will be lowered. When applied to pin 6 of IC8b, the PWM comparator, this will have the same effect as if the DC fed to its pin 5 was raised. The result is a slightly wider pulse width fed to the track, to restore the motor speed to what it should be. 2 BD650 PNP transistors (Q16,Q17) 2 BD649 NPN transistors (Q20, Q21) 11 1N914, 1N4148 switching diodes (D1-D6,D9-D13) 3 1N4004 1A diodes (D7,D8,D14) 8 5mm red LEDs (LED1-LED8) 1 bicolour 5mm LED (LED9) Capacitors 2 2200µF 25V PC electrolytic 1 100µF 16VW PC electrolytic 1 47µF RBLL electrolytic (C2) 1 22µF 16VW PC electrolytic 8 10µF 25VW PC electrolytic 1 2.2µF RBLL or tantalum electrolytic (C1) 1 2.2µF 16VW PC electrolytic 2 0.1µF MKT polyester 1 .01µF MKT polyester 1.001µF MKT polyester Resistors (0.25W, 1%) 1 10MΩ 5% 3 22kΩ 1 4.7MΩ 5% 36 10kΩ 1 560kΩ 1 4.7kΩ 1 220kΩ 2 3.3kΩ 1 120kΩ 3 2.2kΩ 8 100kΩ 7 1.2kΩ 1 47kΩ 6 1kΩ 1 39kΩ 1 0.1Ω 5W Trimpots 1 1MΩ (105) horizontal (VR4) 1 220kΩ (224) horizontal (VR5) 2 100kΩ (104) horizontal (VR1, VR2) 1 10kΩ (103) horizontal (VR3) 1 5kΩ (502) horizontal (VR6) Turning now to the power supply, the Railpower uses a 60VA power transformer which may be either a centre-tapped 24V unit or one with two separate 12V windings. The transformer with two 12V windings is connected to a bridge rectifier using four diodes, while the centre-tapped 24V transformer can drive a full wave rectifier using two diodes. The rectified AC is filtered with two 2200µF capacitors to supply about 17V DC to the H-bridge circuit. A 7812 3-terminal regulator (REG2) provides 12V for the remainder of the circuit. That’s all we have space for this month. Next month, we will describe the transmitter circuit and give the full SC constructional details. October 1999  33