You can analyse the received data and recognize the START bit, STOP bit, binary ‘1’ and binary ‘0’ by below mentioned range.
So the received data will be around the mentioned range and with the help of this we can easily decode the received data. Lets decode the data which is received in the above image.
So this is the decoded data of my Panasonic AC. Than convert this data into 8 bit HEX code. Panasonic AC protocol consists of 8 bytes constant data and 19 bytes of other data which contains information of Temperature, Fan speed etc. In total there are 27 bytes of data, which is transmitted when we press single button of the remote.
You can search for different protocols for decoding binary ‘1’ and binary ‘0’. But if you don’t get any information, you can go for this logic,
first bit will be always start bit. and last bit will be always stop bit.
if low duration is greater than 1000 us , than it is binary ‘1’
if low duration is less than 1000 us , than it is binary ‘0’.
I don’t know that this will work for all the appliances or not but mostly this will work.
In case of TV,Setup box, Radio remotes the data is transmitted continuously as long as the button is pressed. Even if the data of that particular remote is sent, it will repeatedly send the same data as long as the button is pressed.
So, we need to press the button only once so that data is recorded only once. When I press the Remote of Radio which follows NEC protocol, the response I get is as follows,
So I received 75 bits of data which is not the true number in case of a NEC remote. Because NEC protocol sends only 34 bits(34*2=68 bits Here two is multiplied because for one bit we receive both High time and low time)of data including start bit and stop bit. But what if we don’t know which protocol is this and how many data bits are their in that protocol??? In that case we need to look after the Stop bit. Now the question is how to recognize the stop bit. Stop bit of most of the protocols is a long duration of Low time. The duration is much longer as compared to the other bits in the signal, hence it easily gets highlighted in the serial monitor. The stop bit in this protocol is shown below,
In NEC protocol, the stop bit is 40,000 us long. Hence get easily noticed. So the exact data of the single button of NEC remote is upto this stop bit ( including stop bit).
And again, we can convert this data in its binary form by decoding the duration of Low time pulses.
Start bit High Time – 9050 – 9150 us
Start bit Low Time – 4450 – 4550 us
Data High Time – 450 – 650 us
Data Low Time ‘1’ – 1650 – 1750 us
Data Low Time ‘0’ – 450 – 550 us
Stop bit High Time – 450 – 650 us
Stop bit Low Time – around 40,000 us
So with this you can convert this duration into binary data. In NEC protocol data format is like
Start bit – Address byte – Inv. Address byte – Data byte – Inv Data byte – Stop bit.
So this is how you can analyze the protocol and parameters of different IR remotes by just using you arduino board. I tried my best to explain this topic in as simple way as possible, still if you have any doubt feel free to ask me by email or just comment below.
I have also made video
on this topic, have a look
explore | learn | share