Wednesday, July 8, 2009

IR remote controlled switch



I am back with an another easy to make stuff. This time I have made a remote controlled switch.This switch will turn on & off when a button on its remote is pressed.

Now lets do some brain-storming on this. I have used IR rays to transmit the command to turn on or off the switch. So first of all we need a IR transmitter and an IR receiver.
Earlier I wanted to use IR rays of constant intensity (i.e. driven through d.c. current) on the transmitter side (To know more about IR rays and how to use them in communication, visit: IR Transmission post on my blog ). But IR receivers (or sensors) are available which are capable of detecting IR rays of some particular frequency. No good IR receivers are available which can detect IR rays of constant intensity. Phototransistors are available which can detect IR rays of constant intensity but they are sensitive to light also so they cannot be used.

So we have to use a circuit which generates a particular frequency as a transmitter. And a IR receiver which can detect the same frequency as generated by the transmitter.

How the whole thing works?

When a button is pressed on the transmitter side , IR rays of particular frequency will generate. They are detected by the IR receiver. As a result, IR receiver will produce a negative going pulse. This pulse is given to the counter circuit. In the counter circuit, if we see the last digit of the output, it has alternating output. When first pulse arrives, it goes high and remains high until next pulse arrives. On the next pulse it goes low and stays low until next pulse arrives. On the next pulse it again goes high and this thing is repeated. So now, when we first time press the button on the transmitter, the output on the counter IC goes high. On again pressing button, it goes low. Now we have to control the relay so that we can do the switching. Now the counter has a very low output current (~5 mA), and to energize the relay, we need current of approx. 20mA. So we have to use a transistor in common emitter mode to drive the relay on and off.
The whole circuit is divided in main two parts.

(1). Transmitter

"Ingredients" for the circuit

a 555 timer IC
0.0047uF ceramic or metal film capacitor
470 ohm resistor
5k variable resistor (potentiometer)
two high power IR LEDs
47ohm resistor

I have made a transmitter using 555 timer IC of 38KHz frequency. The output of
the
IC (pin no.3) is given to two IR LEDs through output resistor of 47ohm.

Circuit Diagram




(2). Receiver

"Ingredients" for the circuit

TSOP1738 IR receiver module
74LS90 Decade counter IC
BC547 Transistor
100 ohm resistor
15k resistor
50k resistor
LED
7805 voltage regulator IC
12 v Relay
100uF electrolyte capacitor

Circuit Diagram

The whole receiver can be divided in three parts.

1. IR sensing circuit

To detect 38KHz IR, I have used TSOP 1738 (click here for datasheet) IR receiver module. The function of this module is as described below.

TSOP1738



This receiver module has three pins. One for Vcc(+5v) (pin no.2) one for ground (pin no.1) and one for output (pin no.3). Normally, when sensor is black (i.e. no IR rays falling on it), the output pin stays high. But when it detects 38KHz IR rays, the output pin goes low momentarily thereby producing a negative going pulse. To use it we will have to build a circuit to bias it as described in the datasheet.

2. Decade counting circuit
As a decade counter, I have used 74LS90 (click here for datasheet) decade counter IC. Since it accepts negative going pulses, it is a good choice to be used with the IR sensing module.

3. Relay driver circuit
Output of the decade counter is used to drive the relay on or off. For this I have used BC 547 transistor in common emitter mode. The output from the decade counting IC is given to base of the transistor through a 50K resistor. And a 12v relay is connected in place of collector resistor. So when the output of the counter IC is high, base of transistor is forward biased, thereby turning on the relay. When the output of the counter IC is low the relay is turned off.

When you have made the circuit, put the transmitter in front of the TSOP1738 receiver and keep changing the value of 5k pot. on transmitter till the LED on receiver blinks. Now you are ready to use the circuit. I have made the circuit on the PCB and it has quite good range (approx. 15 foot).

If you have read the post and like to add something or have any trouble making this or have anything to say, then post a comment or mail me at dmehta17@gmail.com

Wednesday, March 4, 2009

IR(Infrared) Transmission

Here is a small & easy to make project to learn how IR transmission works.

Things you need to know:
(1). IR(Infra red) : Like light rays IR is also a type of ray. But since it has longer wavelength than visible light, we can't see them with our eyes. It has many applications like thermal Imaging, IR communication etc.

(2). Photodiode : A photodiode is like a simple diode, but the main difference is that the reverse resistance of a photodiode changes with respect to intensity of light falling on it. Thus we can say that resistance of a photodiode in reverse bias depende on the light falling on it. But the characteristic of a photodiode which I have used in this circuit is that photodiode's resistance also changes when IR(Infra red) rays fall on it. Thus I have used photodiode as a detector to detect IR rays in this project.

(3). IR LED : It is same as a simple LED but it emits IR rays rather than light. The intensity of IR rays depend on the voltage applied to it.

Circuit diagram

Any wireless communication system has three important parts.
1. Transmitter
2. Receiver
3. Transmission Medium

1. Transmitter : In this project I have used a simple IR LED to transmit IR rays. I have given input signal(It can be any type of electrical signal. I used sine wave of 5v amplitude) to battery and then to IR LED. Thus IR LED will emit IR rays whose frequency is same as frequency of input signal & its intensity depends on amplitude of the input signal.

2. Receiver : As I have mentioned above, a photodiode's resistance changes when IR rays fall on it. Thus we can use photodiode as a IR detector. I have applied reverse biasing to photodiode & connected a 500 ohm resistor. Now when IR rays fall on photodiode, its resistance changes,depending on the intensity of IR rays falling on it. So the current through the 500 ohm resistor changes. Thus this circuit acts as a IR detector.

3. Transmission Medium : It is clear that this circuit uses IR rays as a transmission medium.

Now when the receiver is given any sort of electric signal & IR LED is placed in front of photodiode the same signal as applied to receiver is produced accross the 500 ohm resistor. We can see the output with the help of a C.R.O.
I have tried this circuit & as you can see in the video , as soon as I place the photodiode in front of the IR LED we get the output(sine wave,which is input on transmitter side) same as the input as seen on C.R.O.

Friday, February 27, 2009

A simple oscillator

A simple oscillator using a relay and a capacitor

In simple meaning an oscillator is a device which does not remain in a steady state, but oscillates between two states at a certain frequency.In this oscillator I have used only one capacitor & a relay.

Brief about relay:
Symbol of a relay is shown in the diagram.
In simple words a relay is like a simple switch but the relay is controlled by passing current through its coil.Most of the relay has two terminals called NO & NC. NO stands for Normal Open.
As the name suggests when the current is not passing through the relay it remains open. NC stands for Normal Closed. It remains closed in its steady condition. Now when we pass a certain amount of current through it, it is actuated & NO becomes closed & NC becomes open.
Thus relay is a switch which can be triggered by passing a certain amount of current through it.

Circuit Diagram

Take a look at the circuit diagram of the oscillator.
When the battery is connected, at that instant, Capacitor being shorted by NC terminals, capacitor acts as a short circuit and lets the current to pass through it. Therefore the current passes through the relay so it is actuated and NC becomes open. Now capacitor starts charging so for sometime it lets the current flow due to its charging characteristics. After it is charged it blocks the current so the relay comes in its initial state. So again NC terminals discharge the capacitor & the whole process continues & the switch in relay oscillates.
I have tried it & it works fine.
Although there are oscillators which uses transistors & are more accurate than this one, this type of oscillator can be used where we need some type of LED blinking arrangement or something like that.