0% found this document useful (0 votes)
134 views

QUASAR CODES 3140 - DTMF Telephone Relay Switcher: General Guidelines For Electronic Kits and Assembled Modules

This document provides instructions for assembling and using the Quasar Codes 3140 DTMF Telephone Relay Switcher kit. The kit allows users to remotely control up to 4 relay outputs using a DTMF phone and includes a plastic case. Key features include 4 relay outputs rated for 5A at 240VAC/24VDC, connection for a 12-15VDC power supply and telephone line, and user-configurable settings via an onboard microcontroller and EEPROM chip. Assembly instructions provide details on soldering components to the PCB and installing it within the plastic case.

Uploaded by

Niamat Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

QUASAR CODES 3140 - DTMF Telephone Relay Switcher: General Guidelines For Electronic Kits and Assembled Modules

This document provides instructions for assembling and using the Quasar Codes 3140 DTMF Telephone Relay Switcher kit. The kit allows users to remotely control up to 4 relay outputs using a DTMF phone and includes a plastic case. Key features include 4 relay outputs rated for 5A at 240VAC/24VDC, connection for a 12-15VDC power supply and telephone line, and user-configurable settings via an onboard microcontroller and EEPROM chip. Assembly instructions provide details on soldering components to the PCB and installing it within the plastic case.

Uploaded by

Niamat Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

QUASAR CODES 3140 - DTMF Telephone Relay Switcher

General Guidelines for Electronic Kits and Assembled Modules


Thank you for choosing one of our products. Please take some time to carefully read the important information below concerning use of this product. The assembly and operating instructions are on the following pages. WEEE Directive (Waste Electrical and Electronic Equipment) Notice To All European Union Citizens. Important environmental information about this product. The crossed out wheeled bin symbol on this product, package or documentation indicates that disposal of this product after its lifecycle could harm the environment. Do not dispose of this product (or batteries if used) as unsorted municipal waste. It should be disposed by a specialized company for recycling. The unit should be returned to your distributor or to a local recycling service. Please respect the local environmental rules. If in doubt contact your local authorities about waste disposal rules. Safety: General rules concerning safe use of our Kits or Modules. To ensure your safety, please observe these safety measures. In no way are these complete. As safety requirements vary, please check with your local authorities, in order to comply with local requirements. If in doubt, seek the help of a qualified person. Battery or wall-adaptor operated devices are safe devices. They do not require special attention unless mains voltage is connected to an output e.g. a relay. To ensure electrical safety, and also protection from fire or personal injury, make sure your mains operated equipment complies with these safety hints: Use a suitable plastic enclosure. If a metal enclosure is used, make sure it is properly earthed. Use a power switch if the device consumes more than 10W. Use a double pole switch for mains operated, transformer-less kits. Mount a fuse in series with the mains switch. Use a slow blow (T) 50mA fuse for transformers up to 10W and a 100mA fuse for transformers up to 20W. Use a mains input connector, or a robust power cord with a clamp. Internal wiring carrying mains voltages must have a minimum cross-sectional area of 0.5mm2.

If supplied, attach the power rating label near the power cord of the device and fill-out the mains voltage, frequency, power consumption and fuse values. Troubleshooting and Support 90% of non working kits are due to poor soldering. We operate a Get-You-Going service for non-working kits but there is a charge based on the time and components needed to complete the repair. Quite often it is not economically viable for us to repair and it is cheaper to supply a new ready made product at full cost. Disclaimer Quasar Electronics reserves the right to change product specifications or to discontinue products without notice. Quasar Electronics cannot be held responsible for any loss or damage, direct or indirect, which might occur from the use of a product. Quasar Electronics Kits or Modules are intended for educational and demonstration purposes only. They are not intended for use in commercial applications. If they are used in such applications the purchaser assumes all responsibility for ensuring compliance with all local laws. In addition, they are not suitable for use as or as a part of life support systems, or systems that might create a hazardous situation of any kind.

QUASAR CODES 3140 - DTMF Telephone Relay Switcher


This device connects to the telephone line and can be used to remotely control up to 4 relay outputs using a DTMF (tone dialing) telephone. A number of user settings are available to improve the useability and security of the device. The unit comes complete with a small plastic case with silk-screened front and rear panels. NB This unit is not PABX compatible! The unit is controlled by an Atmel 89C2051 microcontroller. Source code is not available. ** WARNING! The maximum connection voltage is 48Vac unless the screw terminal block connectors are insulated to prevent exposure to hazardous voltages. FEATURES Ouputs Relays x 4 Output rating 5 Amps @ 240Vac** / 24Vdc max. Operating voltage 12-15Vdc centre positive (regulated) Operating current 30mA with no relays operated 120mA with all relays operated Connections 1. 2.5mm DC power jack 2. RJ-11 for telephone line 3. 4 x 3-way pluggable screw terminals for relay contacts Case size 13cm (W) x 10cm (D) x 3cm (H) (6.1 x 4 x 1.3) User Settings 1. Password (see text) 2. Tamper 3. Rings to answer 4. Auto hangup time 5. Lockout CIRCUIT DESCRIPTION We will not review the operation of how telephone lines work or the detailed operation of the various ICs used. See the References section for Web links where you can get this information. 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 optimised for use with most phone systems thoughout the world without any need for customisation. They can be changed by the end-user to meet specific needs if desired e.g. to meet local approval standards. 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 avaliable 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 lowbattery 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 LOW. 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 LOW when the phone line voltage drops below 25 volts, indicating that the line is in use (looped). PCB ASSEMBLY (AS3140 users can skip to page 2) First check the components supplied in the kit against the component listing. Identify all the components. It is generally best to solder the lowest height components first: the resistors, diodes & IC sockets. Leave the connectors and relays until last. Note that two components, resistor R14 and capacitor C11, are mounted inside the IC sockets for IC3 and IC4 respectively. This is no problem just fit these components before the IC sockets. Make sure to get the diodes and electrolytic capacitors the correct way around. Match up the bar on the diodes with the bar on the overlay. The negative lead of electrolytic capacitors is marked by a stripe whereas the PCB overlay indicates the hole for the positive lead. Page 2

QUASAR CODES 3140 - DTMF Telephone Relay Switcher


When fitting the MJE340 transistor, Q1, check the PCB overlay first. The thick line on the PCB indicates the back of the transistor which may have a metal surface. If not then use the markings on the transistor they indicate the front of the transistor. Make sure the power jack is facing straight out, not skew. We have made the front panel hole 0.320 which will tolerate some shewness. When mounting the connectors make sure they are sitting right down on the PCB before soldering. Do not insert any ICs yet! We are now going to fit the assembled PCB into the plastic case. Before that check all your work carefully. Look for unsoldered joints and any solder bridges or splashes that may be shorting out adjacent pins. Now comes assembly of the front panel. Start by inserting the LED clip into the hole, pushing it in from the front. Now insert the LED into the clip from the rear. The LED should click into place. Turn the LED in the clip so that the long lead is to the right (as viewed from the front). This is very important so make sure it is right. Now bend the leads down at right angles, about 3mm from the LED body, as shown below. Use a pair of long nose pliers to hold the leads while bending. Cut the leads off to a length of about 9mm from the bend. PRE-TESTING Insert IC7 (MAX666) and connect a 12-15Vdc 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 accidently bent up underneath the IC body (quite a common fault).

USING THE UNIT FOR THE FIRST TIME Before you can use the unit 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.

CONNJECTION AND OPERATION


Protect unit from power surge & lightening strike damage. Connect the unit to the phone line using a suitable cable (and filter if the line has broadband). Only the two inner pins of the RJ-11 plug are used. Some cables do not check before using! Connect a 12-15Vdc centre positive REGULATED power supply. On first use please follow the procedure described previously to set the user settings to their default values. The unit 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. 2. 3. 4. 5. 6. 7. 8. 9. *<1-4># - operate one of the four relays 1,2 3 or 4. #<1-4># - release one of the four relays 1,2,3 or 4. *5# - set password *6# - set tamper setting *7# - set number of rings to answer *8# - set auto hangup time *9# - set lockout time *0# - forced disconnect #0# - release ALL relays

