NEC-SIRCS-JAPAN-RC5-SAMSUNG compatible, multiprotocol infrared remote control.
Replaces up to 6 existing remote controls into one.
With manual learning function, LED display and/or LCD. 2V6-3V2, low power (sleep function)
More protocols will be added later if needed (DENON, DAEWOO, MOTOROLA, RECS80.)
Components: PIC16LF877-04/L (4Mhz PLCC Package), 24LC256 EEPROM (low power), 74HC148 encoder (SMD), optional Nokia 3310 graphic LCD (LPH-7779), IR LED, 5 optional LEDs, TSOP34836 IR receiver (low voltage)
All parts are available in our online shop
Schematic & pcb (Eagle 4.11e), source code (CCS) and hex file available.
Circuit explanation:
The main component is of course the PIC16LF877-04/L processor. Its 8K program ROM handles all inputs, outputs, timings and so on. There are six modes: SLEEP, IDLE, TRANSMIT, RECEIVE, BACKUP & RESTORE.
There are two displays available: LED and/or LCD. So you can choose freely which one suits you best. Naturally, the Nokia LCD gives us much more details as we will see further on.
Power consumption is only a couple of microamps in sleep mode !!The circuit is powered by two AAA batteries (HR03) These may be rechargeable types. The voltage can drop as low as 2,5V. The battery life is several months (although NI-Mh batteries lose 1% of their power each day!)
Sleep mode is activated automatically after 20 seconds of inactivity (no button pressed in idle mode.) |
|
All user data is stored in the 24LC256 iΒ²c EEPROM. It contains 32768 bytes (8 pages of 4096 bytes.) Thatβs plenty! Pages 0 to 5 (0x0xxx to 0x5xxx) each contain data from the six devices (Aux, TV, Hifi, CD, DVD, Video) we are able to use. Page 6 is unused, page 7 stores all configuration data (f.e. which key is assigned to βPROGRAMβ or to the device βDVDββ¦)
A maximum of 32 keys (4 columns by 8 rows) are supported. We have six fixed DEVICE SELECT keys (Aux, TV, Hifi, CD, DVD, Video), 1 fixed PROGRAM key , 1 fixed ENTER key. These eight fixed keys have to be programmed at the first power up (LCD shows βkey initβ βProgram key?β, LEDs show β01000β) See more below. There are a maximum of 24 free COMMAND keys for each one of the six devices. Each free command key is protocol-free, this way we can mix protocols inside each device page.
RB4..7 are outputs to the four key columns. RB1..3 are inputs coming from the 8-bit HC148 encoder.
Whilst in sleep mode, pressing one of the keys on the key-matrix awakes the processor. The HC148, GS output which goes to to the PIC interrupt INT/RB0, goes low each time a key is pressed.
Also nice: the last device selected is stored in EEPROM. So, even unpowered, the circuit will keep all settings & data safe. You can even make a complete backup or restore of all data π
The IR receiver TSOP34836 (output comes low when a IR burst of around 36KHz detected) is powered only in program mode. The receiver takes only 0,7 mA but itβs still worth disabling while unneeded. More details about protocols & waveforms below.
For IR transmitting, there is of course an IR LED. It is boosted by a BC639. When enabled, it sends outΒ a burst of 37,1 kHz generated by the processor.
But, as you have guessed, all the rest is program code. More info under βsource code explanationβ below.
For more detail: Programmable IR remote control using PIC16LF877