Infrared frequency heater remote - Page 1
Forum section: electronics / beginners

author: max246
author_rank: Newbie
timestamp: October 08, 2018, 01:32:58 pm
content: I am trying to hack my heater and re-produce the infrared signal of the 6 buttons, but it seems a bit odd how to decode this sort of stuff.I used an arduino sketch which allow me to read and repeat the codes and it worked with different remote controller but not for this specifi one.The board is powered by a button battery and it only has a chip BEC5104S, I have even soldered a infrared emitter that does 38Khz so I think it is running at 38khz the signal.After testing here and there I was aim to test on the oscilloscope and send raw signals but still not success.I attach here some pictures and hopefully someone cal help me out to figure out what frequency is running and how to send raw codes via an arduino.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: October 08, 2018, 10:53:33 pm
content: Well, that shouldn't be too hard. Just eyeballing your scope trace I see short HI pulses of about 400 microseconds and long pulses of three times that length, and separated by one or three LO periods of 400 us also. So use the scope to zoom in on one of the short pulses and measure it accurately, then program the Arduino to send the sequence of pulses of the appropriate lengths to a regular IR LED (or the 38 MHz transducer), which will be multiples of the basic short pulse duration you measured accurately using the scope.Then to get the appropriate repetition rate of the pulse train from the remote, zoom the scope out so that you can see several instances and measure the interval between them.I have used this method to control my window AC unit.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: October 08, 2018, 11:02:48 pm
content: So the pulse train in the scopeshot above may be represented by the following string:111011101000111011101000100010001110100010001where the basic time unit is "about" 400 microseconds and where 1 means HI and 0 means LO and a sequence like "111" means a HI pulse of 3x units duration.

author: t1d
author_rank: Super Contributor
timestamp: October 10, 2018, 03:01:24 pm
content: I am noobish, so this may not help... This type of inexpensive Logic Analyzer has a good reputation, for a Chinese gizmo... Download Saleae's Sigrock and PulseView, to use it with a laptop. They're freeware. YouTube has really good instructionals, about it.https://www.ebay.com/itm/USB-Logic-Analyzer-Device-Set-Compatible-to-Saleae-24MHz-8CH-for-ARM-FPGA-M100/223119091948?hash=item33f2ef28ec:g:NNoAAOSwjXVaoiyH:rk:8:pf:0

author: hexreader
author_rank: Frequent Contributor
timestamp: October 10, 2018, 04:34:42 pm
content: The Chinese version of BEC5104S datasheet is just readable enough to be able to easily decode your scope trace as 110110001000Try different buttons to see what codes they produce.As far as I can tell, that chip produces unmodulated signals. Remote controls usually need modulation. Maybe the modulation is done elsewhere on your remote control. I cannot tell.Just adding an IR LED to that signal won't help.Put scope probe directly onto the remote control's IR LED (the original one, not the one that you added) to check modulated signal, assuming that it is modulated at all.

author: max246
author_rank: Newbie
timestamp: October 25, 2018, 02:39:26 pm
content: Sorry if I sound a bit too stupid, but are you saying that I will just make my own "on and off" procedure?Just create my code that does digitalWrite HIGH and LOW on the same timing of what I see on the screen?what about if I want to use the IR library from arduino? I see I can send "RAW" data, but I am not sure if measuring the "delta" of each spike was correct.Also, how can I confirm that this is 38KHZ ? I just want to make sure I am able to reproduce this signal so I can "hack " my heater.

author: hexreader
author_rank: Frequent Contributor
timestamp: October 25, 2018, 04:23:54 pm
content: I think the honest reply is that I simply do not know enough about your heater and it's remote to be able to give meaningful advice.SorryAre you trying to make your own IR remote?, or are you trying to wire 6 buttons directly to the heater? or are you trying to control your heater from a computer of some kind? .. or am I missing the point entirely?I have very limited Arduino knowledge, but I suspect that there is no library to create the raw signal that you seem to want, so my guess is... yes, you will need to use digitalWrite high/low (or direct port manipulation) with appropriate delays.Maybe mentioning 38kHz was a mistake, since re-reading the above, it seems that you really do want the raw signal (presumably to inject into the point in the circuit where the IR receiver output goes/went to?)It is possible that I completely misunderstand, in which case please just ignore my guesswork.

author: hexreader
author_rank: Frequent Contributor
timestamp: October 25, 2018, 06:35:20 pm
content: This sketch seems to produce a scope trace to match yours:Code:// produce raw command for 6 button heater control// currently only know one button code, so for now, just repeatedly send that one code// written by amateur coder who accepts no reponsibility for anything, anywhere, ever// pin allocationint heatPin = 13; // LED connected to digital pin 13// function prototypesvoid send0();void send1();void sendmessage(signed int send_data);void setup() {pinMode(heatPin, OUTPUT); // sets the digital pin as outputdigitalWrite(heatPin, LOW); // sets the output low - quiescent state}// test program - send same button code over and overvoid loop() {sendmessage(0xD88); // button 1 codedelay(2000); // repeat every 2 seconds}// send a 12 bit message plus stop bitvoid sendmessage(signed int send_data){signed char bitnum; // count through 12 bitsfor (bitnum = 11 ; bitnum >= 0 ; bitnum--){if ((send_data >> bitnum) & 0x001){ // test bit 0 after shifting n bitssend1();}else{send0();}}send0(); // stop bit of zero}// send a one (1200uS high followed 400uS low)void send1(){digitalWrite(heatPin, HIGH); // sets the output highdelayMicroseconds(1200); // high timedigitalWrite(heatPin, LOW); // sets the output lowdelayMicroseconds(400); // low time}// send a zero (400uS high followed 1200uS low)void send0(){digitalWrite(heatPin, HIGH); // sets the output highdelayMicroseconds(400); // high timedigitalWrite(heatPin, LOW); // sets the output lowdelayMicroseconds(1200); // low time}

author: alsetalokin4017
author_rank: Super Contributor
timestamp: October 25, 2018, 07:06:21 pm
content: check the comments on the last two function definitions

author: hexreader
author_rank: Frequent Contributor
timestamp: October 25, 2018, 07:12:17 pm
content: Well spotted....... fixed with edit