Recording and replaying Infrared signals from remote controls

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • #infrared #arduino #remote
    We will record raw infrared codes from a remote-control and replay it back with the Arduino firmware library IRLib2! This method is super useful for any kind of infrared protocol without the need to decode it as we are simply recording and replaying the signals.
    ⏰ TIMESTAMPS
    0:00 Intro
    1:48 Infrared receive raw codes hutscape.com/tutorials/ir-raw...
    5:20 Test infrared receive with remote control
    7:51 Infrared emit raw codes hutscape.com/tutorials/ir-raw...
    11:34 Test infrared emit with remote control
    ‣ Some links below are affiliate. I receive a small commission at no extra cost to you.
    📻 PRODUCTS MENTIONED
    Arduino UNO R3 amzn.to/3xbq53W
    🔗 LINKS SHOWN
    Arduino firmware IRLib2 github.com/cyborg5/IRLib2
    Adafruit tutorial on IRLib2 learn.adafruit.com/using-an-i...
    Based on AnalysIR github.com/cyborg5/IRLib2/blo...
    3 Function parameters for sending IR raw code github.com/cyborg5/IRLib2/blo...
    AnalysIR www.analysir.com/blog/
    AppleTV 4th Gen teardown www.ifixit.com/Teardown/Apple...
    🔌 TOOLS USED
    hutscape.com/tools
  • Наука та технологія