Fit the front and rear panels to the PCB. Be sure that the LED leads are inserted into their matching holes on the PCB. While holding the panels in place slowly position the PCB into the base of the plastic case, making sure that the front and rear panels slide into the slots provided. Secure the PCB to the case using the self-tapping screws then solder the LED leads from the top of the PCB. Do not fit the plastic case lid just yet. Proceed to the next section PRE-TESTING. Now fit the plastic case lid and secure it in place. For 2 photos of the completed kit see

http://www.quasarelectronics.com/jpg/3140_1.jpg http://www.quasarelectronics..com/jpg/3140_2.jpg

Page 3

QUASAR CODES 3140 - DTMF Telephone Relay Switcher


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. WHAT DO THE BEEPS MEAN? The beeps are used to acknowledge commands, prompt for more data or indicate errors. 4 short beeps - valid command entered. 2 short beeps - command aborted by user 1 short beep - more data required 1 long beep - command error 3 long beeps - disconnecting (hanging up) When this feature is disabled the unit expects the the call to be answered 'externally', eg. by an answering machine. Everything else works as normal, including entering a valid password. The only difference is that it does not automatically answer the incoming call. Auto hangup time (00 - 99 seconds) This is the length of time that the unit will wait for a VALID command. If this time is exceeded then the unit will automatically disconnect itself (hang up) from the call. A valid command includes entering a correct password at the start. A value of 0 disables this feature (no auto hangup). Note: Do not set this value too short the user will need time to enter their commands! Lockout time (00 - 99 minutes) This only comes into effect when the tamper setting has been exceeded on the PREVIOUS call. This is the length of time that the unit will wait AFTER disconnecting (hanging up) before it will answer the next call. A value of 00 disables this feature (no lockout). For example, suppose the tamper setting is 3 and the lockout time is set to 10. The unit receives a call and answers it. If a valid password is NOT entered in 3 attempts the unit will disconnect (hangup) and then wait for 10 minutes before it will answer any further calls. In other words, further calls a 'locked out' for 10 minutes. This security feature helps prevent multiple attempts at 'hacking' into the unit by introducing a delay time between calls being answered. WHAT IF I FORGET MY PASSWORD? In this case you will need to follow the procedure in USING THE KIT FOR THE FIRST TIME. This will reset the password to 0000. However it will also reset all the user settings to their default values. You will have to re-enter them as required. IT DOESNT WORK WHAT DO I DO? 1. Check that all components are in their correct place and the correct way around. Check for unsoldered joints and solder bridges or splashes. 2. Is the 5V supply OK? 3. Any IC legs bent up under the IC body? 4. Is the phone line cable using the two inner pins on the RJ-11 plug? Is a broadband filter needed?

A "forced disconnect" command will cause 3 long beeps to be sent back to the user before the switcher hangs up. USER SETTINGS These are stored in non-volatile memory (EEPROM) and are not affected by loss of power. None of these settings are defined initially - they have to be 'set' to their default values before you can use the kit (see USING THE KIT FOR THE FIRST TIME). Password (4 - 8 digits) From 4 to 8 digits long using any number from 0 to 9. Tamper setting (0 - 9) The number of attempts allowed at entering a valid password. A value of 0 disables this feature (unlimited). If the tamper setting is exceeded then the unit will automatically disconnect and go into lockout if enabled (see Lockout time). Number of rings to answer (0 - 9) Number of incoming rings required before the unit will automatically answer the call. A value of 0 disables this feature (does not automatically answer). Valid ring is defined as having an "off" time of more than 1 second between each burst of ring. So the American single ring, and the European double ring are both seen as a single ring. If the caller hangs up BEFORE the number of rings to answer have been received then the unit will wait 10 seconds before 'resetting' itself to wait for the next call.

Page 4

QUASAR CODES 3140 - DTMF Telephone Relay Switcher


