Hello everyone!
Today I will be teaching you how to make a DIY IR Remote and IR Remote controlled LEDs. For this project, you will be needing both Arduino Uno and Arduino Nano. Before starting this project, make sure that you install the IRremote Library by Ken Shirriff from your Arduino IDE software.
Please visit this website, to learn about IR communication in detail. Refer to the 'Coding' section in this page to understand how to start this project.
Supplies
- Arduino Uno
- Arduino Nano
- Type A/B USB cable (for Arduino Uno)
- Type A to Mini B USB cable (for Arduino Nano)
- Solderless Breadboard (x2) - Mini and Full-size
- IR transmitter module (KY-005)
- IR receiver module (KY-022)
- Resistors (x5) - 220Ω
- Push-buttons (x5)
- LEDs (x4) - Red, Green, Yellow, and Blue
- Male-to-Male Jumper wires (x21) - 10cm
- 3 pin Female-to-Female Jumper Wires (x2) - 70cm
- Jumpers (x5)
Setup
Your setup must look somewhat similar to this. You can also use a PCB breadboard to make your DIY IR remote.
Connections
IR transmitter module
- (+) - 3.3V
- (-) - Ground (GND)
- S - D3
IR receiver module
- (+) - This pin has no connectivity with the IR LED
- (-) - Ground (GND)
- S - D11
Push button
- Ground (GND)
- 01 - D4
- 02 - D5
- 03 - D6
- 04 - D7
- 05 - D8
I have not connected the push buttons to the 10kΩ resistor. You can learn more about this, here.
LEDs
- Cathode - Ground (GND)
- Red - D7
- Green - D6
- Yellow - D5
- Blue - D4
Coding
First of all, assemble your components and they must look similar to the setup in the images from the last section. Go to Examples, open IRRemote Library, and select IRrecvDemo to get decode the IR signals sent by an IR remote and to discover its type of IR transmission protocol. Take out an IR remote, place the IR LED right in front of your IR receiver module to avoid IR noises, and press each button on your remote to see the data send by the IR signals.
Decoding the IR signals and discovering the IR transmission protocol can help us to prepare the sketch for our DIY IR remote. To check whether the connections are correct with your IR transmitter module, go to examples, open IRremote library, and select IRsendDemo. Place your phone camera above the IR LED and upload the code to your Arduino Uno. You should see the IR LED blinking if your connections are correct.
My Midea Fan remote uses NEC IR transmission protocol, and I have used the irsend.sendNEC function in my sketch. Refer to this website to learn more about coding for IR transmitter and receiver modules.
If you need any help with the coding, please feel free to comment below or send an email to arduinoprojectsbyr@gmail.com, and I will guide you.
Final Look
If you have any quesions, or suggestions, about this project please feel free to comment below or send an email to arduinoprojectsbyr@gmail.com.
Comments
Post a Comment