КОМЕНТАРІ • 94

  • @HellGoodDoogz
    @HellGoodDoogz 3 роки тому +6

    What a fantastic video! Very informative and a pleasure to listen to! :D
    Thanks for taking the time!

  • @sharmilaborah
    @sharmilaborah 4 роки тому +2

    I have been trying this from several hours , but finally found your video, you really explained everything so beautifully and I learned my mistake and now it is resolved
    THANK YOU ALOT....

  • @ASHOKKUMAR-hc8ye
    @ASHOKKUMAR-hc8ye 3 роки тому +1

    I have been watching so many videos on youtube as I am a new learner trying to learn all about Arduino must say one of the best on IR Remote with good information. Thanks and keep it up

  • @hycron1234
    @hycron1234 2 роки тому

    Pretty useful being able to automate some of these appliances. I can already think of a few applications for this. Thanks! 🙂

  • @wallyharwood3532
    @wallyharwood3532 3 роки тому

    Well prepared, excellent delivery . You are a super lecturer.

  • @idlebot_deluxe
    @idlebot_deluxe 2 роки тому

    finally, what i was looking for, a video of the raw ir signals. thx

  • @mikrohouse4064
    @mikrohouse4064 3 роки тому

    great tutorial.very enlightening .keep up the good work

  • @zaharianicolae9828
    @zaharianicolae9828 4 роки тому +2

    Great job. It was the exact example i was looking for around on youtube, but never actually found one. Thank you

    • @tristanhouston7140
      @tristanhouston7140 3 роки тому

      Pro tip: watch movies at flixzone. Me and my gf have been using them for watching a lot of movies during the lockdown.

    • @jerrybenjamin6168
      @jerrybenjamin6168 3 роки тому

      @Tristan Houston definitely, I have been using Flixzone for since november myself :D

  • @joseantoniomoramoreno261
    @joseantoniomoramoreno261 2 роки тому

    Congratulations! You are an excelent teacher!

  • @MegaTechno
    @MegaTechno Рік тому

    I have been trying this from several days, You helped me .thanks

  • @santosharakere
    @santosharakere 3 роки тому

    Excellent demo, thank you.

  • @jacobmyers5204
    @jacobmyers5204 Рік тому

    Very informative, thank you!

  • @itamartech
    @itamartech 2 роки тому +1

    Thank you!! great video!

  • @emregeylani
    @emregeylani 5 місяців тому

    congratz, great project and presentation

  • @abobobo943
    @abobobo943 3 роки тому

    Awsome. Very interesting.thank you for sharing.

  • @andyandy4306
    @andyandy4306 Рік тому

    Lots of examples these days doing this…yours is well done. I wish someone would integrate the send portion of what you taught into SmartThings for example

  • @jacktorres5871
    @jacktorres5871 Рік тому

    great video, learned a lot :)

  • @BlueSayamanHey
    @BlueSayamanHey Місяць тому

    Thanks you it means a lot to me now i wanna try it with all my diveces

  • @drcanalli
    @drcanalli 3 роки тому

    Absolutely Kind.
    Thanks for the detailed explanation that will be very useful to my studies and knowledge.
    Att; Dino Canalli
    Curitiba
    Brasil

  • @bevishal54
    @bevishal54 4 роки тому +1

    Thanks so much
    🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @rakeshmourya6102
    @rakeshmourya6102 11 місяців тому

    It works for me. Thankyou

  • @sonnyilham309
    @sonnyilham309 4 роки тому +6

    can we just use pin 3 with PWM without transistor?

  • @userkhankhan6739
    @userkhankhan6739 2 роки тому

    Very Nice Tutorial and Very informative can u tell which complier did u used and if we wan to generate the code by pressing button then what will be line that I need to add into your code..?

  • @user-oj4tn4vw3v
    @user-oj4tn4vw3v 2 роки тому

    Thank you !! can you explain same method for raspberry I been straggling to much thank you again

  • @kasunjayakodi8146
    @kasunjayakodi8146 Рік тому

    Hi …. I am glad if u Could make a video about 433hz door bell prank tutorial specially code explanation !!

  • @andreisales8245
    @andreisales8245 2 місяці тому

    I made this project and it works only if the Arduino is plugged in my PC , but the thing is whenever I use an external power supply it doesn't do anything.

  • @Pola.Botros
    @Pola.Botros 11 місяців тому

    Hi it is worked with me for carrier AC but with GREE AC it is not
    can you help

  • @zullakai9274
    @zullakai9274 Рік тому

    Good video. I can understand and follow every step in your video. And it's work. My television, light and radio. All of them can be controlled. But my ceiling fan doesn't seem to work. How can I fix this. Do I need to decode or something? And one more can I use esp8266 for this project?

    • @sayanee
      @sayanee  Рік тому

      I have never used ESP8266, but try this library: github.com/crankyoldgit/IRremoteESP8266
      Is the ceiling fan using IR as well? Mine is using RF, so that might be the reason.

  • @CodeMonkey66
    @CodeMonkey66 Рік тому

    Hey Sayanee, great video, I really like that you're using an updated IRRemote library. I'm curious, with one of the controllers, you were only able to get the on/off and volume button IR data but couldn't get the IR data from some of the other buttons. Do you know what that is? I've tried a difference library and every TV controller in my house works, except for one where I have the same problem...on/off button, mute, volume buttons work like the other controllers, but the other buttons don't work.
    Perhaps you or someone else here has solved this issue?

    • @sayanee
      @sayanee  Рік тому

      Uh! I think it was the Apple TV remote. The rest of the button in this case was simply Bluetooth I believe that was communicating with the Apple TV. Only the volume up and down was IR.
      Different remotes, different technologies, I guess!

  • @francodiaz8439
    @francodiaz8439 4 роки тому

    how I can download the library im new at this but thanks a lot for share

  • @markchristophergemzon1052
    @markchristophergemzon1052 3 роки тому

    Hi, I tried doing this on an arduino mega. Receiveng the IR signals was no problem but when I was trying to send the recorded IR signals, there was no output coming from the PIN 3 of the arduino mega. Any reason why it is not sending? Thank you.

  • @ek19751
    @ek19751 2 роки тому

    I want to write a macro for a TV so it can execute a series of commands from an Android phone. Do I just put a delay after each command or is there more to it? I couldn't find an example. Would you be able to point me in the right direction, please?

  • @irfansensoy5901
    @irfansensoy5901 6 місяців тому

    Hello.
    I want to copy the remote control of a GREE air conditioner, but the data I obtain with the receiver code is always different. For example; The two shutdown codes in the (close-on-close) command I receive from the remote control are different. Is it possible that the code is encrypted? How can I go about it? Thanks.

  • @fatih.cal1734
    @fatih.cal1734 3 роки тому

    I get "mySender was not declared in this scope" error

  • @sachinsasi1459
    @sachinsasi1459 Рік тому

    How to buy that transmitter and receiver plz provide their name an link

  • @Lisas4us
    @Lisas4us Рік тому

    Hi Sayanee, thanks very much for the movie, that was actually exactly what I was looking for. Now I can connect some sensors and adjust the ac accordingly, I am thinking. Anyway, I am wondering, you said output pin for the Led is Pin3. How do you know this, also in your script is no output Pin defined. Could you please enlighten me.

    • @sayanee
      @sayanee  Рік тому

      It's been almost 4 years since this video 😅 So many the implementation based on the original library has changed.
      Please check the original library's latest similar example: github.com/cyborg5/IRLib2/blob/master/IRLib2/examples/rawSend/rawSend.ino
      I am guessing as long as you chose another analog pin marked with a tilde (~) that should be fine.

  • @Sj-yf2jg
    @Sj-yf2jg 8 місяців тому

    What software are you using on laptop to decode? and how to install the code into UNO?

  • @androidemulation5952
    @androidemulation5952 3 роки тому

    Great video, thank you so much. I have a small question though. instead of saving the obtained data in a file, is it possible to store it on the EEPROM in realtime? I want to store and send the signal without using my PC but also not lose my data if the power is cut.

    • @sayanee
      @sayanee  3 роки тому +1

      Absolutely! In fact, storing the data in the EEFROM / flash is my next goal.
      I did not show this in my video because I didn't want to complicate the code and the example with EEPROM/storage stuff.

    • @androidemulation5952
      @androidemulation5952 3 роки тому

      @@sayanee I see, thanks a lot. this will help me greatly in my project. best of luck with yours

  • @ArunG273
    @ArunG273 2 роки тому

    Can I use any ir receiver or should I use only tsop4838?

  • @pradipselectrolab2994
    @pradipselectrolab2994 2 роки тому

    I have been trying for a tutorial on IRRemote and found this video. Well explained. But I want to use this library with Atmel Studio 7 for project on ATmega32. I have knowledge in C but a little knowledge in C++ and moreover I am a beginner in microcontroller programming. Can you please suggest how I can use this or like one library in Atmel Studio?

    • @sayanee
      @sayanee  2 роки тому

      I'm so sorry, I have never used Atmel Studio. But thankfully, I do see many tutorials on UA-cam.
      One is by Microchip themselves: ua-cam.com/users/results?search_query=atmel+studio+7+tutorial. Hope this can help you!

    • @pradipselectrolab2994
      @pradipselectrolab2994 2 роки тому

      @@sayanee Yes, there are many topics, but these does not clear the things. Any how, I myself will do the needful.
      Thanks any way.

  • @marin6341
    @marin6341 Рік тому

    Hey I want to try it ! Is it work in 2022 ?

  • @i_am_gaming_gamer_game
    @i_am_gaming_gamer_game Рік тому

    What could be the reason for the code not working even though i set up the correct pin, i get the light on the receiver when i send a ir signal but when i try the code it just doesnt detect anything? receiver is ky-022

  • @antoniomoraes7655
    @antoniomoraes7655 3 роки тому

    Hello Sayanee,
    Why you save for the last array element always a fixed value 1000 instead of doing the same and getting the last and actual value inside the loop (i== recvGlobal.recvLength)?
    Thank you

    • @sayanee
      @sayanee  3 роки тому +1

      Hi Antonio, 1000 means a trailing space that indicates we have received the complete data. It is defined in the IR library I used.
      The code I implemented is directly from the example of the IR Library "IRLib2" I used which also has the last fixed value as 1000: github.com/cyborg5/IRLib2/blob/master/IRLib2/examples/rawRecv/rawRecv.ino#L32
      This code inherits #include and if we read the "/IRLibRecvPCI.cpp" implementation file, the comment explains that "If it notices a SPACE is especially long then it calls IRLib_IRrecvComplete which sets the proper flags to say that we had received data and implements auto resume if enabled." Here's the complete link to the comment: github.com/cyborg5/IRLib2/blob/master/IRLibRecvPCI/IRLibRecvPCI.cpp#L97-L100
      I hope that explains what you want to know about the fixed value of 1000.

    • @antoniomoraes7655
      @antoniomoraes7655 3 роки тому

      @@sayanee thank you

  • @Melvinsch
    @Melvinsch Рік тому

    does anyone has a video of this same project but without using arduino?

  • @DimitriPappas
    @DimitriPappas 3 роки тому

    howcome we don't need to know/define the carrier frequency (38 in this case) when recording ? also is there any way to determine what the carrier frequency is for a particular remote if it is not 38 (not known)?

    • @sayanee
      @sayanee  3 роки тому

      We probably need to look deep into the dependency code (github.com/cyborg5/IRLib2) to know the carrier frequency used.
      I was not able to do an in-depth analysis, but a quick search shows that the default is 38kHz (github.com/cyborg5/IRLib2/blob/master/IRLibProtocols/IRLib_HashRaw.h#L37).
      I'm not sure how else to measure the carrier frequency of the remote control by measurement. The harder way will be to locate the component manufacturer part number and find the datasheet, I guess.

  • @tatavenugopal3082
    @tatavenugopal3082 3 роки тому

    Good explanation Madam ... Thank you
    I have small remote, it works for one celling fan & two lights, I want to incorporate this remote frequency into having IR option mobile ... can you guide me plz ... Thanks in advance

    • @sayanee
      @sayanee  3 роки тому

      If you mean Android, IR option mobile, sorry I have never done before.
      I also suspect it will depend on the model of your mobile because it will need to have the IR receiver/transmitter.
      I just Googled and found this link: www.androidauthority.com/phones-with-ir-blaster-858845/.
      Hope this helps!

  • @idabagusmadedhimasprayogab2137

    Hai Sayanee, what a great video !, but i have one problem about the "./data.h" that telling me no such file or directory, do you have any idea what i have to do ?

    • @Lisas4us
      @Lisas4us Рік тому +1

      I had the same problem, do not use < > but use " " for the define.
      It seems Sayanee is not answering anymore.

    • @idabagusmadedhimasprayogab2137
      @idabagusmadedhimasprayogab2137 Рік тому

      @@Lisas4us ahh i see, thank you for your information, have a great day !

  • @juanriofrio6872
    @juanriofrio6872 Рік тому

    Hello,... Just wanted to let you know that I really enjoy watching your video, very clear to understand. I was looking to download the code used in your video but is not available... I'm not experienced in programming mcu's, I am actually just a hobbits, so to see the code and learn from it is helpful. Anyway, just wanted to say hello and thank you for your videos.... Just a thought if I may, I few weeks ago I come to know the development of the RISC-V mcu's and I was intrigued about it's power and so affordable that is, but no idea how to start getting to know it. Will be great to see a video about them and to know tools and support it has in order to get some knowledge in how to use them.... Have a wonderful day 😊

    • @sayanee
      @sayanee  Рік тому

      Do these links help? I have listed them in the video description. They have the code to download:
      hutscape.com/tutorials/ir-raw-receive
      hutscape.com/tutorials/ir-raw-emit
      It's been almost 4 years since this video 😅 So I am not sure if the code and the prerequisite library will work again today.

    • @juanriofrio6872
      @juanriofrio6872 Рік тому

      @@sayanee Hello, thank you for the links... You're probably correct about the code. My findings has been that the code available with the videos hasn't worked for me, different reasons, I assume libraries, parts, some peace of info missing or misunderstood. So, now just I take them as example in how or a way a specific project could be done.... Thank you again for your reply ☺️

  • @ToanNguyen-mo5qr
    @ToanNguyen-mo5qr Рік тому

    Help me
    i don't want to use pin 3 to connect to ir led, where can i change it in the library

    • @sayanee
      @sayanee  Рік тому

      It's been almost 4 years since this video 😅 So many the implementation based on the original library has changed.
      Please check the original library's latest similar example: github.com/cyborg5/IRLib2/blob/master/IRLib2/examples/rawSend/rawSend.ino
      I am guessing as long as you chose another analog pin marked with a tilde (~) that should be fine. And you don't need to define it in the code.

  • @gaurav3746
    @gaurav3746 3 роки тому

    How can we compile it for a microcontroller like wimos d1 mini?

    • @sayanee
      @sayanee  3 роки тому +1

      Sorry, I have not used it on WeMos D1 Mini yet.
      But, my version-2 plan is to indeed build it for a wifi-based MCU, ESP32!

  • @tjsaarni
    @tjsaarni 4 роки тому

    Thanks for the video (and all the previous ones)! My project was for a set-top box that sits behind cabinet door that blocked the IR signal github.com/tsaarni/ir-remote-control-repeater. I found out that it is possible to make pure repeater without decoding the signal. I'm sure running this on microcontroller was overkill but that's besides the point of this kind of projects ;-)

    • @sayanee
      @sayanee  4 роки тому +1

      Wow! I didn't know using a repeater is another way to replay the IR signals. Thanks for sharing your project link so that I can dig in later 😃

  • @anokhautomation4453
    @anokhautomation4453 2 роки тому

    You can use it remote hex code instead of a raw code.

  • @ZoomtronicBlogspot
    @ZoomtronicBlogspot 2 роки тому +1

    nope, not working on both of my air conditioners, tried similar code few years ago also no results

  • @usmanabdullah5321
    @usmanabdullah5321 4 роки тому

    Why it only start receiving when you press volume up and down button

    • @toysareforboys1
      @toysareforboys1 3 роки тому +1

      Volume up and down go out over I.R. (to control volume in your TV for example), all the buttons that control the apple device run over bluetooth.

  • @drcanalli
    @drcanalli 3 роки тому

    Hello Sayanee.
    Once again congratulations on your explanations.
    I did the assembly and all the tests.
    But I am facing a problem. The pulse train recording is smaller than the original pulse train.
    My interest is in replicating the commands of a Hitachi Air Conditioner Remote Control, and the pulse train duration is around 230ms in total.
    I will greatly appreciate your opinion on this case.
    Thank you.
    Dino Canalli

    • @sayanee
      @sayanee  3 роки тому

      Where and how did you measure the 230ms? And how did you figure out that the pulse train recording is smaller than the original pulse train?

    • @drcanalli
      @drcanalli 3 роки тому

      @@sayanee Hi Sayanee.
      I recorded a video with details of the experience.
      I am happy with your help and attention.
      Att;
      Dino Canalli.
      ua-cam.com/video/VVEYTrCDuHE/v-deo.html
      PS: I am probably facing the same problem described on the AnalysIR page.
      www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/

    • @sayanee
      @sayanee  3 роки тому

      Thanks for sharing Dino Canalli!
      As I suspected, you did use more tools and instruments such as the oscilloscope and the AnalysIR. That's great. I saw your video very briefly. Please give me some time to look through it again.

    • @sayanee
      @sayanee  3 роки тому

      @@drcanalli Hi Dino, I'm really sorry that I took so long to reply.
      Thanks for doing the video, but it will be still very difficult to debug remotely. Regardless of what the array of code was captured and the oscilloscope waveform duration, were you able to emit the IR signals captured with the circuit and control the aircon? You seem to have 2 variants of the receiver TSOP, did one of them work?
      I am not sure if you tried to emit back the recorded signals (array of numbers captured) to the aircon successfully. Maybe give that a try with your Arduino UNO circuit? hutscape.com/tutorials/ir-raw-emit
      Also, I think it is completely fine for the captured signal to be different from the emitted signal due to sampling and other ways the signals get truncated. But if the aircon cannot be controlled, then maybe we need to look at it in another way.

    • @drcanalli
      @drcanalli 3 роки тому

      @@sayanee God bless you Sayanee! The problem was solved and the device i create is in use today. Your help was very important! good new year!

  • @mohammedalhinai5699
    @mohammedalhinai5699 3 роки тому

    Can we also decode the car key remote ?

  • @tarekas522
    @tarekas522 Рік тому

    I can't find a library (data.h ) Where do I download it from?

    • @sayanee
      @sayanee  Рік тому +1

      5:20 You have to make your own data.h with the raw codes you receive with your remote control with this Arduino program hutscape.com/tutorials/ir-raw-receive
      7:51 You can copy and paste the raw codes received into your own data.h file hutscape.com/tutorials/ir-raw-emit
      Hope this helps.

  • @AlaaDuino
    @AlaaDuino 4 роки тому +2

    NICE JOOB

  • @antoniomoraes7655
    @antoniomoraes7655 3 роки тому

    I still haven't understood how is possible capturing the signal as a serial at 9600 bps while the carrier is 38KHz. If someone could bring some light in it I really would appreciate.

    • @sayanee
      @sayanee  3 роки тому

      We are actually capturing the IR signal received as and when it comes and immediately as it is received as shown in this line of code with the function "myReceiver.getResults()". If you see the loop() it has only one if-case. So the capturing of the signal happens immediately. github.com/hutscape/hutscape.github.io/blob/master/_tutorials/ir-raw-receive/ir-raw-receive.ino#L14
      We are printing the raw data, each buffer by buffer at 9600 baud rate and that is done after the signal is captured. github.com/hutscape/hutscape.github.io/blob/master/_tutorials/ir-raw-receive/ir-raw-receive.ino#L23
      I hope I understood your question correctly.

    • @antoniomoraes7655
      @antoniomoraes7655 3 роки тому

      @@sayanee Thank you. I watched again your video and got it - is there. The receiver TSOP4838 also performs demodulation, etc, and for 38KHz signals. Means that, during capturing Arduino is indeed receiving from TSOP4838 a clean envelop of the modulated signal just the bits at 9600 bps, as it is before being modulated at 38KHz and cleaned from any other lighting environment noise. For more pdf1.alldatasheet.com/datasheet-pdf/view/252287/VISHAY/TSOP4838.html

  • @MPElectronique
    @MPElectronique 2 роки тому

    The code is always different. What should i do ?

    • @sayanee
      @sayanee  2 роки тому

      Yes, it will be slightly different. I think that's because of slight variations when converting analog IR signals into digital.
      So, just copy the one that works and use it. It should work.

  • @tarekas522
    @tarekas522 Рік тому

    You didn't sit pin 3