2025-06-02

IR LED controllers

I ordered a couple of LED controller remotes.

Now to work out how they work.

The first (big one) is simple 32 bit NEC coded (i.e. address, inverted address, code, inverted code) with address 00. Laid out as follows for the code:-

5C 5D 41 40

58 59 45 44

54 55 49 48

50 51 4D 4C

1C 1D 1E 1F

18 19 1A 1B

14 15 16 17

10 11 12 13

0C 0D 0E 0F

08 09 0A 0B

04 05 06 07

As you see, this has some pattern to it, but why not literally a proper grid or sequence, why this. But OK, I can cope. I plan to make my LED controller boards have IR receivers and understand this in some sane way - with extra keys like DIY1 do device automation to Home Assistant.

But what of the smaller one?

Well this is special, it is 32 bits, just like an NEC remote, but the first bytes are 00 EF not address and inverted address. I mean, it is distinctive, and consistent on all keys, but not quite standard. The code is still code and inverted code though. The codes are then:

00 01 02 03

04 05 06 07

08 09 0A 0B

0C 0D 0E 0F

10 11 12 13

14 15 16 17

This is way more logical key codes.

Simpler

For completeness, this is a nice simple IR from Amazon.

Which is address 00 and codes:

45 46 47

44 40 43

07 15 09

16 19 0D

   18

08 1C 5A

   52

Which, as you can see, is all over the place! 

2025-06-01

Infra-red remote conrols

I have done a lot of stuff over the years, and the "old" tech, like barcodes, and modems, faxes, and all sorts have not passed me by, even old school "light pen" on a BBC micro.

But somehow one "old" tech passed me by somehow, and I am not sure how - the IR Remote.

They are a lot like barcodes, but without the variable timings. They are simple, and why the hell, in the last 50 years, have I never played with IR remotes? Mad.

So I have started.

This is my environmental board, and apart from light, sound, pressure, temp, humidity and CO₂ sensors, it has an IR receiver. So I had a play.

The ESP32 has built in IR receiver (RMT) hardware that logs timings for the on/off from the IR receiver modules (which handles the 38kHz modulation for me).

It is a doddle to decode - actually way easier than barcodes. So I have decoded the very common NEC format, and the remote for the Daikin air-con.

NEC

The NEC coding is simple - a long/short header, and then pulse distance coding of 32 bits. It is 4 bytes (and annoyingly low bit first) which are address, and inverted address, and code, and inverted code, making a checked 16 bit sequence of fixed time duration.

This seems to cover a variety of bog standards remotes, like TV remotes. Interestingly my LG TV remote only does IR when the TV is off. Once on, it uses something else (not sure if bluetooth or what). It uses address 04.

I also have a very generic IR remote from Amazon, which is address code 00, and several (very illogically mapped) codes.

A single bit code 0, with a different timing header burst, is repeated whilst the button is pressed. Easy to decode press, hold, release.

Daikin

The Daikin remote is more complex, some 8 byte sequences, and a 19 bytes sequence, sent every time, using a simple byte checksum code at the end. Again, pulse distance coding. But again not hard to decode.

More

I have some more IR remotes coming to play with. So we'll see how they work.

IR LED controllers

I ordered a couple of LED controller remotes. Now to work out how they work. The first (big one) is simple 32 bit NEC coded (i.e. address, i...