Thursday, July 19, 2012

DTMF Decoder

DTMF (Dual tone multiple frequency) is the most popular and nowadays ubiquitously used telecommunication signalling method. A DTMF decoder detects the DTMF tones and generates the binary sequence corresponding to key pressed in a DTMF keypad. The circuit presented here is a DTMF decoder. DTMF keypads are used in almost all landline and mobile handsets. The DTMF decoders, therefore, are used at the telephone switching centres to detect the number dialled by the caller. The DTMF version used in pushbutton telephones is called touch tone and is a registered trademark of AT&T.

The circuit uses a DTMF decoder IC (HT9170). The DTMF tones are generated by the keypad of a cell phone or by the computer software available on www.polar-electric.com.
 
The tones generated from the speaker (audio signals) of keypad are given to microphone which converts audio tones into electrical signals. The signals from the microphone are processed by the DTMF decoder IC which generates the equivalent binary sequence as a parallel output.
 
 
The electrical signals from microphone (mic) are fed to inverting output (pin2; VN) of Op-amp, present in IC, through a series of resistance and capacitance of value 100 k and 0.1 µF respectively. The non-inverting input pin (pin1; VP) of Op-amp is connected to pin4 (VREF). The voltage at VREF pin is VDD/2. A feedback signal is provided, by connecting the output of Op-amp (pin3; GS) to inverting input pin (pin2; VN) through a resistor R2 (100 k).
 
The output of Op-amp is passed through a pre filter. The output from this pre filter is then supplied to low group and high group filters. These filters consist of switched capacitors and divide DTMF tones into low and high group signals. High group filters pass the high frequencies while low group filter pass low frequencies. These frequencies are then passed through frequency detector and code detector circuits. Finally the four-digit code is latched on the output pins of HT9170. The output on these pins has been used to drive a set of four LEDs.
 
The whole process, from frequency detection to latching of the data, is controlled by steering control circuit. So it is very important part of the whole process and is mainly controlled by RT/GT and DV pins of DTMF decoder IC. RT/GT pin is connected to VDD through a capacitor of 0.1 µF. The EST pin is connected to RT/GT pin through a resistor of 300k.
 
Pin6, PWDN pin (active high) inhibits the working of oscillator thereby stopping the working of circuit; and Pin5, INH pin (active high) inhibits detection of the tones of character A,B,C,D. The pin 10; OE (output enable; active high) enables the latching of the data on the data pins. Pin15; DV (Data valid pin) becomes high on detection of valid DTMF tone otherwise it remains low. An oscillator of frequency 3.579545 MHz is connected between pins 7 and 8.

Infrared sensor


This circuit is one of the most basic and popular sensor modules. In electronics, this sensor is analogous to human’s visionary senses which can be used to detect an obstacle which is one of its common applications. In robotics, a group of such modules are used so that a robot can follow a line pattern.
 The transmitter part of the sensor is an Infrared (IR) Led which transmits continuous IR rays to be received by an IR receiver. The output of the receiver varies depending upon its reception of IR rays. Since this variation cannot be analyzed as such, therefore this output can be fed to a comparator. Here operational amplifier (op-amp) of LM 339 is used as comparator.

When the IR receiver does not receive signal the potential at the inverting input goes higher than that that at non-inverting input of the comparator (LM 339). Thus the output of the comparator goes low and the LED does not glow .When the IR receiver receives signal the potential at the inverting input goes low. Thus the output of the comparator (LM 339) goes high and the LED starts glowing. Resistor R1 (100), R2 (10k) and R3 (330 ) are used to ensure that minimum 10 mA current passes through the IR LED, photodiode and normal LED, respectively. Resistor VR2 (preset=5k) is used to adjust the output. Resistor VR1 (preset=10k) is used to set the sensitivity of the circuit.

Automatic night lamp