5. If you are finding the unit is behaving erratically then you might wish to check that your phone line has been wired with the correct polarity. The details for the typical BT home phone system are shown below.

Master Socket Schematic

Master Socket Wiring

Although pin 4 has no function in a domestic installation it is usually connected for the sake of neatness. The quality of wiring carried out by many older BT wiremen is often approaching art in its perfection. The BT Drop Cable (The cable coming from the outside world) This often has Orange, White, Green and Black wires. Usually (but not always) Orange and White are the active pair and go to connections 2 and 5. In some master boxes (such as the type with a removable front section) they go to two connectors marked A and B. Which way around they are connected usually doesn't matter but 3140, some modems (especially older USA sourced ones) and some answering machines are fussy about polarity, so it's wise if possible to check the voltage on the line and connect -48V to the B leg (J2) and 0V to the A leg (J5).
Page 5

QUASAR CODES 3140 - DTMF Telephone Relay Switcher


REFERENCES Understanding Telephone Electronics, by J. Fike & G. Friend, published by Sams (ISBN 0-672-27018-8) The newsgroup sci.electronics.basics frequently discusses telephone related questions. Visit http://www.atmel.com for a datasheet on the 89C2051 microcontroller and 24C01 EEPROM. MAX666 datasheet from Maxim http://pdfserv.maxim-ic.com/arpdf/MAX663MAX666.pdf LCA110 datasheet from CP Clare http://www.clare.com/home/pdfs.nsf/www/ Lca110.pdf/$file/Lca110.pdf PARTS LIST Resistors (0.25W carbon film unless specified) 56R 1W green blue black .. R3 ................................. 1 100R brown black brown .. R4 ................................. 1 820R gray red brown ......... R5 ................................. 1 1K brown black red ........... R18,22 .......................... 2 2K2 red red red.................. R6 ................................. 1 8K2 gray red red................. R21 ............................... 1 10K brown black orange ... R8,17,19,20 .................. 4 22K red red orange ............ R7 ................................. 1 47K yellow violet orange .. R1,2 .............................. 2 56K green blue orange....... R11 ............................... 1 68K blue grey orange ........ R12 ............................... 1 180K brown gray yellow ... R16 ............................... 1 220K red red yellow .......... R9,10,13 ....................... 3 270K red violet yellow ...... R14 ............................... 1 3M3 orange orange green .. R15 ............................... 1 Capacitors 27pF ceramic ...................... C12,13 .......................... 2 10nF 103 63V box poly...... C5,6 .............................. 2 100nF 104 monobloc.......... C7,8,11 ......................... 3 120nF box poly................... C3 ................................. 1 1uF 105 63V/100V poly..... C15 ............................... 1 330nF 250V poly................ C4 ................................. 1 1uF 63V electrolytic ........... C1 ................................. 1 4.7uF 63V electrolytic ........ C2 ................................. 1 10uF 25V electrolytic ......... C10,14 .......................... 2 100uF 25V electrolytic ....... C9 ................................. 1 Semiconductors 1N4004 diode ..................... D1,2,3 ........................... 3 1N4148 ............................... D4 ................................. 1 WO2 ................................... B1,2,3 ........................... 3 Diode bridge MJE340 NPN transistor...... Q1 ................................. 1 MPSA42 NPN transistor .... Q2 ................................. 1 CM8870 datasheet from California Micro Devices www.calmicro.com/products/data/pdf/cm8870.pdf DTMF Decoder, in Silicon Chip, 5/91, p30. DTMF Decoder, in Electronics Now, 11/93, p53. Build a DTMF Decoder/Logger, in Popular Electronics, 9/95, p37. For information about all Quasar Kits see our web page at http://www.quasarelectronics.com Send us email - mailto: [email protected] For technical support queries please contact our Support Team by email: mailto: [email protected] Semiconductors (cont.) LCA110 opto-isolator ........IC1 ................................ 1 4N25 optocoupler ...............IC2 ................................ 1 CM8870 ..............................IC3 ................................ 1 DTMF receiver AT89C2051-24PC ..............IC4 ................................ 1 ATMEL microcontroller 24C01A...............................IC5 ................................ 1 128x8 serial EEPROM ULN2003A .........................IC6 ................................ 1 MAX666 .............................IC7 ................................ 1 LED, 5mm Green................L1.................................. 1 Miscellaneous Crystal, 3.5795MHz............Y1 ................................. 1 Crystal, 12.000MHz............Y2 ................................. 1 Metal Oxide Varistor ..........MOV ............................. 1 Socket, RJ-11 ......................X1 ................................. 1 Pluggable header.................X2 ................................. 1 12 way, Dinkle 2EHDRC-12P DC jack, 2.5mm, PCB mtg .X3 ................................. 1 Pluggable socket .................for X2............................ 4 3 way, Dinkle 2ESDV-03P Relay, SPDT .......................RL1,2,3,4 ...................... 4 Goodsky RWH-SH-112D TACT pushbutton switch....S1 .................................. 1 LED clip, 5mm black..........for L1 ............................ 1 IC socket, 20 pin .................for IC4........................... 1 IC socket, 18 pin .................for IC3........................... 1 IC socket, 16 pin .................for IC6........................... 1 IC socket, 8 pin ...................for IC5,7........................ 2 IC socket, 6 pin ...................for IC1,2........................ 2 Self tapping screws for fixing PCB to case ............... 4 Plastic case, 130(W) x 100(D) x 30(H)mm ............... 1 PCB, 3140................................................................. 1 Set of front & rear panels........................................... 1

