Using IR Remote Controls with the Arduino

929,680
0
Published 2018-01-05
Learn to decode, emulate, and use infrared remote controls in your next Arduino project.

Get all the code at dronebotworkshop.com/using-ir-remote-controls-with…
More articles and tutorials: dronebotworkshop.com/
Join the conversation on the forum: forum.dronebotworkshop.com/
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/

Infrared remote controls are everywhere, you probably have several of them in your home. These handy devices work by sending coded signals with pulses of infrared light to control appliances. We take them for granted, but just imagine using your television or Blu-ray player without one!

In this video, I’ll show you how these handy devices work and how you can capture and decode their codes with an Arduino and some very inexpensive parts. You’ll also learn how to repurpose the remote controls you already own so that you can put those unused buttons to work controlling devices like lights and fans.

I’ll also show you how you can use an Arduino to build your own custom IR Remote Control. Control everything in your room with one button (if that's what you want to do).

Finally, we will see how to use those inexpensive remotes that you can get on eBay to add remote control capabilities to your own Arduino projects. I’ll present a simple project that uses one of those controls to adjust the position of a servo motor. It even uses the “repeat” function that isn’t very well documented.

Here is a breakdown of what we will cover in the video:

00:00 - Introduction
02:20 - How IR Remotes work
03:37 - How to “see” Infrared Light
04:56 - The IR Sensor
06:29 - Decoding IR Remote codes
10:07 - Getting Manufacturers Codes
13:22 - Repurposing an IR Remote
20:37 - Building a Custom IR Control
28:19 - Control a Servo

As always you’ll find an article with all of the code used here on the DroneBot Workshop website at dbot.ws/irarduino. The site also has links to resources you may need when working with IR Remote controls.

Now go ahead and start controlling your world!

All Comments (21)
  • @ericroque5813
    I've watched a lot of Arduino tutorials and this is by far the most detailed and concise explanation I've ever seen. I'm learning a lot. Keep it up!
  • @billfield8300
    I have been watching many different channels for quite some time now but this is the first time I've seen yours. The way you clearly and precisely explain everything in detail is excellent, and to be honest, better than most. It makes me believe I will be able to reproduce the results you achieved on my own workbench. I gave you the subscription and look forward to seeing many more videos. Excellent work.
  • @paulnoe690
    As a beginner-level enthusiast I can't overstate how valuable it is to me to get instructions delivered so carefully and clearly. I totally agree with Bill Field's comments below and look forward to many future visits to the DroneBot Workshop. THANK YOU!!!
  • @acadman4322
    Once again, You have impressed me. I do not know your professional background, but you make an excellent teacher and an even better video lecturer. You are so organized it makes me ashamed of my own disaster I call a workshop. But, more importantly, you have made these lessons on a rather complex subject 'learnable'. It is so refreshing to see this level of professionalism and expertise still exists. Thank you.
  • @larryb4122
    Just a quick comment to say, "Thank you so much for sharing your passion and skillset". I have struggled a bit with electronics over the years and I've finally found a like minded person from whom I enjoy learning. Your ability to convey a message with clarity is a gift! Please continue adding content. You are very much appreciated!
  • I'm a senior in a mechanical engineering program. Myself and 4 other team members are making autonomous delivery system. Thanks for all your videos they help a lot!
  • @aryanmishra5591
    I just love how you say "don't change channels". It's so true. Thanks you for such a clear and detailed explanation.
  • @RohiteshMishra
    I stumbled upon your channel trying to get IR working, there is so many different libraries I trialed but was unsuccessful. I must admit that your video has helped me a lot, and you are a natural teacher. I enjoyed how you explained things and scaffold the hardware and software side of things. I am definitely subscribing to you and have also given a thumbs up. I can't wait to see your other videos, love it. Cheers
  • @INGIE32
    This is the first video I've watched of yours and I am very happy I did. Instead of just showing what to do, you also explain every step and your code. I really like it and I'm gonna watch more of yours!
  • @pboston6RR
    Another well done presentation. I’ve been using IR remotes with both Arduino and PicAxe and both work very well. I equip O gauge locomotives with the sensor to control the motor(s) and use the codes to automate the engine using an IR LED buried between the ties. Various places along the right of way have different codes. What the engine does at each LED is written into the program. Some are simple, some complex ..... all are fun! 👌🤗
  • Great discussion on using IR devices to control things. Even though you repeat the commands used for the Arduino, I find it helps reinforce the commands and how they are used. I totally hate videos where they play come crazy music while the author quietly swirls the mouse around typing commands without telling you what they are doing. Our train group is interested in using IR sensors on their layouts. This video will be a great help to get them started. Thank you very much!!
  • @infinytower3317
    Simply incredible lecture! I wish all the youtube tutorials had at least half the clarity of yours. I plan to watch all of your presentations; so far every one of them has been either extremely useful or highly inspiring! 👍👍
  • @johnyoung6790
    I've lost count of how many times I've come back to this video for reference for my projects. Thank you, This is a great useful tutorial
  • @chriskaprys
    Since I haven't seen it in any of your other well-deserved compliments, I'd like to thank you for including a little apropos mild pun before the intro of every video. Cheers, mate!
  • @dafpnp
    I wish you taught me during my engineering back in 90s, but it's never too late :)
  • @rogerbitzer6245
    Woooow ….these are some great teaching tools. Your presentations are excellent. For years I’ve been playing around with the Raspberry Pi. Of course, I’ve come across the Ardiuno but not knowing much about it I’ve kept may distance. After watching several of your videos gave me the knowledge to tackle several of your projects. But more importantly your clean precise presentations gave me the confidence to pursue to the successful conclusion. I now process many many components (resistors, relays, LED’s, sensors. little pieces of hook up wire and the list goes on and on. My wife is concerned about our desk looking sort of cluttered (she actually used more colorful adjectives then I) so I showed her a picture of you workshop from one of your videos and she almost passed out (she really liked the blue peg board). Now she is referring to me with a Compulsive Component Disorder (CCD). Now that I am CCD I’ve fried my first Ardiuno and currently trying to troubleshoot the problem. Can’t find much worth while knowledge on the internet so am studying a downloaded schematic and trying to identifying components. Now …I’ve discovered another rabbit hole. Many different manufactures leads to many different designs around a common CPU and footprint ( in case your looking for a new subject for a video). I can truthfully say that my CCD has reduced my TV time and has really added to my resume but at 74 I’m not looking for a job. Thank you, great job and the video editing and sound is superb, I give you an 11 out of 10.
  • @series80
    Hi, really interesting video. You may have mentioned it and I missed it, but it is important to note that for this to work you need an IR detector with a built-in demodulator that looks for modulated IR at 38 KHz. E.g. the VS1838B. Unlike a normal IR photo-transistor that simply records the pulse, the VS1838B strips the 38KHz carrier returning clean square pulses the the IRremote library can process. Finally note that you did very well to pick the IR detector PCB, as you really need the passive components (resistors and capacitors) that are included in the PCB version. Simply getting the VS1838B means that you need to add the extra 3-4 components on your breadboard. Also adding a LED (plus a 240 Ohm) resistor to the output of the IR detector, makes the pulses visible so you know the remote control is actually working (don't ask :-) Keep up the good work, my 11 year old son was hooked and we tried lots of IR stuff.
  • @1VperOctave
    I have watched a few of your videos now, and I just wanted to comment and say how very professional they are. The content is excellent, well paced, graphics and editing are top notch. Thank you for all the great content you create, it is incredibly helpful.
  • @whitefields5595
    Thanks again for another good presentation. Good subject, right level and pace for a broad audience. No waffle, clear knowledge of the subject and first rate visual aids. You are up there with the best on electronics for hobbyists
  • @LeonRamos
    This is an excellent piece of work. Too much time to prepare the tutorial, the scripting and the sketches. I really appreciated it. Also, I am glad you go deep into the topics. Way to go!