HandsOn Tech provides a multimedia and interactive platform for everyone interested in electronics. From beginner to diehard, from student to lecturer… Information, education, inspiration and entertainment. Analog and digital; practical and theoretical; software and hardware… HandsOn Technology support Open Source Hardware(()OSHW) Development Platform. Learn : Design : Share www.handsontec.com TEST&MEASUREMENT IR Code Analyser identify remote control codes! Point any IR remote controller at this nifty device and its in-built micro- controller will quickly analyse the signal and reveal which of eight stan- dard control protocols the controller is using. Microcontroller –4 KByte ROM – 128 Byte RAM – 32 Byte EEPROM for user code –2.7 to 6 V Supply voltage –Two 16 Bit Timer/Counter – Integrated reset – Internal RC Oscillator (selectable) –20mA drive current from all the port pins – Maximum 18 I/O-Pins, when the internal reset and RC oscillator is used. –2 analogue comparators –I2C interface –Full duplex UART – Serial In-circuit Programmable It’s a rare piece of entertainment equipment bly think of lots of applications for a tion. The chief design criteria for the that does not come with its own remote con- discarded remote controller. For IR analyser was to produce a neat, troller. After a few years it’s easy to accumu- example using the well-documented portable unit that would quickly late a drawer-full of (functional) controllers RC5 or RECS80 protocol from Philips enable a check to be made of the belonging to equipment long since consigned a simple receiver/decoder can be output signal of an unknown remote to showrooms at your local household built using the SAA3009 or SAA3049 controller. A microcontroller decodes amenity tip. IC from Philips if only you knew the IR message and displays the Equipment manufacturers tend to use dif- details of the controller coding. Sim- important information on an LCD. In ferent controller protocols so it is rare to find ilarly if you are looking for a second use the unknown IR controller by chance a controller from one manufacturer controller for a piece of equipment its should be placed close to the able to control equipment from another. All of not practical to lug a portable oscil- analyser’s receiver IC before a com- the protocols used should however comply loscope to the local car boot sale to mand key is pressed. The microcon- with one of the eight industry standards. analyse each controller on offer. troller will decode the message and Many electronics enthusiasts can proba- This device offers the ideal solu- display information indicating the 26 Elektor Electronics 10/2001 TEST&MEASUREMENT ted so it’s a good idea to carry a few spares with you. Some of the more modern remote con- trollers will send out two messages each time a key is pressed. The first message is in one format while the second message contains the same information in a different format. The analyser will only display the last mes- sage format sent. Hardware There are no surprises in the circuit diagram of Figure 1. Flash mode signal (a) modulated mode signal at 36 kHz (b). the IC code analyser shown in Figure 3. The infra red signal is detected by IC2. Infi- neon have ceased production of their receiver protocol used and the command shown on the display. IC but any one of the compatible devices sent. A good source of detailed infor- specified in the parts list would be suitable. mation about the different IR proto- 2. Key press: Command This device contains a highly sensitive infra col formats can be found in the This hexadecimal value indicates the red receiver, amplifier, filter and demodulator March and April 2001 edition of Elek- type of command that was sent in tuned to an IR carrier frequency of 36 kHz. A tor Electronics. the message. A 10hex (16dec) for data sheet for this device can be down This analyser is only suitable for example in RC5 coding indicates loaded from: decoding modulated signals in the that the command will increase vol- (www.infineon.com/cmc_upload/0/000/ range of 30 - 40 kHz. Fortunately all ume of the controlled equipment. 008/562/sfh5110.pdf). the common control protocols use The inverted demodulated received signal is this frequency range. 3. Key press: Complete code connected directly to an input port of the Some (older) controllers use flash The contents of the entire message microcontroller IC1. IC2 is relatively sensitive mode where the message informa- are displayed in hexadecimal. The to supply rail disturbances so R2 and C2 are tion is conveyed by switching on the hex value assumes that the data is used to form a low pass filter, decoupling any sender diode for a short period sent in the order Bit 7 to Bit 0. Some interference. rather than modulating it at 36 kHz manufacturers (e.g. Sony) however The core of the microcontroller is based on (see Figure 1). The analyser’s IR reverse the bit order. In this case the the Intel 51 architecture that lends itself to receiver chip will only respond to values are corrected before display. simple low-cost program development by modulated signals so that flash using any of the available Shareware devel- mode messages will be ignored. 4. Key press: Type of Code opment tools. The 87LPC764 is produced by This displays the protocol type of the Philips and is described as a Low power, low last received message e.g. RC5, price, low pin count microcontroller. Decoding Operation SIRCS or RECS80. Once the analyser is switched on the When the display shows message ‘CODE ANALYSER VER 1‘ UNKNOWN this indicates that the will be displayed and then ‘WAIT- received message does not conform ING...‘ indicating that the analyser is to any of the eight standard proto- ready and waiting to receive an IR cols. It could also indicate however controller message. As soon as a that the signal was too weak or too message is received the analyser distorted. The IR receiver IC2 is opti- will display the type of coding sent mised for reception of a 36 kHz mod- by the controller and pressing push- ulated signal so its sensitivity to button S1 will display further infor- some signal protocols at the mation about the received message. extremes of the 30-40 kHz band will be greatly reduced (see Figure 2 ). 1. Key press: Address Always place the output diode of the This hexadecimal value indicates the handheld controller as close as pos- type of equipment that the controller sible to IC2 of the analyser to ensure was originally designed to control. a good signal. LED D2 will blink to As an example, if the controller uses indicate signal reception irrespective RC5 protocol format and the address of the type of protocol so it gives a 0 is displayed this indicates that good indication that the controller is controller will control a TV. Some sending out a signal. If the diode manufacturers do not use the does not blink try a new set of bat- address field in the message so in teries in the controller. Items at car Figure 2. The sensitivity of the IR receiver falls this case two lines (—) will be boot sales rarely have batteries fit- off sharply either side of its centre frequency. 10/2001 Elektor Electronics 27 TEST&MEASUREMENT Power for the analyser is provided 9V + R1 +5V 220Ω by a 9 V battery and zener diode D1 20mA R4 P1 regulates this on-board to 5 V. Resis- R2 R3 Ω tor R1 limits the supply current and 100k 1k2 100 overall consumption is approxi- 10k K1 D1 VSS C1 mately 20 mA. VDD µ Vo 10 C2 D2 16V 5V1 RS 15 R/W Display 100µ 16V E The display is a standard 1x16 LCD 12 1 D0 P1.0 P0.0 11 20 D1 (indicating 1 row of 16 characters). P1.1 IC1 P0.1 10 19 D2 IC2 1 P1.2 P0.2 This display is a standard item from 9 18 D3 P1.3(INT0) P0.3 many manufacturers. It has a built- 3 8 17 D4 P1.4(INT1) P0.4 4 16 D5 in controller using a standard com- P1.5 P0.5 3 87LPC764 14 D6 mand set. All of the compatible dis- SFH505A 2 P1.6 P0.6 2 13 D7 SFH505A P1.7 P0.7 plays mentioned in the parts list have identical pin-outs, RAM X1 X2 Dot Matrix Display 5 67 addresses and multiplex rate. The X1 1 x 16 S1 information generated by this analyser could be displayed on a four C3 6MHz C4 1 3 line LCD but to reduce costs it was 2 0 15p 15p decided to employ a single line dis- 010029 - 11 play and use a pushbutton to toggle through the information. The display control software is simplified by Figure 3. Only two IC’s are used in the analyser circuit diagram. using eight controller port pins. P1 is a variable resistor, allowing adjust- ment of the display contrast. the IR message is relatively processor inten- 1 µs. The main features of this sive so a clock rate of 6 MHz is used for the processor are summarised under the microcontroller giving a machine cycle of heading ‘microcontroller’. Software All the relevant data for the follow- ing protocols are integrated into the software so that they can be matched to the incoming signal: JAPANESE NEC RC5 RECS80 SIRCS DENON DAEWOO MOTOROLA The software starts its analysis of the incoming signal by measuring the first low-phase.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-