home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / bbs / ringdet2.zip / RINGDET2.TXT < prev   
Text File  |  1988-01-03  |  13KB  |  193 lines

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