Looking to maximize the range of my Lego IR Remote controller.

I've "finished" a side project where I reverse engineered the IR protocol that Lego uses to control their Power Function systems, but I'm a little unhappy with the range of my remote. I've tried running 9V, unimpeded, through a series of 4 IR LEDs, but I'm still only getting 2-3 meters in a darkish room - not even as far as my TV remote.

I'm not seeing any specific guidance online on what to do to really up the distance on a remote. I did read the statements on TV B Gone's website that says that they're getting MUCH better range than I am (20 - 40 meters!!!) and would dearly like to know how to pull that off. I'm running my arduino off of a 9V battery and am currently using a transistor to switch the LEDs' 9V supply, so any solution at any voltage is welcome!!!

Thanks...

Sounds like you have a duff receiver or transmitter as the spec says 10m range.

I have four receivers, each of which fail at about the same range. The battery packs driving the receiver/motor sets are 8x1.6v AA batteries. So there's nothing wrong at the receiving end.

The transmitter is one I built myself and it is precisely this device I am asking about. The general question is one of how one maximizes the range of an IR remote control, but given that I have 9V availability, there's a bit more leeway than one would normally have with a TV remote at 3V.

The general question is one of how one maximizes the range of an IR remote control

More power (multiple emitters), more directionality (reflector/lens).

You might check that you've got the transmitter tuned to the right frequency. A multimeter across the legs of the emitter should handle it.

what id do is bypass ir all together and use an rf solution. one end reads the output from the remote, parrot the data over rf, and then have another converter at the other end to reformat as ir. sounds like a job for a couple tiny85s and a couple of ask modules.

I've tried running 9V, unimpeded, through a series of 4 IR LEDs

What do you mean by that? Does it mean no current limiting resistors and the 4 LEDs are in series?
If so then I suspect that the actual current through the LEDs is limited by the gain of the transistor you are driving them with. Also I suspect that this has over currented the LEDs and now you have partially burnt them out and they are not producing much in the way of light (IR) output.

Grumpy_Mike:

I've tried running 9V, unimpeded, through a series of 4 IR LEDs

What do you mean by that? Does it mean no current limiting resistors and the 4 LEDs are in series?
If so then I suspect that the actual current through the LEDs is limited by the gain of the transistor you are driving them with. Also I suspect that this has over currented the LEDs and now you have partially burnt them out and they are not producing much in the way of light (IR) output.

I tried a number of experiments using red LEDs to see what gave me the brightest output and yes, I did end up connecting the LEDs in series with no current limitation. To see if I was going to fry the (red) LEDs, I pulsed them continuously at the frequency my remote uses (about 38kHz) - for a continuous day. Having seen no ill effects on the red LEDs, I wend ahead with infrareds on 9v, since 9v was noticably brighter than the 5v I had available on the arduino's out pin. I haven't noticed any change in range from when I first tested it until now, so I don't know if they have burned out a bit. I can verify with an IR-sensitive digital camera that they are still blinking happily away.

Would I be better off going with IRs in parallel and a small CLR? Given the number of options in IR LEDs, I'm a little overwhelmed even before I'm done purchasing the things. =]

The fact that you "tested" red LEDs means nothing. The forward voltage drop on RED and IR LEDs is different so there is no comparison to be made.

Having seen no ill effects on the red LEDs,

Would you have noticed a 20% light level drop between one day and the next? Especially given the fact that the eye's response is non linear.
Given the nature of the current / voltage curve of an LED it is almost impossible that you have not subjected them to over current.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

The only way to get the proper current is by using the correct resistor value calculated from the data given in the data sheet for your LED. Yes there are a lot to choose from and it can be confusing. First of all the wavelength must match the wavelength of the receiver do you know what that is? Getting the wrong wavelength will reduce the range. Given that is what you are seeing I would suspect that might be your problem.

Then there is the radiance angle, generally the narrower the angle the greater the range at the expense of it being more directional. Then there is the luminance output and finally the working and peak current. Normally the peak current is very much greater than the continuous current, however it is normally quoted on a 10% duty cycle and I suspect you are flashing it at a 50% duty cycle. Do you know what the duty cycle you are using is?

Would I be better off going with IRs in parallel and a small CLR?

Not sure what a CLR is apart from Capacitor Inductor and Resistor but as you don't use capacitors or inductors when driving an LED it can't be that. However series is fine as long as the current is controlled.

Grumpy_Mike:

Having seen no ill effects on the red LEDs,

Would you have noticed a 20% light level drop between one day and the next? Especially given the fact that the eye's response is non linear.
Given the nature of the current / voltage curve of an LED it is almost impossible that you have not subjected them to over current.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

A very good point but my range has hovered at "disappointing" since I first powered it up. It hasn't dropped - yet - to "bad." Given that it takes a quartering in power to drop the range by half, even a 20% drop would be unnoticeable though, so it's entirely possible that this is a problem that I'll face anyway.

The only way to get the proper current is by using the correct resistor value calculated from the data given in the data sheet for your LED. Yes there are a lot to choose from and it can be confusing. First of all the wavelength must match the wavelength of the receiver do you know what that is? Getting the wrong wavelength will reduce the range. Given that is what you are seeing I would suspect that might be your problem.

It hadn't occurred to me that it would work at all if I had the wrong wavelength of LED. When I dismantled the remotes that I analyzed, I did notice that their LEDs' epoxy was very dark - maybe about this color: (selecting at random from parts on Jameco)

The LEDs I'm using now are clear. How does one determine the frequency that an LED is operating on, if they can't look it up?

