A Free Template From Joomlashack

A Free Template From Joomlashack

Sign in with a social network::

Powered by OneAll Social Login

Who is online

We have 18 guests online

Chat with us

Programmable IR sender/receiver PDF Print E-mail
Written by Vladimir Mitrović   

It’s normal for satellite, TV and hi-fi audio receivers, various recorders and players, air conditioning and many other devices to have remote controls. Some remotes have been designed for one specific device, whereas others are universal and tend to combine the functions of many remote controls in just one unit.

Most contemporary remote controls use an infra-red (IR) beam to transfer information to the IR receiver contained in the associated device. The way the information modulates the IR beam differs from device to device - otherwise other devices could respond in an undesired fashion, when you try to change the volume on your TV set, for example. This device discrimination was achieved by choosing different protocols and by giving various addresses to different devices.

Philips RC-5 and RC-6, Sony SIRC, NEC, RCA, Sharp, etc. - these are official names or nicknames given to modern, frequently-used protocols for IR communication. They differ in both carrier frequency and the type of modulation. Regardless of what type of modulation and carrier frequency is used, every message contains the address of the device for which it is intended. The receiving device will ignore all messages which carry unknown addresses, and react only to the messages sent by a matching remote control.

A remote control is basically a microcontroller which controls an infrared LED. Depending on the button being pressed, the microcontroller switches the transmitting LED on and off according to some pattern. The IR receiver, contained in the receiving device, receives these IR flashes, converts them into a series of electrical pulses and forwards them to the central microcontroller for further processing.

Remote controls and receivers are built around dedicated integrated circuits that perform this job reliably. However, a general-purpose microcontroller like the ATtiny2313 can also do the same job, and Bascom-AVR has several statements for this purpose. Currently, these are intended for receiving messages according to the RC-5 protocol (GETRC5) or sending messages according to the RC-5, RC-6 and Sony protocols (RC5SEND, RC6SEND, SONYSEND). This project goes further and enables the user to receive and send IR messages which follow other frequently-used protocols.

Part 1: Let’s read an IR message

An IR-receiver for remote control systems is usually a dedicated IC such as the SFH506, TSOP1138 or their relatives. The IC is built in a black-coloured case, designed to filter out ambient light, and includes a photodiode, a preamplifier, an automatic gain control (AGC), a bandpass filter and a demodulator. However, for test purposes, we need an IR receiver without the bandpass filter, capable of receiving IR signals modulated on carriers of different frequencies. Such a receiver can be built from discrete components, as shown in Figure 1. Besides decoding the information, which is encoded as a series of pulses, this receiver will also separate the carrier and send it to another output. A high sensitivity is neither necessary nor preferred: by bringing the remote control close to the receiving photo-transistor, ambient light interference is greatly reduced.

If photo-transistor T1 (BPY62 or similar) is not illuminated by daylight or a strong artificial light, a negligibly small current flows thru R1 and T2 will be switched off. The voltage drop across R1 will be sufficient to turn on T2 only if T1 is illuminated by a pretty strong light. The appropriate level of illumination will be achieved if the transmitting IR diode of a remote control is held very close and precisely directed towards T1.

A remote control transmits flashes of IR light that represent a series of pulses. The information is encoded in the pulse width and/or the pulse distance. A single pulse is not continuous, but consists of a short sequence of repeating flashes.

The frequency of these flashes (called the carrier frequency) is generally in the 30-60 kHz range. This high-frequency carrier contains no information and should be removed by the receiver. In the circuit shown in Fig 1, this is partially done by overdriving T1 (by placing the IR sender very close) and the remaining carrier is filtered out by C1.

Programmable IR sender/receiver

2012_AVR_UK_167

Continue reading

Shop area

Last Updated on Wednesday, 01 August 2012 11:33
 
Joomla Templates at JoomlaShack.com