Recording and replaying Infrared signals from remote controls

  Рет қаралды 26,741

Sayanee Basu

Sayanee Basu

Күн бұрын

#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 жыл бұрын
What a fantastic video! Very informative and a pleasure to listen to! :D Thanks for taking the time!
@wallyharwood3532
@wallyharwood3532 3 жыл бұрын
Well prepared, excellent delivery . You are a super lecturer.
@sharmilaborah
@sharmilaborah 3 жыл бұрын
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 жыл бұрын
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
@joseantoniomoramoreno261
@joseantoniomoramoreno261 2 жыл бұрын
Congratulations! You are an excelent teacher!
@hycron1234
@hycron1234 2 жыл бұрын
Pretty useful being able to automate some of these appliances. I can already think of a few applications for this. Thanks! 🙂
@idlebot_deluxe
@idlebot_deluxe 2 жыл бұрын
finally, what i was looking for, a video of the raw ir signals. thx
@santosharakere
@santosharakere 3 жыл бұрын
Excellent demo, thank you.
@mikrohouse4064
@mikrohouse4064 3 жыл бұрын
great tutorial.very enlightening .keep up the good work
@MegaTechno
@MegaTechno Жыл бұрын
I have been trying this from several days, You helped me .thanks
@zaharianicolae9828
@zaharianicolae9828 4 жыл бұрын
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
@itamartech
@itamartech 2 жыл бұрын
Thank you!! great video!
@jacobmyers5204
@jacobmyers5204 Жыл бұрын
Very informative, thank you!
@emregeylani
@emregeylani 4 ай бұрын
congratz, great project and presentation
@abobobo943
@abobobo943 3 жыл бұрын
Awsome. Very interesting.thank you for sharing.
@jacktorres5871
@jacktorres5871 Жыл бұрын
great video, learned a lot :)
@BlueSayamanHey
@BlueSayamanHey 19 күн бұрын
Thanks you it means a lot to me now i wanna try it with all my diveces
@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
@bevishal54
@bevishal54 3 жыл бұрын
Thanks so much 🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@rakeshmourya6102
@rakeshmourya6102 11 ай бұрын
It works for me. Thankyou
@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
@sonnyilham309
@sonnyilham309 4 жыл бұрын
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 !!
@Pola.Botros
@Pola.Botros 11 ай бұрын
Hi it is worked with me for carrier AC but with GREE AC it is not can you help
@Sj-yf2jg
@Sj-yf2jg 8 ай бұрын
What software are you using on laptop to decode? and how to install the code into UNO?
@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.
@francodiaz8439
@francodiaz8439 4 жыл бұрын
how I can download the library im new at this but thanks a lot for share
@ArunG273
@ArunG273 2 жыл бұрын
Can I use any ir receiver or should I use only tsop4838?
@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?
@sachinsasi1459
@sachinsasi1459 Жыл бұрын
How to buy that transmitter and receiver plz provide their name an link
@fatih.cal1734
@fatih.cal1734 3 жыл бұрын
I get "mySender was not declared in this scope" error
@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.
@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.
@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!
@marin6341
@marin6341 Жыл бұрын
Hey I want to try it ! Is it work in 2022 ?
@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.
@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 жыл бұрын
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
@idabagusmadedhimasprayogab2137
@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 11 ай бұрын
I had the same problem, do not use < > but use " " for the define. It seems Sayanee is not answering anymore.
@idabagusmadedhimasprayogab2137
@idabagusmadedhimasprayogab2137 11 ай бұрын
@@Lisas4us ahh i see, thank you for your information, have a great day !
@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
@androidemulation5952
@androidemulation5952 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@sayanee I see, thanks a lot. this will help me greatly in my project. best of luck with yours
@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.
@ToanNguyen-mo5qr
@ToanNguyen-mo5qr 11 ай бұрын
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 11 ай бұрын
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.
@Lisas4us
@Lisas4us 11 ай бұрын
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 11 ай бұрын
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.
@gaurav3746
@gaurav3746 3 жыл бұрын
How can we compile it for a microcontroller like wimos d1 mini?
@sayanee
@sayanee 3 жыл бұрын
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!
@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 KZfaq. One is by Microchip themselves: kzfaq.info?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.
@mohammedalhinai5699
@mohammedalhinai5699 3 жыл бұрын
Can we also decode the car key remote ?
@jayzah
@jayzah 3 жыл бұрын
No
@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!
@usmanabdullah5321
@usmanabdullah5321 4 жыл бұрын
Why it only start receiving when you press volume up and down button
@toysareforboys1
@toysareforboys1 3 жыл бұрын
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.
@juanriofrio6872
@juanriofrio6872 11 ай бұрын
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 11 ай бұрын
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 11 ай бұрын
@@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 ☺️
@anokhautomation4453
@anokhautomation4453 2 жыл бұрын
You can use it remote hex code instead of a raw code.
@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 жыл бұрын
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 😃
@lionelmessi3111
@lionelmessi3111 Жыл бұрын
does anyone has a video of this same project but without using arduino?
@ZoomtronicBlogspot
@ZoomtronicBlogspot 2 жыл бұрын
nope, not working on both of my air conditioners, tried similar code few years ago also no results
@user-tu7uz7iv6f
@user-tu7uz7iv6f Жыл бұрын
Did u add NPN transistor?
@tarekas522
@tarekas522 Жыл бұрын
I can't find a library (data.h ) Where do I download it from?
@sayanee
@sayanee Жыл бұрын
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.
@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.
@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. kzfaq.info/get/bejne/jLx1jLejqKrZeHk.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!
@AlaaDuino
@AlaaDuino 4 жыл бұрын
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
@tarekas522
@tarekas522 Жыл бұрын
You didn't sit pin 3
Using IR Remote Controls with the Arduino
35:28
DroneBot Workshop
Рет қаралды 928 М.
EEVblog #506 - IR Remote Control Arduino Protocol Tutorial
23:56
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 29 МЛН
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,5 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 30 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
Мультимедиа контроллер и USB-HID за сотку! EasyHID ч.2
13:18
Заметки Ардуинщика
Рет қаралды 85 М.
Arduino Garden Controller - Automatic Watering and Data Logging
9:13
Practical Engineering
Рет қаралды 3,1 МЛН
Get Started in Electronics #10 - Using the Infrared Remote and Sensor
17:53
How to Hack any IR Remote using arduino
11:20
Enjoy Mechatronics
Рет қаралды 14 М.
Make your Infrared controlled air conditioner smarter
9:42
Hacker's Guide to UART Root Shells
17:40
Flashback Team
Рет қаралды 465 М.
Decode any IR remote using Arduino | Easy way
6:20
Technoreview85
Рет қаралды 28 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 319 М.
Blue Mobile 📲 Best For Long Audio Call 📞 💙
0:41
Tech Official
Рет қаралды 1 МЛН
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 2,1 МЛН