Silicon ChipInfrared Remote Control - September 2002 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The change to nanofarads / Mouses should have keyboard equivalents
  4. Feature: NASA's Mission: To Catch a Comet by Sammy Isreb
  5. Review: Pico ADC-212 Virtual Instrument by Peter Smith
  6. Project: 12V Fluorescent Lamp Inverter by John Clarke
  7. Feature: Spyware - an update by Ross Tester
  8. Project: Infrared Remote Control by Frank Crivelli & Ross Tester
  9. Project: 50-Watt DC Electronic Load by Peter Smith
  10. Review: Nordic One-Chip UHF Data Transceivers by Jim Rowe
  11. Product Showcase
  12. Project: Driving Light & Accessory Protector For Cars by Rick Walters
  13. Vintage Radio: The Barlow-Wadley XCR-30 Mk II HF receiver by Rodney Champness
  14. Feature: Bluetooth: Getting Rid of Cables by Greg Swain
  15. Weblink
  16. Notes & Errata
  17. Book Store
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the September 2002 issue of Silicon Chip.

You can view 29 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "12V Fluorescent Lamp Inverter":
  • 12V Fluorescent Lamp Inverter PCB pattern (PDF download) [11109021] (Free)
Items relevant to "50-Watt DC Electronic Load":
  • 50-Watt DC Electronic Load PCB [04109021] (AUD $7.50)
  • 50-Watt DC Electronic Load PCB pattern (PDF download) [04109021] (Free)
Items relevant to "Driving Light & Accessory Protector For Cars":
  • Driving Light Protector PCB pattern (PDF download) [03109021] (Free)

Purchase a printed copy of this issue for $10.00.

