Components Required
- ESP8266 (NodeMCU)
- IR Led
- IR Receiver
- Wires
Circuit Diagram
This project includes two circuits one by one :
- IR Receiver circuit for capturing the IR codes.
- IR Led circuit for transmitting the codes.
IR Receiver Circuit Diagram
How do remote work?
Every button in the remote has a different code. The code is sent by the remote, decoded by the receiver, and performs that function.
Capturing Codes
1. Goto libraries > favourites > under IRREMOTEESP8266 Examples > IRrecvDemo
2. Make the circuit for the IR receiver. (As shown)
3. Upload the code Open the serial monitor.
4. Press the buttons on your remote Copy the HEX codes for a specific button.
NOTE: CHECK YOUR IR RECEIVER PINOUT. IT MAY BE DIFFERENT.
Here is the 3D Files of Universal IR Blaster.
IR LED Circuit Diagram
After uploading the other code embed this circuit.
Programming ESP8266 for Universal IR Blaster
Line 26 to Line 71 are of simple initialization. Line 74 to 261 is the main code Here I am using only one virtual pin V0 so if the value of V0 pin will be 1 it will trigger "starplus" which has a number 101 so I send the hex values(which I captured earlier) of 101 with a delay of 1 second and so on using else if condition I wrote code for all the channels.
Blynk Setup
- Download the Blynk app from the google play store.
- Sign Up and create your project selecting your board.
- Add menu element by clicking on the + sign.
- Add STEP H and STEP V elements. (Refer Images) I added two buttons for mute and back.
- Now in every element you have to select the V0 pin. (IMPORTANT) In the menu element add channels on the position number that you have given in the code. For ex: In the code when the value of V0 will be 1 it will trigger star plus, Therefore we will add star plus at position 1
- Now add other channels on position according to their values in code.
- Now in STEP V for volume I will add value 19-20 19 for low and 20 for high.
- Similarly we will do for forward and backward.
- ENTER THE AUTH TOKEN, WIFI, PASSWORD TO THE CODE AND UPLOAD IT TO NODEMCU.
IFTTT Setup
- Download IFTTT app.
- Sign up.
- Click on create.
- Click on if > search google assistant.
- Select say a phrase.
- In then search webhook
- http://188.166.206.43/YOUR BLYNK AUTH TOKEN/update/V0
- Method PUT
- Content type > application/json
- Body > ["Add value of your channel"]
- Do the same for all the T.V. channel