Then there is the radiance angle, generally the narrower the angle the greater the range at the expense of it being more directional. Then there is the luminance output and finally the working and peak current. Normally the peak current is very much greater than the continuous current, however it is normally quoted on a 10% duty cycle and I suspect you are flashing it at a 50% duty cycle. Do you know what the duty cycle you are using is?

I'm using LEDs that have a fairly narrow viewing angle, and I do need to keep pointing roughly at the model for it to receive. This was a design choice, since the wider viewing angle would seriously impact my range.

During "marks", my duty cycle is 50% - for 12 cycles at 38kHz. I then have pauses ("spaces") that represent anywhere from 40 to 200 cycles or more, so while my duty cycle does hit 50% - it is for very short periods of time. In between transmissions, there are pauses of 30ms.

Would I be better off going with IRs in parallel and a small CLR?

Not sure what a CLR is apart from Capacitor Inductor and Resistor but as you don't use capacitors or inductors when driving an LED it can't be that. However series is fine as long as the current is controlled.

Current Limiting Resistor. =]

How does one determine the frequency that an LED is operating on, if they can't look it up

IR spectrometer.

How does one determine the frequency that an LED is operating on, if they can't look it up?

Yes this is very difficult if not impossible for the amateur without equipment.
You can make spectrometers with a CD and a sensor but it is quite a job.
The colour of the covering is no indication of the IR wavelength.
You could try and find out what the receiver wants.

It hadn't occurred to me that it would work at all if I had the wrong wavelength of LED

Yes it will because if you look at the sensitivity curve of a photo receptor you will see it has a response at other wavelengths.
There are only about 3 different wavelengths, I would get one of each and see which gives you the best range. Then get multiple LEDs of that type.

Grumpy_Mike:

How does one determine the frequency that an LED is operating on, if they can't look it up?

Yes this is very difficult if not impossible for the amateur without equipment.

It occurs to me that I might be able to get a hint from the plastic cover that protects the resistor on the Lego remote. If I power up 3 LEDs of different frequencies and cover them with the plastic, the one that shows the least dimming would indicate the frequency at which the plastic is most transparent. This, of course, assumes that Lego is going to use a cover that interferes with the signal as little as possible. It also assumes that the plastic wouldn't coincidentally be more transparent at the wrong frequency. The former assumption is pretty safe. The latter - not so much.

I think I'll just order a ton of LEDs from Jameco, build a test rig, and see which frequency wins. I'll probably go for some different viewing angles, as well. Remotes do work when you bounce your signal around, and it may be best to count on that.
[/quote]

AWOL:

How does one determine the frequency that an LED is operating on, if they can't look it up

IR spectrometer.

To be pedantic we can't yet measure the frequency(*), only the wavelength (or energy) and then calculate the frequency using the speed of light (or Planck's constant). Either diffraction/interference or optical dispersion can be used to measure wavelength, some simple lab equipment is required.

Another technique is to measure the energy of individual photons via the photo-electric effect - some more specialized lab equipment is needed...

IR photodiodes are sensitive to shorter wavelengths (visible) as well, and are often encapsulated in plastic incorporating an IR-transmissive but visible-light-opaque dye - so they are less sensitive to ambient lighting.

(*) IR photons have a frequency around 300,000 GHz, even faster than intel's latest processor :wink:

Now I am going to be very very nit picky here, but on the grounds I used to be a Physics Proff I feel I am entitled to:-

only the wavelength (or energy)

The energy is in fact the frequency multiplied by planks constant.
Which of course you can calculate from the wavelength.

I used to be a Physics Proff

Do you know Brian Cox, and were you in a band too? :stuck_out_tongue_closed_eyes:

I used to be a Physics Proff

:slight_smile:
I was addressing my remark to someone from the U.S. so I used the words he would understand. What I was is called a Proff in the U.S. but not in the U.K. I was a Senior Lecturer, that's two down from a Proff and two up from a Lecturer (L1).

I don't know Brian, he was at the university three hundred yards down the road from my University, although my wife is friends with him on face book (which means nothing I know).

and were you in a band too?

Well I was in one that had on public appearance only, playing flute in a jamming version of "wild horses". So in both cases not quite in the same league. :wink:

I experimented a bit with different settings and different IR leds to maximize the range. Still not as good as the original lego remote control which easily works over 5m distance...

leds: i tried

  • IR-Emitter 940 nm TSAL 6200 (100mA max)

  • IR-Emitter 940 nm OS-5038F (50mA max)

  • and the leds from this kemo set: S081 Infrared LED Ø 5mm approx. 10 pieces i tried the 940nm (dark) and the 870nm (clear) ones. (both 100mA max)

in the end i found the kemo 840nm best. but they are similar to the tsal.

i used them with arduino uno and a BC337 transistor. i used 3 in series with initially 10ohm resistor. since the leds have uf of about 1.3 v i would end up with around 100mA on 5V.

i used code based on: GitHub - tasrc/PFTransmitter: Arduino library to send LEGO Power Function RC protocol

in order to increase the range i started to play with the duty cylce. the code initially has a 50-50 cycle. i changed that to:

static unsigned int offlen = 12 ; //cycleLength(); initial cycle length is 26

for ( int xx = 0; xx < 6; xx++ )
{
digitalWrite( _pin, HIGH );
// pauseTime( onlen );
delayMicroseconds( 1 );
digitalWrite( _pin, LOW );
pauseTime( offlen );
}

so the time when the leds are actually on is extremly short now. thus i increased the current with a nother 10ohm resitor in parallel to something around 200mA (the LEDS should tollerate short cycles of higher currents).

with this settings i am able to reach around 3m distance if i directly point the 3 leds to the reciever.