THE CARSON ELECTRONICS QM CONTROLLER A PUBLIC-DOMAIN ELECTRONIC SPEED CONTROL FOR SMALL HYDRO TURBINES By Art Carson carson.art@gmail.com One of the most costly features of a small hydroelectric plant has always been the governor or speed control which any AC generator needs in order to keep its frequency reasonably close to 60 hertz as the load on the plant changes. There are two ways of doing this: either the force of water on the turbine must be varied to compensate for variations in load, or the load must be somehow kept constant. Controlling the water has traditionally been done mechanically with systems costing, in some cases, as much as all the rest of the plant's machinery put together. Modern electronic and hydraulic systems which are in use today are not cheap either, and are mostly used in larger plants - say, above 100 KW output. The other approach, maintaining a constant load, is probably the method most commonly used in small plants. Our plant began life as a small francis turbine, belt drive and AC generator in a wooden box, and the only way of controlling the frequency was, for example, to turn off lights when putting a slice of bread in the toaster. Very sophisticated electronic load management systems are now available which use microprocessor chips to handle this sort of thing automatically. These systems usually cost much less than water control governing, but they're still state-of-the-art and as such, they're perhaps a bit more expensive than they could be. The system described below is a compromise which provides inexpensive, reliable control of speed and frequency. It uses simple digital electronics and an ordinary windshield wiper motor to control the output of any water turbine which is equipped with deflector plates, wicket gates or any other means of varying the force of water on the turbine runner. It is not designed for super-fast response - it may take several seconds to compensate for a severe change in the load on the power plant - but it provides excellent long-term accuracy of speed and frequency. Unlike a constant-load unit, it does not force the power plant to run at full output at all times. THEORY OF OPERATION The frequency of the AC power produced by the small hydro plant is compared with a precise 50 or 60 hertz signal derived from a quartz crystal. Differences are compensated for by a 12 volt windshield wiper motor which moves the turbine's speed control by means of a long screw. Compensation rate is proportional to the magnitude of the frequency error, and when frequency is within tolerance,the motor stops, except for occasional quarter-turn corrections this way and that to maintain fine control. Since voltage phase (the timing of the generator's AC voltage impulses) is used as a basis for comparison with the quartz crystal, there is literally no limit to the smallness of the speed error this unit can detect. The less the error, the longer it takes to adjust for it. Even a speed error of a tiny fraction of one percent, if it remains that way long enough , will eventually result in a tiny nudge to the turbine throttle to correct for it. A 12 volt car battery and an ordinary battery charger provide power for the electronics and the motor, and provision is made for manually operating the motor to shut down or start up the plant. Automatic emergency shutdown or remote startup features could be added later, and the system is adaptable to microcomputer control of these functions. CONSTRUCTING THE DIGITAL CONTROL UNIT All parts are readily available from most electronics supply houses. The sensing transformer can be a Hammond 229A16 or similar unit with 8 volt output. These are inexpensive, very reliable and designed to be energized continuously 24 hours a day. The quartz crystal is a common type used in color TV sets. Assemble the circuit as in the schematic diagram. I built several units on pieces of perfboard with component leads crimped over underneath and connected together directly or with small pieces of light gauge wire. Other construction techniques such as wire-wrap or a home-made printed circuit board can be used. Be sure to mount the 2N6387 motor driver transistor on a good heat absorbing surface such as the wall of whatever enclosure you mount the electronics unit in. This transistor MUST have an insulator under it, smeared liberally on both sides with silicone grease designed for transistor mounting. If you don't want to mess with insulating washers around the mounting screw as well, use a nylon screw. The manual up/down switch should be a spring loaded, center off type, or better yet, a type with one position spring-loaded and the other position staying put. You can use the spring-return position for throttle up and the stay-put position for throttle down, for maximum safety. If you're a serious electronics techie type or engineer, check out appendix A for a detailed theoretical description of the unit. MODIFYING THE DRIVE MOTOR AND MOUNTING ON THE TURBINE Obtain a windshield wiper motor designed to continuously rotate a crank arm. The motor should be a permanent magnet type for easy reversibility. A good choice, still obtainable at many auto wreckers, is a 2-speed wiper motor from any light Ford truck 1966 to about 1980 or so. I have gotten 4 to 5 years of 24 hour a day service out of these after salvaging them from old trucks. The description below refers specifically to this type of windshield wiper motor. Later ones are fairly similar. Disassemble the motor and find the "parking switch" contacts inside it. Remove and discard these contacts. One of the motor's brushes is grounded internally. Disconnect this brush at the ground point and connect it to one of the old parking switch wires instead, so that no motor connections are grounded. Remove the other parking switch wire. Finally, solder a 0.1 uF capacitor from each brush to ground, using the brush holders and the ground terminal you just disconnected for soldering to, and positioning the capacitors carefully so they won't rub on moving parts. These help reduce the chance of faulty operation of the electronics, by reducing the amount of electrical noise coming from the motor. Reassemble the motor and test it with a 12 volt car battery. It should run either direction depending on battery polarity, and both speeds should be available by using the high or low speed wires (a few of these motors have only a low speed connection). Make sure there's no connection to the motor frame - if there is, the 2N6387 transistor in your electronics unit will survive about 1 millisecond. A piece of threaded rod will serve as a jackscrew, although a real "jackscrew" from some sort of screw-type jack would be better. Two more pieces of threaded rod may be used as a frame for the motor assembly, as in the attached drawing. A series of metal plates fastened by nuts at intervals along the frame rods carry the motor, screw bearings, and limit switches. The whole assembly should pivot on a piece of pipe welded to the bottom of the motor mounting plate and slid onto a rod attached to the casing of the turbine. This detail shows in the drawing. A nut runs along the jackscrew, carrying the turbine's water control lever with it. A special lever should be made up according to the layout of your particular turbine, with holes at various radii. This will allow travel and compensation rate to be adjusted. Make the lever the proper length so that full travel of the nut along the screw results in full movement of your turbine's water control. Your turbine may have a weight attached to its water control, to shut it down by gravity in an emergency. It would be advisable to figure out a way to attach the governor actuator screw without defeating this function. Some turbines also have a way of slowing down the dropping of the weight during an emergency shutdown. This is important. Do not defeat this function either, or the water in the penstock may be forced to stop so suddenly that damaging water-hammer (pressure buildup) may occur. On most turbines applicable to the type of control described here, no such system will exist. Mount two limit switches on the frame and wire in series with motor. Each should have an 8-amp 50-volt diode across it to allow travel away from the stops. These are shown on the schematic, inside the dotted line which surrounds all the components mounted on the actuator assembly. Bearings for the screw are not very critical. I used a couple of bronze bushings off an old grinder in one unit (11 years old and still running in my own powerhouse - though now under computer control), and the bearings from a car alternator in another (last seen several miles outside of Cali, Colombia). A third unit (Entering its sixth year in my neighbor's powerhouse) used small industrial ball bearings. A short machined section at each end of the screw fits into the bearings - this is the only machine work required in building the unit. A rod fastened through a hole in one end of the screw forms a crank which is bent in a loose-fitting loop around the crank arm of the wiper motor in order to provide a smooth, non-binding driving action. End play in the screw and sloppiness in the frame pivot should be minimized for good governing sensitivity. TESTING AND INSTALLATION Now comes the scary part. You've built the thing and it's sitting there on the bench. Sooner or later you're going to have to close your eyes, grit your teeth and plug it in. Will it work? will it go up in smoke? Will it, horror of horrors, do nothing visible at all? Is it secretly zapping all its chips and becoming junk? Before actually testing the controller under power, double check your wiring for correct routing and safe clearances between all circuits on your board. For reasonable assurance that the unit is safe to energize, measure the resistance between the 5 volt supply (plus side of C1) and ground (minus side of C1) using a VOM as follows: be sure the red lead is plugged into the (+) socket and the black lead is in the (-) socket on the meter. Then touch the RED probe to GROUND and the BLACK probe to the +5 LINE. Wait a minute, you say! Isn't that backwards? The answer is no. When measuring ohms, the meter SUPPLIES power instead of ABSORBING power, so the red lead is negative and black is positive when using the ohms scales on the meter. Don't believe me? Get a second meter and check it out! The meter reading will vary from meter to meter due to non-linearity of the solid state circuitry in your governor, but should not show a direct short circuit or excessively low reading. Above 50 to 100 ohms probably means the governor can be tested without destroying itself. It is now time to do some careful powered-up testing on the workbench. Do not connect a battery or electric motor just yet. Plug the controller's AC cord into a wall socket, preferably supplied by a small hydro - but the public utility will do for this test if necessary - and briefly flick the power switch to the ON position, for just a quarter of a second or so. You should see a flash of light from some of the LED's at this point. This probably means the circuit is at the very least not a total short. If the LED's do not light up, switch off the unit IMMEDIATELY and check the power supply wiring for errors. If you saw some light from the controller's indicator LED's, switch the unit back on. If you've plugged it into electricity from an ungoverned plant, any frequency inaccuracy will cause the phase indicator LED to flash on and off. The rate of flashing will depend on how close to 60 hertz the supply of power is. If you are plugged into the public utility, you may have to wait a while for the phase LED to change from off to on or vice versa. Eventually, however, the difference in frequency between your controller's crystal timebase and the public utility lines, no matter how slight, will reveal itself on your LED display. At this point the unit is operating as a stand-alone frequency monitor. A frequency error of, say, two hertz will cause two flashes per second on the phase lamp; a one hertz error will cause one flash per second, and so on. An error of a ten thousandth of a hertz will cause one flash every ten thousand seconds if you're into standing there with your stopwatch for that long (the television crystal used in this unit is extremely accurate - it has to be in order to work with North America & Japan's finicky NTSC color television standard. These are the most massively-produced and inexpensive crystals of this accuracy that you can buy today). The motor drive LED should light for a fixed interval each time the phase LED comes on, and also each time it goes out. If not, check your wiring again. A VOM, logic probe, or 'scope may be used for troubleshooting if necessary. Unplug the control unit and connect it to a 12 volt battery and the SLOW connection of the windshield wiper motor on the workbench. Then replace the AC plug in the wall socket - it will now be used for frequency sensing only - power from the battery will run the electronics and motor. Observe the action of the motor. Its crank arm should rotate about a quarter turn at each flash of the motor drive LED. You can adjust the amount of rotation for each impulse by adjusting the motor pulse width control. If you're using a small hydro, try to alter the power frequency grossly by plugging in and unplugging a hefty appliance such as a portable electric heater which will load the plant considerably. The motor should reverse direction as the frequency passes through 60 hertz, and its pulsations should begin to come thick and fast as the frequency error increases. If you load down your power plant enough (or release it from a very large load suddenly), the motor impulses should begin to run together so that the motor rotates continuously. Try the manual throttle control switch. It should run the motor in both directions. This being the case, the unit is fully operational and may be coupled to the plant. Check that the screw rotates in the proper direction, and if not, reverse the motor leads. Test and adjust the limit switches. Try various holes in the actuating lever, experiment with the pulse width control, and test both high and low speed connections on the wiper motor. The idea is to provide the fastest possible response without excessive "hunting" of the governor. Vary the load on the plant to check for hunting problems at different power outputs. Do not allow the plant to overspeed significantly during these tests, especially if there is no voltage regulator on your generator. Set up the system carefully and don't "Mickey-Mouse" anything. Make it mechanically solid and connect the battery, wiper motor and charger with neat and well- protected wiring away from moisture or physical hazards. APPENDIX A - DETAILED TECHNICAL DESCRIPTION A small 120/240 VAC to 8V/8V split winding power transformer provides gating and reference signals for measurement of AC line frequency, and also supplies power for the electronics unit when used as a stand-alone frequency monitor. Two 1N4001 rectifiers provide DC power which is filtered by a large capacitor. This unregulated DC is present even when the unit is off. A 78LO5 voltage regulator chip, stabilized by a capacitor across its output, reduces the supply to a regulated TTL level of 5 volts DC. A small LED monitors the output of the regulator. Connected to one of the transformer's secondary windings is an additional 1N4001 rectifier which provides a clipped AC signal to one section of a 74LS132 quad NAND schmitt trigger. This section is used as a buffer and inverter and supplies a square wave signal at line frequency, to be used as a reference source for determining generator frequency and phase as described later. Connected to the other output leg is a pulse shortening circuit consisting of a 2N4401 transistor and associated components. Its purpose is to provide a gating window roughly centered on the leading edges of other line-derived signals in the unit. It does this by triggering "on" at a much lower point on the incoming sine wave than does the line buffer. It then triggers "off" after an appropriate delay determined by the RC circuit connected to its base, giving a signal equal in frequency but leading in phase relative to the line monitoring signal. An MM5369 oscillator/divider chip provides a precise 60 hertz reference signal derived from an ordinary color TV crystal oscillating at 3579545 Hz. The duty cycle of this signal and that of the line monitoring signal are both approximately 45 percent; It is important that they be as nearly equal as possible to provide the smoothest possible motor action. These two signals are fed to the clock and data inputs of one section of a 74LS74 dual D flip-flop which acts as a phase comparator. If the line signal LAGS the crystal signal by 0 to 180 degrees, the section's Q output remains constantly low and the not-Q output is constantly high. However if the line signal LEADS the crystal signal by 0 to 180 degrees, the Q output goes constantly high and the not-Q output goes constantly low. In other words, this section of the 7474 flip-flops once for every 180 degree "slip" of the line signal relative to the crystal reference, regardless of which signal has the higher frequency. An LED and its series resistor are connected to the not-Q output of the phase detector. This LED indicates phase lead when on; phase lag when off. A 74LS122 retriggerable one-shot is connected to both phase detector outputs, so that it provides one pulse of constant duration every time the phase detector changes states. This signal is used to drive the positioner motor through a fixed amount of rotation each time the line signal slips up or down, relative to the crystal, by 180 degrees. Hence the overall rate of speed correction applied to the water turbine is proportional to the magnitude of the frequency error. An LED displays this motor drive pulse, and the pulse width is adjustable via a 300k pot to set the correction rate. The phase detector described above is also used to determine whether the line frequency is greater or less than the crystal-controlled reference whenever a phase change is detected, so that the motor can be operated in the proper direction. Upslip or downslip is detected by making use of one of the characteristics of this type of phase detector, which is perhaps most simply described as follows: the exact moment when the device toggles is fixed at a specific phase relationship to the signal on the data input (the line monitoring signal) and this relationship changes by exactly 180 degrees of phase (again, relative to the line monitoring signal) depending upon whether the detected phase change was an upslip or a downslip. To extract this information, The leading edges of both the Q and not-Q output pulses are extracted by sharp differentiation networks, and the resulting brief impulses are fed to two NAND gates. Both gates are opened by the gating signals from the pulse shortener described above, for a certain percentage of each cycle of the AC line. Due to the 180 degree timing difference caused by upslip or downslip, one NAND will only allow passage of these pulses during upslip, and the other will only let them through during downslip. The second section of the 7474 is used as a pulse detector for controlling the motor's direction of rotation. The upslip pulses are applied to its preset input and the downslip pulses are applied to its clear input. This section will toggle whenever upslip changes to downslip or vice versa. The net result is that its Q output is low when the line frequency is above 60 hertz, and high when the line frequency is below 60 hertz. This signal is used to operate the motor's directional relay. A pair of LEDs connected from the not-Q output to ground and +VCC respectively are used to indicate high or low line frequency. The output of the motor drive pulser is used to drive a high gain 2N6387 darlington transistor in series with the motor, while the output of the up/down slip detector is applied to a small 2N4401 transistor in series with the coil of a DPDT relay which reverses the polarity of the motor leads. The motor used has a permanent magnet field, and therefore reverses direction when its leads are reversed. The outputs of the up/down slip detector are also used to reset the 74LS122 to its rest state. This has the effect of removing the first motor drive impulse in a given direction while allowing subsequent movement in the same direction to proceed unhampered. Two benefits result: the relay no longer has to switch under load, and hunting around the zero-error point is reduced since the motor must now allow 180 degrees of phase slip to occur between generator and crystal reference before going into action. Note that this does not imply any specific time delay before corrective action is taken; as before, the more drastic the load variation, the more rapid the correction. Also in series with the motor are two limit switches mounted on the jackscrew frame which supports the main screw assembly. These are adjusted to stop the motor at the limits of travel of the water turbine's control lever. Each has a diode across it to allow travel away from the stops. The Ford windshield wiper motor used for driving the screw is modified to isolate all its power leads from ground inside its case in order to allow reversing of the leads by the directional relay without causing a short circuit. Suppression capacitors are placed from each motor brush to ground inside the case, and also across the motor leads at the relay. A few protection diodes have been added at key points: 1) a diode across the motor circuit ahead of the directional relay protects the motor driver transistor from inductive spikes. 2) The relay driver transistor is likewise protected by a diode across the directional relay coil. 3) A rectifier in series with the positive battery lead to the unit protects against damage if the user accidentally connects the battery in reverse. 4) A diode network switches the electronics in the unit from AC to battery supply depending on which is providing the most voltage. This eliminates the need for a manual transfer switch. Throttle proportionality is of a modified proportional-gain PPFM (Proportional Pulse Frequency Modulation) type due to the use of phase- based drift rate sensing. Dead band is zero and loop gain approaches zero as the reference frequency is approached. The zero-width deadband and zero loop gain at the setpoint help to reduce or eliminate the hunting problems which are often noticed at high sensitivity in other constant-pulse-width PPFM control systems. As noted above, the control algorithm which results from this type of phase and frequency detection does not have a "dead band", and in theory will apply corrective movements to the motor constantly. However, this is no problem since the detection rate slows down as the error is reduced, and practical experience has shown that the motor may often remain motionless for 30 to 60 seconds at a time when frequency is correct and load conditions are fairly stable. Frequency correction applied to the small hydro by one single motor impulse under these conditions would be typically about 0.02 Hz. Any speed regulation equipment connected to a rotating machine forms part of a mechanical feedback loop, which like other feedback loops may become unstable and go into oscillation (called "hunting" when referring to speed control systems) if it becomes too sensitive. Therefore the correction rate must be adjusted carefully so as not to exceed the inertial characteristics of the machine. With the unit described above, This may be done by varying the motor drive pulse width, changing the length of the water turbine control arm, or using the high or low speed connection on the motor. Prototypes are presently in operation on two pelton wheels which utilize variable nozzle position to control water impact force and hence generator speed. This type of control results in a region of high governing sensitivity at zero or very light load, when the water jet is just skimming the pelton runner and a very small nozzle motion results in a large change in impact force. In both cases it was necessary to set the correction rate under these worst-case conditions, and be content with somewhat slower than optimum response at higher loads. A fair degree of hunting - about 0.5 hz plus or minus - was permitted at no load, and at all expected loads hunting was much less than this. The faster the response, the greater will be the likelihood of hunting problems. One of these prototypes controls a plant having a massive 550 kg. flywheel rotating at about 500 RPM. It was necessary to adjust the motor pulse width to a relatively low value on this plant. Once this was done, stable operation was obtained. Comments on your experiences with this unit are welcome - contact me at the address shown at the top of page one. -Art Carson (qm000004.txt 12/21/94)