Ever imagined how the street lights would turn on automatically in the evening and go off in the morning? Is there anyone who comes early morning to turn off these lights? The following circuit can perform this job properly. This circuit uses the output from a simple light/dark activated circuit and drives a relay in its output which can be further coupled to switch on/off an electrical appliance in a household.
An appliance can be made dark or light activated by slightly changing the circuit’s configuration.  This idea finds numerous applications such as, automatic watering of gardens at evening, automatic night lamp, dark activated siren and so on.

 A light dependent resistor (LDR) is used in this circuit to provide input to a comparator of LM339 (refer Automatic lightdark indicator). The output pin of the comparator goes high depending on the configuration of LDR so that it can be made light or dark activated. This output is connected to a transistor T1 (BC 547) which acts as a switch for the relay.
The high output of the comparator provides the necessary forward bias to the base-emitter junction of the transistor T1. Thus T1 jumps from cut off to saturation state and collector current flows. This collector current energizes the relay coil. The magnetic field produced by the relay coil shifts its connection from NO state to NC. An appliance connected to NC contact gets switched on.
When the output of the comparator is low, it is insufficient to drive the transistor T1 to saturation. Hence T1 moves to cut off and the collector current ceases to flow. Thus the relay coil gets de-energized and it switches the state from NC to NO mode. It is important to note that resistor R2 (20k) is provided at the base of T1 to check the base current.


Sunday, June 24, 2012

Touch Based Blinking Lights

This circuit demonstrates the principle and operation of application based on touch sensor. The circuit is divided into three parts: Input, 555 timer and output. A touch plate is used for the input and output can be seen across an LEDor a buzzer. Some application of the circuit include touch based blinking lights, touch buzzer, touch switch etc.
Click Here

The touch plates is connected to the trigger pin of the 555 timer IC. When we touch the touch plates the output of the touch plates becomes zero thereby providing an active low trigger to the IC 555. The IC is configured in the monostable mode .The output of the IC is a pulse whose frequency is set by the resistor (R1) and  capacitor (C1) according to the formula [F=1/(1.1*R*C)]. In this case it produces a pulse with frequency of about 0.9 hertz and time period of 1.1 seconds. In monostable mode pin7 (discharge pin) and pin6 (threshold pin) are shorted while R1 is connected between pin7 and Vcc and C1 is connected between pin 6 and ground. Reset pin (pin4) is connected to Vcc while control pin is connected to ground through a capacitor. The output can be observed on the LED, which glows for a small duration. This circuit can be used in the following applications:

To detect stray voltages produced by mains or to detect electrostatics build up in a room.
To make touch buzzers.
To implement touch switches like for a bell.

circuit 2, shows an improved version of this circuit. This circuit has a higher sensitivity as compared to circuit in figure 1. The output of the touch plate is connected to the base of npn transistor T1 (BC 547). The collector is connected to the Vcc through a resistor R1. The trigger pin of the IC is connected to the collector of the transistor. When no input is there on the base of the T1, T1 is in cut off state and hence the trigger pin is at logic high and therefore 555 do not produce any output. When we touch the plates T1 behaves like a closed switch trigger pin gets connected to ground, thereby producing the output at pin 3 of the IC.

Saturday, June 16, 2012

Digital code lock using 8051 microcontroller (AT89C51)


An  digital lock is a device which has an electronic control assembly attached to it. They are provided with an access control system. This system allows the user to unlock the device with a password. The password is entered by making use of a keypad. The user can also set his password to ensure better protection. The major components include a keypad, LCD and the controller AT89C51 which belongs to the 8051 series of microcontrollers. This article describes the making of an electronic code lock using the 8051 microcontroller. 


