|Home | Articles | Forum | Glossary | Books|
by THOMAS E. BLACK
YOU SLIP THE FLOPPY IN YOUR A-drive, copy the files to your hard disk-and discover that you forgot the latest update to the report you worked on last night at home. What do you do? Make the trip back home, possibly wasting hours in the process? Not if you have RingThing. In that case, you just dial home, boot your PC, and download the file directly to your office. Ring-Thing is also useful for consultants and anyone who needs occasional remote access to a PC, but who doesn't want to leave his or her PC on all the time, risking intrusion by hackers.
Ring-Thing acts as an interface between your phone line and an AC power strip, as shown in Fig. 1. When Ring-Thing recognizes a set number or pattern of ring signals, it turns on a relay that applies 117 VAC to whatever is plugged into the power strip. After the phone connection terminates, Ring-Thing waits 5-6 minutes and then removes power from the power strip. Ring-Thing can control IBM compatibles, Macintoshes, Amigas-even non-computer equipment. And a special software module allows special tricks with an IBM compatible PC. An on-board 68HC705 micro-controller provides simple operation and sophisticated features, summarized in Table 1.
You can order a complete kit of parts for about $80, and partial kits containing hard-tofind parts, commercial-quality double-sided PC boards, and software. The RE-BBS (516293-2283, 1200/2400, 8N1) also carries the software; look for file RINGTHNG.EXE, a self-extracting archive that contains C + + source and object code for the optional IBM control module, and a Motorola format hex file containing the object code for the microcontroller.
Firmware source code is not available.
Operating modes and controls
Ring-Thing has two jumper-selected modes of operation: Ring Counting and Ring Pattern.
Ring Counting (Standard Mode)
After one or ten rings (jumper selectable), Ring-Thing
TABLE 1 RING-THING FEATURES
Microprocessor-based design for user-friendly operation
Compatible with all computer equipment
Compatible with all standard business and home telephone lines
Modular two-piece design for convenient mounting
Automatically controls computer equipment power during modem or PC fax connection Provides security for computer modems
Provides convenient manual on /off power control for computer equipment
Computer-controlled power-down mode applies AC power to the power strip. When the computer boots, the modem (or Fax) seizes the phone line to allow remote communications. One ring is best for Fax transmissions, ten for modem communications.
MAIN BOARD -- PARTS LIST
All resistors are 1/4-watt, 5 %, except as noted
R1, R22--470 ohms
R2, R7, R8, R10, R11, R12, R13, R21--100,000 ohms
R3, R4--47,000 ohms
R5-22 ohms R6, R17--10,000 ohms
R9, R14--470,000 ohms
R15-1000 ohms R23-1000 ohms, 1/2 watt
Capacitors C1, C2, C4, C5, C10, C11, C12, C13, C15-0.1 µF, 50 volts, monolithic, radial C3, C6, C16, C18-10 µF, 16 volts, electrolytic, radial C7, C8--27pF, 100 volts, COG ceramic (see text)
C9, 014-0.01 µF, 100 volts, polyester, radial
C17-470 µF, 25 volts, electrolytic, axial
IC1MC68HC705K1, 8-bit CMOS microcontroller IC2LM358N, low-power dual op-amp IC674HCT14, CMOS hex inverter IC7CD4001, CMOS quad NOR gate IC8LM2931T-5.0, low dropout regulator BR1-W005 or RB151, 50-volt, 1-amp diode bridge D1, D41N4148 or 1N914, switching diode D2, D3, D5, D6, D10, D11, D121N4003, 200-volt, 1-amp rectifier diode LED1--T1-3/4 green LED LED2--T1-3/4 red LED MOV1-130-volt, 11-15 Joule surge suppressor
Q1--PN2222, general-purpose transistor
JU1, JU2-2-pin header with shorting block XTAL1-4.00-MHz quartz crystal, HC18
HC49 pkg, or 4.00-MHz resonator (see text)
SPKR1-8-16 ohms speaker, 1-2" S1, S2 switch, SPST, NO, momentary, pushbutton, panel mount
Modular telephone cord, 6 feet
Four-conductor cable, 22 AWG, 6 feet
IC Sockets, enclosure, screws, circuit
Ring Pattern (Shared Mode)
Similar to Ring Counting mode, except that AC power is enabled only if the caller allows the phone to ring 1-3 times, hangs up, and then calls back within 45 seconds. Pattern mode provides additional security over Counting mode; it also allows you to share one phone line among several devices, for example, by setting an answering or Fax machine to answer on the fourth ring.
Call duration of both modes is indefinite. As long as your modem or Fax adapter continues to seize the line, Ring-Thing will apply power. Five minutes after your device relinquishes the line, Ring-Thing removes power. The delay allows you to reestablish the connection if the phone call terminates accidentally.
Two front-panel pushbutton switches control Ring-Thing's operation: ON / STANDBY and POWER ON /OFF. They operate as follows.
ON /STANDBY enables remote control, indicated by an illuminated green LED, which also blinks when the phone line is in use.
POWER ON /OFF functions in place of the ON /OFF switch on the AC power strip to control power to all equipment plugged into the strip. Rather than fumble for the main switch on your power strip, you now simply tap this button to turn on your equipment. As a safety feature, you must push and hold the button momentarily to turn your equipment on or off. The adjacent red LED illuminates when the computer has been turned on manually. The LED blinks slowly if power was enabled by the phone ring mode; a faster blink rate indicates that power will shut off automatically within two minutes.
Remote control Activating the system for remote control by a PC takes five simple steps.
1. Set your modem (or Fax board) to answer on 1-4 rings.
See your board's documentation for instructions on how to do that.
2. Set up your computer so that your favorite modem (or Fax) communications program executes automatically after the computer boots.
3. Plug Ring-Thing into the same telephone jack that your modem (or Fax board) uses. You can use the jack on the back of your modem (or Fax) usually labeled "Line."
4. Plug your computer, monitor, and other peripherals into Ring-Thing's AC power strip.
Leave the power switches of the Ring-Thing's power strip and all the computer equipment in the on positions.
5. Plug in the Ring-Thing and enable Ring Detection by pressing ON / STANDBY. At this point, Ring-Thing is armed and ready for action.
Optional power down Have you ever started a program that you knew wouldn't finish for hours-like printing the OS /2 documentation files? Just start the program and let Ring-Thing power your PC down when it's through. This feature does not involve the telephone system at all. What it does is allow a PC user to turn the computer's power off from within DOS. By connecting Ring-Thing to a spare LPT port, you can use RT.EXE to send a power-off command. The command can be issued directly from the keyboard, or indirectly via a DOS batch file. Sixty seconds later, whatever is connected to the Ring-Thing will be turned off.
The delay allows the computer to perform other batch operations (e.g., parking the hard drive). Power-down mode works with both ring-detection modes.
To send the power-down command while connected to LPT2, type the following: RT /LPT2 /OFF. followed by the ENTER key. You will hear a one-minute warning beep, and the red LED will flash.
After one minute, the PC will shut off. To cancel power-down mode, merely tap S2.
Circuit overview Ring-Thing consists of two main functional units: the AC power strip and the control unit, as shown in Fig. 2. The power strip contains the AC sockets whose power is controlled, the control relay, and a 12-VAC transformer. The control unit contains the micro-controller and seven functional areas: a ring detect circuit; LED drivers; a 12-volt power supply; speaker, LED, and parallel-port drivers; and switch and jumper inputs. Note that the control unit has three separate ground circuits: analog for the ring detector, digital for the micro-controller and functional units, and a separate relay ground. All the grounds come together at the power supply. Now let's look at each section of the circuit in more detail.
POWER BOARD PARTS
RY1--Relay, SPST, 12V Coil, Guardian 1715-1A-12D T1 120 VAC to 12VAC, 120 mA
Transformer, Mouser 41PG120 PC board, plastic strain reliefs, plastic spacers ( #4 x 1/4"), 4-40 x 1/2" machine screws with nuts, 14 AWG stranded wire
OPTIONAL PC POWER-DOWN PARTS
IC3, IC4, IC5PS2502-1 NEC
Optoisolator D7, 08, D91N4148 or 1N914 signal diode R16, R18, R19, R20-2200 ohms 5conductor cable (22 AWG, 6 feet), DB25 25 Pin Male (Pin) Connector and Hood, control software
ADDITIONAL PARTS NOT SUPPLIED IN KIT
B1-9-volt NiCd battery, Duracell NC1604 or equiv.
Multioutlet AC power strip (see text) with 6-amp 3AG fuse and holder
The following parts are available from Digital Products Company, Attn: Thomas E. Black, 134 Windstar Circle, Folsom, CA 95630, 24 hr phone /FAX: (916) 985-7219. Ring-Thing Kit: (All components, programmed micro-controller, enclosure, PC board set, documentation, less PC power-down feature): $79.95. PC power-down kit (parts, DB25 cable, software): $9.95. Basic kit (PC board set, microcontroller, transformer, relay, software, documentation): $59.95. PC board set ( #RT001): $24.95. Programmed MC68HC705K1 microcontroller: $14.50. Six-outlet metal power strip with fuse kit: $16.00. Rechargeable battery, 9-volt size, NiCd: $7.00. Documentation package with schematic: $4.75. PC software, 5" disk only, includes RT.EXE source: $7.50. All orders add $4.50 S &H ($9.50 to Canada). CA residents add applicable sales tax. U.S. funds only. MasterCard, Visa accepted. Prices subject to change.
TABLE 2-LED STATUS INDICATION
On /Standby and Power-on LED's flashing rapidly On /Standby LED on--On /Standby LED flashing rapidly On /Standby LED blinking slowly Power-on LED On Power-on LED blinking slowly Power-on LED flashing rapidly (two minute warning). Ring detect on Phone ringing Phone line in use Manual AC power Ring invoked power AC power timeout
AC power fail
TABLE 3--RING-THING AUDIBLE ALERTS
Short beep Short modulated beep Chirp sound Slow beep Power On /Off button pushed On /Standby button pushed Phone ringing AC power auto-turn off (one minute warning)
Detailed circuit description
AC Power Strip Ring-Thing uses a standard AC Power Strip, but modifies the wiring so that the output of the strip's ON /OFF switch also passes through the relay contacts, as shown in Fig. 3. To obtain power from the strip, the switch must be on and the relay must be energized.
The power board (including the relay and power transformer) was designed to fit inside the recommended power strip with little room to spare. There may be interference problems if you use other components.
Microcontroller Ring-Thing's intelligence is provided by IC1, a low-cost, 8-bit MC68HC705K1 made by Motorola. The microcontroller contains a central processing unit (CPU), as found in your desktop computer. However, it also incorporates 32 bytes of random-access memory (RAM), 504 bytes of read-only memory (ROM), 10 digital input/output lines, timer-based interrupt support, and external-interrupt support. In other words, it's a complete computer housed in a single IC-a 16-pin IC at that! Of course the microcontroller needs software to operate; software is stored permanently in the internal ROM. Because the software is nonvolatile-it remains even when power is removed-it is called firmware.
The firmware uses all 504 bytes of program ROM to implement a sophisticated real-time operating system. Major events (e.g., ring detection, tone generation, and LED and relay control) are interrupt driven, so all features work together seamlessly. The firmware uses the timer-based interrupt to schedule tasks that need to be performed, and the external interrupt to monitor telephone-line activity. The firmware uses RAM for storing temporary data (e.g., current ring count, remaining time, and beep duration). Although there are only 32 bytes of RAM, it's more than enough for our application.
Firmware source code is not available; however, the author has made the object code available in S-record format. It is contained in the file RT.S19, available from the RE-BBS as part of RINGTHNG.EXE, and from the author directly, as mentioned in the Parts List. Because a special programmer is required, preprogrammed microcontrollers are available separately (see Parts List). Figure 4 shows the micro-controller and switch /jumper input sections. Components C1, D1, and R2 provide a power-on reset function for IC1; C7, C8, and XTAL1 provide a steady 4-MHz clock.
Of the ten digital I/O lines, four (PAO PA3) monitor the switches and configuration jumpers, two (PBo. PBi) monitor the PC's parallel port, and the remainder (PA4 PA7) drive the LED, tone generator, and relay circuits.
The PAO and PAI microcontroller inputs monitor the ON /STANDBY and POWER ON/ OFF switches (S1 and S2, respectively). Although the switches are momentary contact, normally-open switches, the software "de-bounces" them to emulate toggle switches.
The PA2 and PA3 inputs read the condition of JU1 and JU2. If JU1 is installed, then Ring-Thing operates in Ring Counting mode; if JU1 is not installed, then Ring Pattern mode.
If JU1 is installed (i.e., the user selected ring-counting mode), then JU2 determines the number of rings before applying power. If JU2 is installed, Ring-Thing waits 10 rings before answering; if JU2 is not installed, 1 ring.
Now let's look at the output circuits, shown in Fig. 5.
Figure 5-a shows the LED circuit. Inverters IC6-c and IC6-d drive the LED's to provide the necessary sink current. (Note that IC6-c also connects to the parallel-port driver circuit, in which it drives an optoisolator.) The LED's provide several types of status information, summarized in Table 2.
Figure 5-b shows the tone-generator circuit, which is driven by PAS of the microcontroller.
The tone generator is a simple monostable multivibrator; R21 and C14 form an RC time constant circuit that causes IC7 to oscillate at about 1 kHz. Op-amp IC2-b then drives the speaker.
The microcontroller can create different sounds by modulating the beep frequency. During normal operation, you will hear the sounds listed in Table 3.
Figure 5-c shows the relay-driver circuit. Transistor Q1 turns on whenever PA4 goes high; diode D12 protects transistor Q1 from voltage spikes that could occur when the coil is de-energized.
Next time We're out of space in this article. Next time we'll complete the circuit description and go on to build a Ring-Thing. Meanwhile, you might want to order parts and software. See you then!
Also see: Light Beam Communicator
|PREV.||NEXT||More E-N articles||HOME|