Hi,
welcome, this is Clemens at Elektor.
In this video I will show you how to
reconstruct an
infrared remote control when the
original one has gone missing or died.
Last week I went to the garbage disposal to get rid of some garbage
and when done I saw this TV standing against a bin.
Now, when it's standing against the bin instead of being inside it,
it usually means that the original owners don't want it anymore
but that the device itself is probably still working.
So I took it with me and I smuggled it into our home.
When I connected the TV to the mains power supply,
the standby LED turned red and
pressing the power button it even became green.
Pressing one of the menu buttons here brings up the menu
and you can also select the source.
When I connected the TV to the roof
antenna, I even got a perfect image.
It seemed that I had recovered a fully
functional TV.
The only thing missing was a remote control, which is a pity.
You can access most of the TV's functions by pressing the push
buttons on it,
but this is not very practical. A remote
control would be much handier.
The TV is an Oceanic OCEALED32HD5,
also known as a GDL32AC528Q,
which, according to the internet, is also
a Continental Edison TV.
I even downloaded the manual to prove
this.
I have this universal remote control that I once
bought to replace all our remote controls
by a single unit to control
everything,
but that project had never gone any
further than the idea stage.
Luckily, I had kept the user manual
and looking through it I discovered that it had 17
possibilities for Oceanic TVs
and 9 more for Continental
Edison TVs.
Unfortunately, none of them worked.
However, the universal remote control can also cycle through all the codes it knows of
and all you have to do then is watch the
TV and see if something happens
while the remote is sending the
different codes.
When something happens, you can read the code on the remote's display.
Now doing this I got lucky at code 280
when the TV suddenly showed its "volume minus" menu.
looking through the
user manual I discovered that this code belongs to an Hitachi TV.
So, now I had some of the RC codes but not all.
The number keys were working fine,
and I had volume down
and mute, but not on the right keys,
and missing were for instance
standby or channel up and down or volume up.
So how to get these missing codes?
Several years ago I had played with
Arduino and infrared remote controls
and I had written a few sketches or programs
to experiment with sending and receiving RC codes.
One of the sketches I wrote tries to guess the protocol used
by looking at the
beginning of a code.
To make this sketch work, all that you
have to do is connect an IR receiver IC
like this TSOP1738
to one of the Arduino extension connectors.
Such an IC only has three
pins,
two of which are power supply pins,
leaving only one pin for data.
You can stick those ICs directly in the
extension connector of an Arduino Uno compatible board.
When running the sketch to guess the protocol and pointing the remote at it,
it gave me 'NEC'.
Now this is not surprising as
at the time when I wrote that sketch
about 90% of the remotes I tried, used
that protocol.
This protocol is also known as NEC-1.
This is the NEC-1 data format.
An RC code starts with a pulse
of about 9 milliseconds,
followed by a pause, meaning no signal,
of 4.5 milliseconds.
Then there are 32 data bits.
Data bits are separated from each other by short pulses of about 560 microseconds.
The value of a bit is encoded in the pause that follows it.
Fora '0' this is a pause of 560 µs,
and for a '1' the pause is about 1.7
milliseconds.
After the data bits comes a stop signal
which is a pause of at least 5 ms.
Because at the time I had
so many NEC-type remotes
I had also written a sketch
to decode the protocol.
Running this sketch and firing RC codes
at it immediately gave results.
It turned out that the TV responded to
codes that started with '02fd' in hexadecimal.
The data is encoded in the next byte or 8 bits
as a value from 0 to 255.
Then comes a kind of checksum byte which is the ones' complement of the databytes.
This means that it has the same value
except that the '0's have been replaced by '1's,
and the '1's have been replaced by '0's.
This kind of checksum not only offers a simple means
of detecting obvious transmission errors,
it also ensures that every code has the
same number of ones and zeros.
In this case every code contains
16 zeros and 16 ones.
Every code therefore has the same length in time.
Every code also has the same average value or DC level
and every code will consume the same amount of energy.
At first sight this protocol seems to be rather simple
with only 256 possible key codes,
but there may be more to it.
If you look closely at the beginning, the '02fd' part,
then you will notice that the '0' and 'f'
are complements of each other and the same is true for '2' and 'd'.
This may be something to keep in mind if we can't find all the codes the easy way,
meaning by simply sending the 256
possible codes to the TV.
Not very important, but good to know, is
that the least significant bit is transmitted first,
so you have to read the bits from right to left.
Sending IR codes with an Arduino is as
easy as receiving them,
just connect an infrared LED in series
with a current limiting resistor
to a pin that can be a digital output,
which is any pin on an Arduino.
I used pin 2, which is the first pin after the
serial port that I'd reserved for communication with a computer.
During my experiments with infrared remote controls,
I had also written a sketch to send NEC- type codes.
All I had to do now was modify it a bit so that it would be practical for finding codes.
For this I used a serial terminal.
Sending a  to the Arduino makes it
send a code,
and then it lets you write a comment in
the serial terminal.
This is practical for keeping track of
what a code does.
Pressing  in the serial terminal
signals the end of a comment,
and advances the code to the next code.
When you press  again, it will send the next code.
Now, sometimes a code opens
a menu on the TV
and you have to send the same code again to close it.
For this I implemented the  command,
so when you press the  key it will resend the code that you just sent.
with  and  key commands you can increment or decrement the RC code,
which gives you some more
control.
With this sketch I quickly found most of
the codes.
Power on and off for instance is number
11 and number 49 is subtitles on and off.
This way I also discovered that this TV has 'personal video recording' on a USB stick capabilities, PVR,
and that it can function as some
kind of a multimedia server.
I did not find arrow and OK and
Exit  keys.
That requires to first open a
menu and then search for codes.
I stopped here as I now had enough data to program a universal remote control
with the codes that I had found.
For this I used another universal remote
control that I had lying around,
a simple one with only a power button,
channel-up and -down buttons,
volume-up and -down buttons and a mute
button.
After putting it in learning mode,
I could fire the corresponding codes
with the same Arduino sketch that I'd used for discovering them.
The  command turned out to be very practical for this.
Now I have a usable remote control for my new old TV.
Okay, here ends this video.
In this video I showed you how I reconstructed an infrared remote control
for a TV that I had found in the
garbage dump
using only simple Arduino setups.
I also showed you how the popular NEC-1 protocol works
that is used by so many
of these devices.
You can find the link to download the
sketches I used in this video
in the description below.
Okay, that's it.
I hope you found it interesting.
Please don't forget to subscribe to our
channel and tap or click the bell button
Thank you for watching.