A 4x3 matrix keypad and a 16x2 LCD have been used here. Keypad and LCD are very commonly used input & output devices, respectively. A four digit predefined password needs to be specified the user. This password is stored in the system.
While unlocking, if the entered password from keypad matches with the stored password, then the lock opens and a message is displayed on LCD. Also an output pin is made high to be used for further purpose.
The connections in the circuit are as following: port P2 of microcontroller AT89C51 is used as data input port which is connected to data pins (7-14) of LCD. P1^0, P1^1 and P1^2 pins of microcontroller are connected to control pins RS, RW and EN of LCD. Port P0 is used to take input from keypad. P0^7 has been used as lock output pin of controller.
As the program starts, string ‘Enter Password’ is displayed on LCD. The keypad is scanned for pressed digits one by one. Every time, row and column of the key pressed is detected and a ‘*’ is displayed on LCD corresponding to the entered number. After the four digits are entered, the user is prompted to ‘Confirm Password’ and again the input is taken through LCD. If the passwords do not match, a message is displayed to indicate ‘Wrong Password’; otherwise the user is prompted to unlock the device.
To unlock, user needs to ‘Enter Password’ through keypad. Again the keypad is scanned for pressed keys and corresponding digits are identified. The passkey is displayed as ‘****’ on the LCD screen. After the four digits are entered, they are compared with the pre-set password. If all the four digits match with set password, LCD displays ‘Lock Open’ and the lock output pin goes high. If the security code is wrong, ‘Wrong Password’ is sent to be displayed on LCD. The system gets locked if more than three attempts are made with wrong password to open the electronic lock. The system needs to be reset in such a case.

Thursday, June 14, 2012

2 in 1 Room Bell

The roombells are used to produce a ringing alert sound so that the resident comes to know that a visitor is there on the door. Many homes have two doors for entering. So at times it is confusing for the resident to find out on which door is the visitor present. This roombell circuit produces two different sounds can be used simultaneously on both the doors.

The roombell circuit is made up of CMOS LSI designed UM3561 IC which consumes less power. It is commonly used in toys and alarm watches because of its low cost. A compact sound module can be constructed using this IC. It includes oscillator and selector circuit and only few components are required to be added externally. It also contains a programmed ROM to produce siren sound.

When the switch S1 or S2 is pressed, the pin1 or pin5 of the IC1 receives the high signal which is used to drive the transistor that is connected to pin3 of IC1. Hence the speaker gets the supply and IC1 produces the sound of siren so as to indicate the presence on the door. A transistor is used for the process of amplification as the output of pin3 is very low.
Many other different sounds can be produced by referring the datasheet of UM3561. Similarly many other ICs are there to produce different sounds i.e. UM3481, UM3484, and UM34811. 

USB Cell Phone Charger

Nowadays mobiles can also be charged using the USB outlet of PC. The Cell Phone charger circuit presented here can give 4.7V of synchronized voltage for charging the phone. As USB outlets can give 5V DC and 100mA of current. It is sufficient for slow charging of mobile phones so they can be used to charge the mobile phones. USB stands for Universal Serial Port. It is one of the latest methods to exchange information from PC to the real world. The USB port offers power to the external devices. +5V of power is available at pin1 and -5V of it is available at pin4.


USB Mobile Charger

Most of the Mobile Phones battery are rated 3.6 volts at 1000 to 1300 mAh. These battery sets have 3 Lithium cells which have 1.2 volt rating. Typically a battery pack sufficiently requires 4.5 volts and 300-500 mA current for fast charging. But low current charging is preferred to increase the efficiency of the battery. The circuit described here provides 4.7 V of the regulated voltage and a sufficient amount of current for the slow charging of the mobile phones. Regulated output is given by the transistor T1, output voltage is controlled by Zener diode ZD and the polarity of the output supply is protected by D1. Front end of the circuit should be connected to an A type USB plug, a red wire to pin1 and black wire to pin 4 of the plug for easy polarity recognition. The output of a suitable charger pin should be connected with the mobile phone. After the circuit is assembled, USB plug should be inserted into the socket and output should be measured from the circuit. If the output is OK and polarity is correct, connect it with the mobile phone and if the polarity is incorrect, it will destroy the mobile battery so extreme care should be taken. 
For making this circuit a USB cable is used with at least one male plug on it and strip back about 5 cm of the outer insulation with shield from the bare end of the USB cable. Normally, USB cables have four wires i.e. red, green, white and black. As green and white carry the data so they can be trimmed as they have no use here.. Mostly black wire is NEGATIVE and red is POSITIVE. The voltage across USB is about 5V with 500 mA as maximum current for any device. Now power lines are connected to the USB plug with correct polarity. Reflectors are used for LEDs to get maximum illumination.