This IR remote control that you can use to control other devices or circuits up to 8 devices.
The control codes are sent in RC5 format modulated to about 38 kHz carrier frequency. The IR transmitter powered by the CR2016 which is a 3V button Cells Battery CR2016. To extend the life of the battery this is done by putting the CPU into SLEEP mode for most of the time and wake-up only when a key is pressed.
PIC16F630 is the heart of the transmitter used to send IR command to receiver.It also generate 38KHz carrier frequency.The CR2016 is 3V battery which is supply for the circuit.
When any key not pressed the CPU work in SLEEP mode to reduce battery power consumption and wake-up only when any key pressed. To wake-up the CPU from SLEEP mode the CPU use interrupt on change feature which interrupted when the state on PORT A change then the program execution after an interrupt is at the interrupt vector, if the global interrupt is not enabled, the program starts executing the first line of code right after the SLEEP instruction.In the interrupt service routine the software will scan the key that pressed and send IR command appropriate with key pressed.
Fig 1. IR transmitter circuit
The receiver also use PIC16F630 to control all function then.When power is applied to circuit the CPU will polling the IR input signal which is the output from IR decoder module(TSOP4838). After IR received the CPU decoding the IR command and turn on the buzzer about 60mS to generate beep sound.
The output (relay) work as a toggle output thus when the right IR command decode complete the output will turn on and if the same IR command sent again the output will turn off.
Fig 2. IR receiver circuit