Ring Detector to Reset a Crashed BBS Designed by Len Busshart, Sysop of PC Plus (607) 785-6876 Text By Wes Brzozowski Most every Sysop has to occasionally restart his or her board, because the board occasionally goes "belly up". The crash may be caused by power line noise, thermal problems in a budget computer, the slow degradation of a component inside the system, or by the actions of immature users who seek to deliberately bring the system down. Regardless, this causes extra bother for the sysop and inconvenience for those trying to call in. Not content with simply accepting this, Mr. Len Busshart, sysop of the PC Plus BBS in Endicott NY, has devised a simple device that will actually allow the next caller to reset the system. It works simply but cleverly. Basically, when the BBS crashes, the computer remains on but it is brain dead, and is unable to answer the ring signal on the phone line. The circuit described here will detect a continuously ringing phone line, power off the system, and then turn it back on. If the computer is able to restart the BBS on boot-up, any caller can reset the system by simply letting the phone ring for a while before hanging up. When the BBS is normally running, this circuit will not be activated, because the computer will answer the phone before the line has had the chance to ring long enough. There are a few cases where this device might not be advisable. If the BBS is not able to restart itself upon boot-up, it won't help at all. If the BBS can crash, effectively leaving itself "off hook", then all callers will simply get a busy signal. If they can't send a ring signal, they can't reset the board. Nastiest of all might be a case where the sysop uses a multitasker so that the computer can be used for other things while the BBS is running. It's possible that a user can shut off the computer in the middle of a job. This could also happen without a multitasker, if no BBS program is running in the system but the ring detector is still connected to the phone line. If none of these seems bothersome, then this device will be useful to everyone involved in the BBS. It would be a good idea to put a short explanation in the log on message, such as; ******************************************************************** * This BBS employs a Ring Detector Reset Circuit. If the Board has * * crashed and cannot answer the phone, just let it ring six times, * * hang up, and call back. The board will have reset itself. If you * * have to use it, please let us know if it worked properly. * ******************************************************************** With a message like this, most users will quickly learn how to reset the system if they ever need to. It may also discourage some of the intentional "board crashers" from doing mischeif. There would seem to be very little gratification in crashing a board if the very next user can easily undo the damage. So much for the good news. The bad news is that you can't just run out and buy one of these things. At the time this is being written, you can't even purchase a kit of parts. Although it's not overly complicated, it will have to be built from scratch, and if you've never worked with power line voltages before (or if you're not sure which end of the soldering iron to hold!!!) you should get some help. Fortunately, being a sysop, you can put up a message to the "hardware hackers" asking for a bit of assistance. Offer a years free subscription to your board. (If your board is free, be generous; make it a lifetime subscription!!!) In any case, you should print out the file RINGDET2.CKT now, and take a peek. It won't help much to TYPE the file to the screen, because it uses all 80 columns, and so every line will have a blank line after it. Printed on paper, however, it's quite clear, and a good example of how to express an electronic circuit in a text file. The circuit is connected to just two of the four wires in your standard phone line. Actually, all normal phone systems use only these two wires. It may not be obvious that this is possible, but it works fine in practice. (And when you buy your wire by the mile, like the phone company does, you learn to think of simple ways to do things.) In any case, this circuit will connect to the GREEN and RED wires only. When your phone bell rings, a series of plus and minus 45 volt pulses appear across these two wires. This amounts to a very vicious attack on the delicate digital circuitry normally found inside a computer. (It can do a fair job of "lighting up" a standard human body, too.) The 6N139 device is an optoisolator, which allows the hostile voltages of the phone system to be translated to the more benign signals that are preferred by digital circuitry. Every time your phone rings it is responding to a long burst of very short pulses. As we want to count the rings, we don't count the pulses; we count the bursts. The first 1-shot converts a burst of pulses into one pulse that's about the same length as the burst. Essentially, it triggers on while the phone bell is ringing, and goes off during the intervals when it's silent. The 74193 will count the rings, and the 7485 will compare the ring count with the preset number of counts that you must program in to the four switches. When they match, it triggers a circuit to produce an 8 second shut-down pulse. This signal normally controls a Solid State Relay (SSR) that keeps power applied to your computer. When the shut-down pulse occurs, that power is interrupted for 8 seconds. This shuts your computer off, lets the power supply internally discharge itself (very important to do!) and then turns it back on. If you look closely at the circuitry, you'll see some other enabling and resetting portions that keep ring counts from the previous call from being added in with those of the present one, and the circuitry is set to ignore any rings that may occur when the system is temporarily shut down. The Solid State Relay may need a bit of explanation. This is a solid state circuit that acts very much like a standard electromechanical relay. They usually come as a rectangular block with four terminals. The two input terminals are polarized; that is they have a (+) and a (-), and these are shown in the schematic. The two output terminals are not polarized; you can use either one for either connection. These act like a switch that turns on when an electric current is sent into the input terminals. No part number for the relay is given. Since they are not as commonly available as the other components here, you should choose from those you can get. The diagram shows a 10 Amp relay; this should be enough for your system, but if it needs more, you'll need one that can carry more amps. (It's always better to have at least %25 more capacity than you'll need, anyway.) The diagram also shows that the relay must be able to handle 120 Volts AC; make sure that the relay you get can do so. (While most all Solid State Relays will be able to do this, there are a few that instead are made to switch DC, and these cannot be used in the ring detector. Unlike the old fashioned relays, the Solid State variety can usually only switch one or the other; not both.) The mounting side of a Solid State Relay is usually a flat plate of metal. If you want the relay to carry anywhere nearly as many amps as it's rated for, this flat plate will have to be bolted down on a suitable heat sink, with thermal grease sandwiched in between. Solid State Relays are expensive, and you don't want to burn yours out. If you do burn it out, you may not know it until you need it. A dead relay usually just stays on all the time, which is what the ring detector usually does. But when a user tries to reset your computer, the ring detector will be unable to shut the computer off, and you'll have to do it yourself, anyway. While we're on the subject of mounting things, you should be careful to mount this entire circuit in a metal box, with the third "ground" wire from your AC power cord securely bolted to it. Failure to do this could result in a nasty shock, if other wires should accidentally break loose inside the detector box. The 7408 and 74123 chips might at first glance appear to require two of each. However, each of these has more than one functional device inside the integrated circuit package. Unless you are deliberately buying extras to have spares available (a wise strategy!) you'll only need one of each. It would also be wise to buy IC sockets to plug the chips into, rather than soldering directly to them. Ths sockets are cheap, and make it much easier to replace a bad chip. Also, soldering directly to them can damage them, if you don't have sufficient experience with the techniques. Most chips in the diagram show power connections. The 7404 and 7408 do not, nor do they traditionally show them in the electronics industry. It is assumed that the user knows that ground is pin 7 and +5V is at pin 14 for each. Now you know too, if you didn't already. Not shown in the schematic is a +5 Volt power supply. The TTL chips shown here typically need it to be within %5 of the required 5 volts, so you can't temporarily substitute in something like a 6 volt battery. The power supply should be able to supply 350 mA or more. It may be possible to cut this down by substituting 74LS type chips, but the 74121 that drives the SSR probably should not be substituted (I'm not aware of an LS version of this device, anyway.) VERY IMPORTANT; do NOT try to tap the 5V power supply inside your PC to run this circuit. Though it can undoubtedly supply the current, don't forget that the purpose of this circuit is to turn that power supply OFF!!! So once the detector shuts off your PC, it also turns itself off, and everything will stay off. You'll really have to get a separate power supply, and wire it up inside the ring detector circuit so that it is not in the SSR loop. That is, it always remains on as long as the Ring Detector box is plugged in. The switches are used to program the number of rings needed to trigger the circuit. These are set as a binary number. You should make this number somewhat larger than the number of rings your system allows before it answers the phone, so that the system will only reset itself when the computer truly cannot answer the phone. It might be best to try this out on a lamp or something, rather than debug it all with the computer plugged into it. The correct number of rings should be able to turn off the lamp for 8 seconds as easily as it should be able to turn off the computer. When you first try this out, it may not respond to rings at all. The 50K potentiometer, shown at the top of the picture, should be turned so that it is at its maximum resistance. The voltage between pins 6 and 5 of the 6N139 optoisolator should drop from about 5 down to 2 or 3 volts, when the phone rings. If you are fortunate enough to be able to put an oscilliscope on it, you should see a series of pulses that go from 5V down to under .5 volts. If either of these does not happen, turn the potentiometer down until it does. Note that this circuit is designed so that if the pot is turned all the way down, the ring voltage will probably blow the optoisolator. For this reason, you should either mount the pot inside the box, so that it doesn't get bumped accidentally, or add another 5 or 10K fixed resistor in series with it. In any case, when you turn the pot low enough, the optoisolator should detect the rings. You may then wish to turn it just a little lower (for good luck) and you shouldn't have to worry about it again. That's all there is to it, really. It's not all that hard for a "hardware person" to construct, it will save you time, and it will greatly please your users. The designer of the device estimates a cost of $50-$60 for the whole thing; pretty cheap insurance, if it'll discourage board crashers, not to mention its other benefits. Try it -- you'll like it!