Remote Control Signals, Info?

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Remote Control Signals, Info?

Post by MrAl » Tue Apr 07, 2009 3:25 am

Hello there,


Anyone have any info on the type of remote control signals sent out from your typical remote control
used to control TV's, VCR's, etc.?

I am looking for as much information as possible, about the carrier frequencies, code pulses, code
words, what order they are sent, how to figure out what codes will do what functions on a
device, etc. I had some info on this a long time ago but seem to have lost it.

Also important, are there any industry standards in existance with these things?


Thanks :smile:
LEDs vs Bulbs, LEDs are winning.

User avatar
sofaspud
Posts: 531
Joined: Wed Feb 13, 2002 1:01 am
Location: San Antonio, TX
Contact:

Re: Remote Control Signals, Info?

Post by sofaspud » Tue Apr 07, 2009 4:42 am

I can provide the following, and since remotes are so ubiquitous I'd be interested
to know if there is some sort of an up-to-date "one-stop repository" somewhere
on the web for the technology behind them.
http://repairfaq.ece.drexel.edu/sam/irrfaq.htm
I searched the repairfaq site but didn't find the 10 year old file I have archived. So
I've included most of it below, with credit to originator Juergen Putzger.

6. Decoding IR Remote Controls (From Juergen Putzger)
The origin of this posting was the question what to do with an old TV. I
suggested to use the infrared remote control as an input keyboard for a
microcontroller board and mentioned a piece of code I had written for
the 8052 microcontroller. I was asked by some people to share my
information about remote controls, so here it is:
There are at least two international standards which are used by remote
controls to encode the commands, the RC5 and RECS 80 code. The RECS 80
code uses pulse length modulation. Each bit to be transmitted is encoded
by a high level of the duration T followed by a low level of duration 2T
representing a logical '0' or 3T representing a logical '1'.
Notice that a '1' takes more time to be transmitted than a '0'. The RC 5
code instead has a uniform duration of all bits. A transition in the
middle of the time interval assigned to each bit encodes the logical
value. A '0' is encoded by a high to low transition and a '1' by a low
to high transition. Therefore we need additional transitions at the
beginning of each bit to set the proper start level if a series of equal
bits is sent. We don't need this additional transition if the next bit
has a different value. This is also called a 'biphase' code.
Instead of being fed direct into the IR emitter, most remote controls
modulate a 20-30 kHz carrier with this signal. A logic one is
represented by a burst of oscillations.
The reason is, that you can use a filter tuned to the carrier frequency
to distinguish the signal from noise in the ambient light. Fluorescent
lamps are the main source of such noise. Photodiodes behind an optical
filter which transmits infrared light but blocks visible light are used
as detectors. The signal from the photodiode is fed through a filter
tuned to the carrier fequency and then amplified. The amplified signal
is demodulated just like the carrier is demodulated in any AM radio
receiver.
It can be a lot of pain to design a sensitive receiver that does'nt
start to oscillate. It is also necessary to have some automatic gain
control to avoid overload of the amplifier at close distance to the
emitter. It is easier to use some integrated circuit that does all of
the job. The best i have ever seen (and used) is the SFH505A
manufactured by SIEMENS (no, I don't work for this company). It looks
like one of this three legged voltage regulators and uses a single 5V
supply. It incorporates an optical filter, the photodiode, a filter
tuned to about 30 kHz , the amplifier with automatic gain control and
the demodulator.
If you don't know which code your remote control is transmitting you can
identify it by viewing the output of your receiver with an oscilloscope.
The RECS 80 code uses high pulses of uniform length while the low pulses
differ in length. If there are high and low pulses of two different
lengths it might be RC5 code. Note that your receiver may invert the
levels.
How are commands like volume control or channel selction encoded? In the
case of the RC5 code there is an international standard. Every command
is encoded by 14 bits. The first two bits S are startbits to allow the
receiver to adjust the automatic gain control and to synchronize. Next a
bit T follows, that toggles with every new keystroke. Next is the
address A of the device which shall respond to the command. At last the
command itself follows.
| S | S | T | A4 | A3 | A2 | A1 | A0 | C5 | C4 | C3 | C2 | C1 | C0 |
Some important addresses and commands:
Address: Device: Command:
0 TV1 0...9 Numbers 0...9 (channel select)
1 TV2 12 Standby
5 VCR1 16 Master Volume +
6 VCR2 17 Master Volume -
17 Tuner 18 Brightness +
18 Audio Tape 19 Brightness -
20 CD Player 50 Fast rewind
52 Fast run forward
53 Play
54 Stop
55 Recording
There are integrated decoder circuits which have inputs to select the
device address and parallel outputs activated by the commands. Since
this is comp. robotics the devices you wish to control will have a
microcontroller on board which can do all the decoding. Here is an input
routine I have written for the 8052 microcontroller family to receive
RC5 codes. My cousin has written a similar routine for the RECS80 code
which i will try to make available also. Perhaps we can start a
collection of such routines and archive them somewhere.

User avatar
Dave Dixon
Posts: 436
Joined: Thu May 01, 2003 1:01 am
Location: Wichita, KS
Contact:

Re: Remote Control Signals, Info?

Post by Dave Dixon » Tue Apr 07, 2009 5:00 am

Couch Potato had some excellent info. Thanks, I learned something new this morning!

A cheap way to "view" your remote control's output is to use any ole' digital camera with a viewscreen. The IR shows up nicely. At least it is a good method to see if it is operational or not. I never tried (or thought to try) recording a short video (many cameras will do this) and then playing it back in slow motion. That might be fun. Best of luck.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Remote Control Signals, Info?

Post by philba » Tue Apr 07, 2009 10:00 am

Al, there really aren't any standards. Each manufacturer has their own and some have multiple different standards. There are also a number of different modulation frequencies. Most are in the the range of 32 to 56 KHz. On top of that, the actual command codes vary widely. You have to look at each manufacturer separately.

Here's a page that describes some of them. http://users.telenet.be/davshomepage/

What are you trying to do?

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Remote Control Signals, Info?

Post by MrAl » Tue Apr 07, 2009 11:32 am

Hi again,

sofaspud, thanks for the great link! That has lots of info to get me started.

philba, i might look into creating a remote that does all of the devices i have now.


I had already tried the photo transistor thing, and it's interesting that i could not
detect a carrier with any of my remotes. This is interesting because all of the sites
say there is a carrier. All i got was PWM codes, similar to the RC5 codes pointed out
in the link sofaspud posted (essentially pulses that represent 1's and 0's that make
up the code for the device and function).
It could be that i was using a very high value resistor for the pullup (10k) as the
sites use low values like 500 and i think 220 ohms, which would probably inprove
the response of the IR photo transistor. Interesting though, that with this high
value maybe it is demodulating it too...but wait, the signals look too clean for that.
I'll have to look into this more.
LEDs vs Bulbs, LEDs are winning.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Remote Control Signals, Info?

Post by MrAl » Tue Apr 07, 2009 11:47 am

MrAl wrote:Hi again,

sofaspud, thanks for the great link! That has lots of info to get me started.

philba, i might look into creating a remote that does all of the devices i have now.


I had already tried the photo transistor thing, and it's interesting that i could not
detect a carrier with any of my remotes. This is interesting because all of the sites
say there is a carrier. All i got was PWM codes, similar to the RC5 codes pointed out
in the link sofaspud posted (essentially pulses that represent 1's and 0's that make
up the code for the device and function).
It could be that i was using a very high value resistor for the pullup (10k) as the
sites use low values like 500 and i think 220 ohms, which would probably inprove
the response of the IR photo transistor. Interesting though, that with this high
value maybe it is demodulating it too...but wait, the signals look too clean for that.
I'll have to look into this more.

Hello again,

Ok i verified that with a lower value resistor on the collector the higher frequency
can be seen on the scope. It's around 40kHz for one remote.
It is very interesting however that with a much higher value resistor the
photo transistor capacitance makes it act like a pulse detector, so the only
output is the pulse pattern with no carrier observed. This means it might
work better with a higher value resistor because i dont need to detect the
carrier itself anyway, just the pulses.
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Remote Control Signals, Info?

Post by philba » Tue Apr 07, 2009 12:40 pm

That seems odd to me. A weaker pull up should make it easier for the photo transistor to pull it's collector low thus exhibiting better frequency response. Light induces a base current - more light, more current. Do you have a cap in circuit acting like a low pass filter?

User avatar
Dave Dixon
Posts: 436
Joined: Thu May 01, 2003 1:01 am
Location: Wichita, KS
Contact:

Re: Remote Control Signals, Info?

Post by Dave Dixon » Tue Apr 07, 2009 1:19 pm

Hi Al,
I'm not sure if you are interested, but others lurking out there may be! I had a minute to kill this afternoon. Lights off and used my cheap digital camera set to movie mode. Macro setting and focused on the Infra-red LED and recorded while I pressed a few buttons on the remote. The video came out great. My movie viewing software I'm using here makes it kind of difficult to slow down, but ran it slow and as even as I could, and was able to make out the long and short pulses with ease. I wasn't playing this afternoon.... I was "working"... really.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Remote Control Signals, Info?

Post by MrAl » Wed Apr 08, 2009 2:59 am

Hi again,


Dave:
Oh that's very interesting. My camera doesnt have a video capture mode
though, just still single frames.
I think i can set something up to digitally capture the pulses, but
it's going to take some work i guess.

philba:
Well, there are two or three times that have to be considered:
1. rise time
2. storage time
3. fall time

Having a high resistance like 10k on the collector means the fall time
is really really fast (and this is evidenced on the scope), while
having a low resistance like 1k or lower means the rise time is fast
(and the fall time is fairly fast too). I dont know what the storage
time is (and havent made any attempt to measure it) but it must be
short enough to allow at least some of the carrier to show through.
The rise time is partly dependent on the pullup resistor value and
the internal capacitance of the device, so it must be that RC that
is limiting the bandwidth when the resistor is sized at 10k. It's
interesting because the device then acts not only as a sensor but
also as a demodulator, which is kinda nice.
It's not hard to try either if you want to duplicate this experiment.
Just take an IR photo transistor and use two or more different size
resistors, 1k and 10k, or as some of the web sites say use even lower
for the 1k, which should allow the full 40kHz carrier to show through.

It's also of some intererest that the entire carrier doesnt show up
as full 0v to 5v pulses, but rather they only make it up to about
1v peak so the pulse amplitude ranges from 0v to 1v (bottom part
of the pulses) with 1k. Maybe a lower value will show the full
range pulse at 40kHz, but im not that interested in seeing the
carrier anyway as in a real life use the circuit would mainly
want to see the pulses (to be captured with a uC chip).

If you do any experiments i'd be interested in hearing some results
too. It's also too bad that the crummy spec sheet i have for my
IR photo transistors is not very good...it doesnt show any switching
times. It was cheap though, three for a dollar (USD) at Jameco.

BTW, if you dont want to do any real life experiments you can do
simulations by using a regular NPN transistor and adding some capacitance
from collector to ground, drive with a square wave through a resistor,
and watch the output collector waveform as it switches in response to
the square wave drive. Changing the collector resistor pullup will
show the same thing i am seeing here with the photo transistor.
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Remote Control Signals, Info?

Post by philba » Wed Apr 08, 2009 8:10 am

Given that the pulses of a typical IR coding scheme run in the 6-10 modulation cycles range, the shortest pulses will be on order of 200 microseconds. I don't see how a video camera running at 30 fps (i.e. 3.33 mS frames) can possibly pick up enough detail.

I've played a fair amount with PTs but it's been a while. I was more interested in sensitivity and played with pull up values all the way into the megaohm range. What I found is that I was getting "full" voltage swings with larger values. Because the base current is proportional to the light intensity, it takes more light to pull down a low value pull up (I think that makes sense...).

Your PT would have to be pretty slow since we are talking modulation pulses in the 25 - 30 uS range. I think there's something else going on - it takes more than just "detuning" a PT to demodulate a signal. You should look at various IR receivers like the TSOP11xx series from Vishay. There is a lot going on in them.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Remote Control Signals, Info?

Post by MrAl » Wed Apr 08, 2009 8:21 am

Hi Philba,


My photo transistor spec sheet is very slim to say the least, with no rise or fall time specs.
This tells me that this is an exceptionally slow device and they dont want to have to
point that out on the spec sheet.

You probably used a much faster photo transistor. I could probably repeat with a pin
diode and see every transistion clear as a bell, but im not sure if that is necessary.

Do you happen to have a part number for your photo transistor? If so i could
look up the specs on that one and try to make some sense of it all.
One thing is for sure though, the demodulation is taking place with higher
resistance values and i dont mind that much for the purpose of simply
reading the output of a remote control. For an actual device to be remote
controlled however i would prefer to have it be able to detect the carrier so
i could filter the signal much better (rejecting ambient light changes that
occur frequently around 120Hz). Would be nice to have a photo trans that
could do that too.

Thanks for the replies. This is getting more interesting.
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Remote Control Signals, Info?

Post by philba » Wed Apr 08, 2009 1:20 pm

I'll take a look tonight. I recall that it's obsolete and had a hard time digging up the datasheet on the chinese website.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Remote Control Signals, Info?

Post by philba » Wed Apr 08, 2009 2:45 pm

Al, I guessed at the part number and mouser had it. No datasheet but here's the mouser page - http://mouser.com/Search/ProductDetail. ... JMfw%3d%3d

Interestingly, it shows rise and fall max as 15 uS. I'm surprised it's so slow.

Robert Reed
Posts: 2276
Joined: Wed Nov 24, 2004 1:01 am
Location: ASHTABULA,OHIO
Contact:

Re: Remote Control Signals, Info?

Post by Robert Reed » Wed Apr 08, 2009 5:19 pm

MrAl
"One thing is for sure though, the demodulation is taking place with higher
resistance values "
You have just duplicated a standard AM receivers demodulator. Fast charge on a capacitor and slow discharge of the same. The RC values would be based on the IF frequency, usually 455KHz. By increasing or decreasing the collectors load impedance, you are passing thru the RC range from almost no demod to over demod. Somewhere in between you hit the right value to properly demod for the carrier frequency involved - 40 KHz ( probably a more accurate check here will show 38 KHz).
The limited amplitude you have seen would be due to two things - first as Philba suggested inadequate base drive (due to low light falling upon the base region) and RC time of the collector load and associated capacitances. Look at this circuit as a high frequency amplifier that can only slew as fast as it's RC time will allow.
I've worked with several of these devices over the years and early on they were incredibly slow. Later ones could handle 100 KHz adequately, but the more recent ones are quite fast ( I have not used any of these, only browsed their spec sheets as a "drive By". If this is an important project, I would look into faster photo transistors and save a lot of headaches early on. Also, you will probably want to apply the input signal to a 38KHz (?) filter before any other processing takes place, thus blocking unwanted light sources. If you are anything like me, a simple throw together project always ends up being a major reseach project due to the devil in the details :smile:

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Remote Control Signals, Info?

Post by MrAl » Thu Apr 09, 2009 3:52 am

Hi again,


philba:
Oh ok, well that's about what i am seeing too with my PT.
Strange, i would expected it to be faster.
I wont need the speed until i go to something that needs to
detect the carrier. With the remote 'reader' i dont need
the speed though. Also, i can get full swing on Vcc at the
collector by simply holding the remote 1 inch from the
photo transistor. Seems to work pretty well as every pulse
can be seen.

Robert:
Oh yes, the AM demodulator. That's just what i am seeing and
it doesnt bother me right now, but later it might. Right now
i just need to detect the pulses themselves with little or
no interference to be worried about just yet.
I wonder if they make any with pin diodes on the base...i bet
they do. Or alternately, pin diode with amplification.
I've picked up some very fast signals with pin diodes in the
past maybe i should turn to that for detecting the carrier.
Or maybe one of those IC parts? I've looked on the web
though and couldnt find one of those parts for sale.
They already take care of detecting the carrier and demod
and provide a pulse output with no carrier which is nice.
LEDs vs Bulbs, LEDs are winning.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests