Newbie questions / clarifications

Everything related to protocols and IR codes
Post Reply
dkc1959
Posts: 6
Joined: Sun Sep 19, 2021 6:50 am

Newbie questions / clarifications

Post by dkc1959 »

Hi (long post, apologies),
I've recently retired and restarted my old hobbies - electronics, coding etc ... currently learning to use Arduino Nano, Mega and ESP32. I've been getting to know the various I/O devices and how I might use them in practical projects - the most recent is an IR Sensor. I plan to work on a home automation system using a few ESP32s around the house and got as far as the A/C units. I have Mitsubishi and Daikin split systems ... 1 at each end of the house. I used the example sketches provided with the IRremote library and got codes to display on the Serial Monitor, but could make little sense of them - they seemed very different each time. I found this forum and have been reading through various posts, slowing building an understanding, but still not quite there. I've attached a few traces I captured from the Mitsubishi A/C with different timebases that show ... the whole response (20ms) to a button press (up button I think from memory) as well as zoomed in to 10mS and 5mS that show very similar traces to those I've found in this forum from AnalysIR ... except the traces are inverted.
Q1 - Should the traces be inverted like this or should I invert them before trying to decode them ? This would also answer the question of transmitting when I get that far.
Q2 - I changed the definition of RAW_BUFFER_LENGTH to 299 in the IRremote library file IRremoteInt.h (as it looks like the Mitsubishi needs more than the default setting of 100 - probably 288). Is this a reasonable ?
The A/C remote is very similar to the one shown in the "Reverse-engineering-mitsubishi-ac-infrared-protocol" blog post, so I assumed the codes should be similar too (trace lengths seem about right) but the output doesn't look anything like it ... no constantly appearing bytes. When I compare my oscilloscope traces each time I press say the "up temp" button, the traces always seem to look the same at the start which lines up with expectations - but the decoded values are all different.
As I said, newbie :)
Probably purchase AnalysIR to help, but want to get the basics first

thanks
Duncan
You do not have the required permissions to view the files attached to this post.
User avatar
AnalysIR
Site Admin
Posts: 776
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Newbie questions / clarifications

Post by AnalysIR »

Yes, they should be inverted as IR receivers use inverted logic.

You will likely get much better timings using our sketch from the blog, https://www.analysir.com/blog/2014/03/1 ... s-arduino/


for basics search for "sbprojetcs ir"
dkc1959
Posts: 6
Joined: Sun Sep 19, 2021 6:50 am

Re: Newbie questions / clarifications

Post by dkc1959 »

Thanks for the confirmation of inverted logic ... that's good to know. I'll give the sketch a try soon, thanks.
Post Reply