The brains of the switcher is the Atmel AT89C2051 microcontroller, IC4. Incoming ring is detected via C4, R7 and the opto-coupler IC2 and connected to pin 6 of the microcontroller. This pin also has the Password Reset switch connected to it (more on this later). The incoming call is answered by connecting the circuit based around Q1 and Q2 (an electronic holding coil) to the line via IC1, a bi-directional opto-isolator. This circuit has a low DC resistance but a high AC impedance which is required by telephone circuits when the line is looped. The RC network consisting of R4, R5 and C3 is used to provide impedance matching to the telephone line. The metal oxide varistor protects the switcher from telephone line transients.
The configuration and values used here are optimized for the Australian telephone system but they should work in all other phone systems. They may be changed to suit other telephone systems if it is desired to get official approval of this device. DTMF detection and decoding is provided by IC3. This chip, an 8870, is a complete DTMF receiver which is able to detect and decode all 16 DTMF tone pairs into a 4-bit code. When a valid DTMF digit is detected the 4-bit code is placed on pins 11-14 and a data available output, pin 15, is set to a logic high.
The output relays, RL1-4, are controlled via the relay driver IC6. One output from the relay driver (pin 14) is used to output a 800Hz software generated tone into the telephone line via the impedance matching network. This tone is used to signal the user when commands have been completed or of any command errors.
User settings are stored in IC5, a 24C01 EEPROM. The microcontroller talks to this device using a 2-wire I2C bus via pins 18 and 19. IC7 provides two functions a regulated 5V power supply output and detecting when the phone line is looped (in use). This chip is a Maxim MAX666 low power programmable voltage regulator with on-chip low battery detection, mainly intended for use in battery powered equipment. The regulator output voltage is set via the VSET input (pin 6). By tying this pin to ground the output is fixed at 5 volts. We have used the low battery input to monitor the state of the phone line. An idle (not in use) phone line normally has about 50VDC across its pair of wires. This voltage drops to less than 20V when the line is in use. The MAX666 Low Battery Input (LBI, pin 3) is one side of a simple voltage comparator which compares this input to an internal 1.30V reference voltage. When the voltage at the LBI input falls below the reference voltage then the Low Battery Output (LBO, pin 7) will go high. The phone line is connected to the comparator input via the diode bridge B2 and resistors R15 and R16. The diode bridge makes sure that the voltage polarity connected to LBI is the same regardless of which way around the phone wires are connected. The resistors form a voltage divider which is used to set the low battery threshold at LBI. For the values used the LBO output will go high when the phone line voltage drops below 25 volts, indicating that the line is in use (looped).
PRE-TESTING
Insert IC7 (MAX666) and connect a 9-12V power supply to the DC input jack. Use a multimeter to check the 5V supply. Easiest place to measure this is across pins 20 (+) and 10 (-) of the IC4 socket. If all is well then remove power and insert the rest of the ICs into their sockets. Check that the IC legs are actually inserted into the socket and not accidentally bent up underneath the IC body (quite a common fault).
USING THE KIT FOR THE FIRST TIME
Before you can use the kit for the first time the various user settings must be set to their default values. To do this, press AND hold the 'Password Reset' button while powering up the kit. Hold the button down for a further 2 seconds before releasing it. This procedure is also used you user forget the password.
The default value for each setting is:
Password ................ 0000
Tamper ................... 3
Rings to answer ...... 3
Auto hangup ........... 30 seconds
Lockout .................. Disabled
Each of these settings can be changed by the user to suit.
FINAL TEST AND OPERATION
Connect the kit to the phone line using a suitable cable. Note that the kit uses the two inner pins on the RJ-11 plug. Some cables do not check before using. Turn on the power. If using the kit for the first time follow the procedure described previously to set the user settings to their default values. The kit is now ready for incoming calls. Dial the phone number to which the kit is connected. After 3 rings it will answer with 4 short beeps. Type in the password (0000) followed by the '#' key. If the password is correct the kit will respond with 4 short beeps. It is now waiting for a command.
COMMANDS
A command is a string of characters starting with *
or # and ending with a #.
Entering a * at any time after the first character aborts
and starts again.
1. *<1-4># - operate one of the four relays 1,2 3 or 4.
2. #<1-4># - release one of the four relays 1,2,3 or 4.
3. *5# - set password
4. *6# - set tamper setting
5. *7# - set number of rings to answer
6. *8# - set auto hangup time
7. *9# - set lockout time
8. *0# - forced disconnect
9. #0# - release ALL relays
Commands 3-7 require additional data. After the command is entered the unit will issue a single, short beep as a prompt for the data. Enter the required data followed by # to finish. A description of the data to be entered is given in the section "USER SETTINGS".
Validate your login
Sign In
Create New Account