Page 6

GENERAL RELAY INFORMATION


Warning! Risk of Electric Shock!
This information concerns kits and modules with relay outputs. TO USE THE RELAY OUTPUTS SAFELY YOU MUST OBSERVE THE MAXIMUM VOLTAGE AND CURRENT LIMITS QUOTED IN THE PRODUCT DOCUMENTATION (this is because the board design may not be rated to switch the maximum voltage and current limits printed on the relay itself or specified in the relay manufacturers data sheet). Controlling mains equipment with relay outputs must be treated with extreme caution. Electric shocks can cause severe and permanent injury or even death. Construction, installation, testing and commissioning should only be attempted by suitably qualified persons, or under the supervision of a suitably qualified person. These products are not suitable for children. Before connecting mains powered equipment to the relay outputs please check with the relevant authorities in order to ensure compliance with all current safety regulations. Many areas of the assembly may operate at mains voltage. A suitable isolating enclosure must be used. Exposed screw terminal blocks on some products must be insulated to prevent contact with exposed metallic parts at mains potential. Connected equipment should be suitably fused.

You will find relay outputs on many of the kits and modules that we sell. A relay is an electrically operated on/off switch. The voltage and current limits specified in the product documentation generally relate to resistive or light inductive loads. Relay Terminals Most boards have SPDT (Single Pole Double Throw) style relays. These have three outputs: C = Common NO = Normally-Open contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive. It is also called a Form A contact or "make" contact. NC = Normally-Closed contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called a Form B contact or "break" contact. Connecting the Device you want to Control You must provide an external power source to the device you want to control. No voltage is present at the relay terminals (remember it is just a switch). The relay is normally connected in series with the positive (+) power wire of the device you want to control. In this case, the positive wire from the power source should be connected to Common. Then either the NO or NC terminal (as appropriate for your purpose) is connected to the positive (+) wire going to the device you want to control. The negative (-) wire does not connect to the relay at all. It goes directly from the power source negative output to the device negative (-) terminal. Typical SPDT Relay Connection Diagrams

Anti-Spark SPDT Relay Connection Diagram Sometimes the connected equipment can cause arcing across the relay contacts. This must be corrected by installing a resistor and capacitor (not supplied) between the two contacts of the relay as shown below. Component values are for 230Vac mains.

We accept no responsibility for injury, loss, or damage of any kind caused by or resulting from improper product assembly, testing, commissioning or use.

QUASAR CODES 3140 - DTMF Telephone Relay Switcher

Page 7

You might also like