In July we presented a 4-channel UHF remote control system. Here’s another remote control – but this one offers 12 channels and operates via infrared from a standard hand-held remote control unit. The The ultimate ultimate couch-potato’s couch-potato’s friend: friend: A Versatile 12-Channel Infrared Remote Control Design by Frank Crivelli – Article by Ross Tester www.siliconchip.com.au September 2002  53 O ne of the advantages of infrabeen programmed to decode the signal, tary mode, the relay is energised or closed while ever the keypad button red remote is that there is no determine which one of the 14 it is remains pressed. In the toggle mode, radio signal for crooks to moniand set the output pin corresponding one button push closes its relay and tor and record for use against you later to the received code low. a second push of the same button on. Instead, there is a beam of invisible Each output goes to an inverter, one infrared light which comes from a of six in a 74HC04 chip. As you will releases it. standard hand-held remote control unit. And yes, you can have one bank note from the circuit diagram, Fig.1, So from that point of view, it is set to momentary and the other set to there are two such chips and each of pretty secure. However, the receiver their outputs in turn connects to an in- toggle if you wish. can be actuated by anyone who has a put in a ULN2003A. This chip contains What of the other two buttons on remote control which uses the same six relay drivers, actually Darl-ington the remote control – the 13 and 14 code as yours. So maybe it’s not the pairs (for clarity, only one of the tran- buttons? type of thing you would use to protect sistors in each Darlington is shown). They are used to release all relays the Crown jewels! In the collector circuit of each of the when the circuit is set to the “toggle” There is, though, an enormous vaDarlingtons is an SPDT relay along mode. Pressing button 13 will release riety of tasks to which you could put with a LED and resistor. relays 1-8, while pressing button 14 the unit. Just think of the myriad of releases relays 9-12. When the Darlington turns on, the things in your home these days which relay pulls in and the LED lights, givPressing the “reset” switch (S3) on use infrared remote to turn things on ing a visual indication of relay activity. the receiver board does the same as and off, change levels, open and close You can hear the relay pull in but with pressing both the 13 and 14 buttons . . . Anything which can be connected 12 of them on the PC board, it’s not on the transmitter – it releases all to a set of relay contacts, whether noreasy to work out which one it is! relays. mally open nor normally closed, can Each of the relays has a set of The only other sections of the be converted to remote control. changeover (ie, SPDT) contacts. While circuit we have not yet mentioned Perhaps you want to motorise curthese contacts are rated at 10A, their are pretty conventional: a 12MHz cetains? Turn lights on or off (perhaps ramic resonator to some low voltage give the micro-congarden lights)? Add troller its clock d olle remote control to ntr pulses, along with co lly ua annels, each individ -held infrared remote nd ha something that has • 12 ch ial a plugpack-powerc mm co m ed operated fro not already got it? • Infrar ered nominal 12V n tio era op ) 5m range (>1 cts nta co er (Oh, come on, there • Long DC supply (to ov ge output – 5A rated chan r) must be something!) • Relay power the relays fou d an t modes banks of relays (eigh gle (push on, push off) tog or ry As far as the hand- • Two and drivers) and nta me mo to t bank can be se e button in toggle mode on held remote control • Each h a regulated 5V DC wit nk ba ch ea et te can res itself is concerned, • Remo supply (to power ard bo er d) button reset on receiv 450mA all relays toggle by, nd sta mA it is a typical com- • One the rest of the (30 ted iver is 12V DC opera mercial unit with 14 • Rece circuit).­ Features: pushbut-tons. But it does have the advantage of being nondescript – no labelling or branding to identify it nor give any clues as to which of the many infrared codes it uses. How it works Each button on the hand-held remote control unit transmits a unique code train which modulates a 38kHz carrier, sending a pulse stream from an infrared diode. This method is used in most, if not all, infrared remote controls as it offers a high degree of noise immunity against interfering light sources. That’s about all you need to know about the remote control transmitter. Oh, OK, it’s battery operated and it’s black! At the receiver end, an infrared receiver module picks up the modulated infrared signal and extracts the data signal. This is fed into an Atmel 89C2051 microcontroller which has 54  Silicon Chip associated PC board track widths are not, due to their close spacing. About 5A would be the absolute maximum. (Thickening up the tracks with wire links can increase the current handling capacity). And for the same (close spacing of tracks) reason, this PC board is NOT rated to handle 240V AC mains voltages. Steer clear of mains: it bites! You might wonder where the usual spike-suppression diodes are across the relay coils. They’re actually inside the ULN2003A, so a separate diode is not required. The relays are organised into two banks, one of eight and one of four, with buttons 1-12 on the remote control operating the corresponding relays (button 1 operates relay 1, etc) Each of the two banks can be independently set to operate in “momentary” or “toggle” mode via slide switches S1 and S2. In the momen- Finally, you might wonder why the inverters are needed. Why not eliminate the inverter (IC2 or IC3) and simply use an active high output from the microcontroller to the relay driver chips? It’s all to do with what happens on reset. On reset (either with the reset switch or via the 10µF/10kΩ resistor power- on reset) the microcontroller’s I/O ports are configured as inputs (via internal hardware) and “float” high. If the outputs were connected directly to the relay drivers then the relays would briefly operate during reset. Of course the relays would be released after reset once the onboard software took over. However, the relays would “flick” on momentarily during reset – and that could be embarrassing! Fig.1 (facing page): the circuit of the receiver section. The transmitter is not shown as it is pre-assembled. www.siliconchip.com.au www.siliconchip.com.au September 2002  55 SC 2002 1 X1 12MHz 12V DC INPUT 2  3 27pF 10k 10k 5 4 6 1 10F 16VW GND 10 IC1 AT89C2051 LED13 POWER D1 1N4004 XTAL1 XTAL2 INT0 RST 20 Vcc 9 3  10F 16VW 11 19 100F 25VW 0.1F IN COM OUT REG1 7805 MOM TOG MOM TOG S2 (RELAYS 9–12) S1 (RELAYS 1–8) 8 11 14 15 7 12 9 0.1F 5 1 3 9 11 13 13 2 13 1 17 5 3 VDD RP2 5 x 10k 18 16 470 P3.4 P3.7 P1.2 P1.3 P3.3 P1.0 P3.5 P1.1 P3.1 P1.7 P3.0 P1.5 P1.6 P1.4 0.1F 12-CHANNEL IR REMOTE CONTROL RECEIVER 27pF IRM PIC1018SCL D2 1N4148 S3 RESET d e f a b c 7 14 8 10 14 2 4 6 +5V c a b d e f 7 14 6 2 4 8 10 12 7 6 5 4 3 2 1 9 7 6 5 4 3 2 1 IC4 ULN2003A IC2 74HC04/14 +5V IC3 74HC04/14 +5V RP1 9 x 10k 9 8 8 A K 10 11 12 13 14 15 16 10 11 12 13 14 15 16 D1 D2 IC4 ULN2003A K A RELAY1 2.2k RELAY7 2.2k RELAY6 2.2k  LED12 A K LEDS RELAY12 2.2k (LEDS 8–11 AND RELAYS 8–11 NOT SHOWN)  LED7  LED6 (LEDS 2–5 AND RELAYS 2–5 NOT SHOWN)  LED1 CON12 NO C NC CON7 NO C NC CON6 NO C NC CON1 NO C NC OUT GND IN 7805 VDD IRM LED12 C NC NO NC NO C C NC NO NC C NO NC NO C NC TOG NO C CON7 CON8 2.2k 2.2k 2.2k S2 1 GROUP 2 RESET CON10 NC 241K K142 002/4 12 CHANNEL INFRARED RELAY2BOARD RELAY12 LED11 MOM 10k S4 CON11 S1 X1 RELAY11 CON12 + RELAY10 LED10 IC1 1 CON9 2.2k 0.1F 2.2k IC5 ULN2003A IC4 ULN2003A 2.2k 2.2k (RP2) 10F LED1 1 2.2k NO C 2.2k NC CON1 C CON2 NO RELAY1 LED9 C1 LED2 RELAY8 RELAY9 1 IC3 74HC04/14 NC IC2 74HC04/14 C CON3 NO RELAY2 470 CON13 2.2k 2.2k NC LED3 RP1 1 RELAY7 LED8 27pF C RELAY3 27pF NO LED4 10k NC 2.2k C LED5 10F 1 REDLOS LED7 + 100F 4148 NO RELAY4 REG1 7805 + NC RELAY5 LED13 POWER 1N4004 LED6 0.1F CON5 C RELAY6 CON4 NO CON6 12VDC INPUT CENTRE POSITIVE GROUP 1: RELAYS 1-8 GROUP 2: RELAYS 9-12 Fig.2: all components mount on a single PC board, shown above same size. It is a double-sided board but only the underside tracks have been shown, for clarity. Shown below is the same-size photograph of the board which should help you in assembly. Using the inverter stage means we can use an active low output to operate the relay and a high to release it - just right during reset! External 10kΩ pullup resistors (all part of resistor arrays RP1 and 2), are used to ensure a ‘solid’ high level signal to turn a relay off. Construction Use the component overlay on the PC board itself, along with Fig.2, to place the components. The following order is a logical way to do it – but do not insert any ICs until after the “Testing” section. 1. Resistors and diodes. 2. IC sockets 3. Resistor networks. Note that RP2 is inserted inside IC1’s socket. The small dot at one end of the resistor networks denotes pin 1. 4. Ceramic resonator, capacitors and IR receiver module. The lens bump of the IR module faces outwards. 5. Three switches. 6. DC power jack and 7805 regulator. Use needle nosed pliers to bend the leads of the regulator down 90°. It does not require a heatsink. 7. All LEDs (watch polarity!). 8. Electrolytic capacitors. Make sure you insert them the correct way around. 9. Terminal blocks. Note that the terminal blocks do NOT slide together. Also make sure the wire entry side faces out from the PC board! 10. Relays Testing After you have inspected your placement and soldering, connect a 12V DC plugpack. The power LED should light. If it doesn’t, check the polarity of your plugpack – it should be standard (centre positive) or the circuit will not work. Use a multimeter to measure the 5V output from the regulator. The easiest way to do this is across pins 10 and 20 of IC1’s socket (pin 20 is positive). If all is well you can remove the power and insert the ICs. Take care that none of the IC leads are bent under when inserting them into their sockets. Connect the 12V plugpack again. Put the slide switches in the momentary (MOM) position and press button 1 on the remote control unit. Relay 1 should operate and LED L1 should light. Release the button and the relay should release. Check each of the other 56  Silicon Chip www.siliconchip.com.au relays in turn by pressing the other buttons. Buttons 13 and 14 have no affect in momentary mode. Now put the slide switches in the toggle (TOG) position. Press and release button 1 on the remote control unit. Relay 1 should operate (you’ll hear it click in) and stay operated. LED L1 should also be on. Press each of the other buttons 2 -12 in turn and note that each relay and its LED is on. At this point all the relays and LEDs should be on. Now press button 13. All Group 1 relays (1-8) should release and LEDs 1-8 should go off. Pressing button 14 should release all Group 2 (9-12) relays and turn off their associated LEDs, 9-12. Repeat the process except for pressing buttons 13 and 14. Instead, press the “reset” button on the receiver and again, all LEDs should go out and relays release. And that’s just about all there is to it. All you have to do now is work out how to link it into whatever you are going to control. Remember, you have a normally open and a normally closed contact on each relay (normally open means open circuit when the associated LED is off). Aw, shucks – it doesn’t work! First thing to check is that you have batteries in your remote control. Yes, it sounds stupid . . . until you check and they aren’t there (none are supplied in the kit because they could be dead or leaking by the time you get them!) Next, check your component placement (and polarity) on the receiver board once again. And while you’re at it, check all soldered joints carefully under a good light. Dry joints are the most common reason for circuits not working. Re-solder any that look suspicious. Are the electrolytic capacitors and diodes the right way around? Are the ICs the right way around? Are any IC leads bent up under the IC body (ie, not in the sockets)? Check again that the regulator is still producing 5V. If it still doesn’t work, turn it off and carefully remove the microcontroller IC from its socket, then reconnect power. In turn, short pins 1, 3, 5, 9, 11 and 13 of each of the inverter ICs (IC2, IC3) to ground. That should cause the relays to pull in and the LEDs to light. If it does, the problem lies earlier on – either in the microcontroller www.siliconchip.com.au Parts List – 12-Channel Infrared Remote Control 1 1 1 12 4 1 2 1 2 2 1 1 1 PC board, 122 x 113mm, coded K142 remote control unit (batteries NOT supplied) ceramic resonator,12MHz relays, 12V coil, SPDT contacts 3-way terminal blocks, PC mounting DC power jack, 2.5mm slide switches, SPDT pushbutton switch IC sockets, 14 pin IC sockets, 16 pin IC socket, 20 pin 3mm screw, 6mm long 3mm nut (X1) (RELAY1-12) (S1,2) (S3) (for IC2,3) (for IC4,5) (for IC1) (for REG1) (for REG1) Semiconductors 1 AT89C2051 pre-programmed microcontroller (IC1) 2 74HC04 or 74HC14 hex inverters (IC2,3) 2 ULN2003A relay drivers (IC4,5) 1 7805 voltage regulator (REG1) 1 IR receiver module ‘Waitrony’ PIC1018SCL (IRM) 13 5mm red LEDs (LED1-13) 1 1N4004 diode (D1) 1 1N4148 diode (D2) Capacitors 1 100µF 25V electrolytic 2 10µF 16V electrolytic 3 100nF (0.1µF) monobloc (code 104 or 100n) 2 27pF ceramic (code 27 or 27p) Resistors (0.25W, 5%, carbon film) 1 470Ω 12 2.2kΩ 2 10kΩ 1 10kΩ resistor array 10 pin 9 resistor ‘A’ type 1 10kΩ resistor array 6 pin 5 resistor ‘A’ type or before it. Check that the infrared receiver module is properly soldered in. A properly functioning infrared receiver module will have around 5V between output and ground at rest, dropping to about 4.5V when it is receiving a signal from the hand-held transmitter. If you get this result, the problem almost certainly lies in the microcon-troller – more than likely one of its pins not seated properly in the socket. Where from, how much? The circuit is copyright © Kits-R-Us. Kits can be purchased from Ozi-tronics via their website (www.ozitronics. com). The complete kit, including the pre-assembled hand-held remote control unit, is $128.70 including GST, postage and handling. A four-channel “short form” kit (ie, (RP1) (RP2) with four relays but otherwise identical) is available from Oatley Electronics (www.oatleyelectronics.com) for $79.00 plus P&P. They have 4-relay expansion kits for $16.00 each and, if you need additional remote controls, they are available for $8.00 each. SC More info? For any technical problems or questions, contact the kit developer at frank<at>ozitronics.com If you would like more info on the Waitrony Infrared Receiver Module it can be downloaded from http:// kitsrus.com/pdf/pic1018scl.pdf Data on the AT89C2051 microcon-troller can be found on the Atmel website at www.atmel.com Information on other kits in the KitsR-Us range is available from the web page at http://kitsrus.com September 2002  57
<
<