# Adjustable brightness for IR remote signals

I'm using and Arduino, an IR Led, and a transistor to for sending RC5 signals (36khz).

For the next step I need to be able to adjust the brightness of the signal, basically changing the range. The value could be set by an analog signal, spi or i2c or anything basic.

I thought about using a digital potentiometer, but they are not taking enough current for the LED - should be up to about 250mA (for a short time). Searched the web but really not sure how to approach this. How do I create a circuit to adjust brightness for IR remote signals?

• Is this just to be a transmitter-only project? Few opamps will supply $250\:\text{mA}$. Most will handle perhaps $25\:\text{mA}$, if lucky. Many handle still less than that. Without knowing a specific opamp, I'd tend to assume $5\:\text{mA}$ or so as a reasonable limit under which to stay. Also, since you can't vary the fact that this is $36\:\text{kHz}$ with specific duty cycle requirements, you will need programmatic control of the current intensity. This is usually done using a generated analog voltage control as input to a current sink/source driver (because it is easier.) – jonk Feb 24 '18 at 20:54
• Which exact "Arduino" is this? – jonk Feb 24 '18 at 21:02
• No, there will also be ir-receivers on the same board. For now its an Leonardo, but its only for prototyping atm. Thanks, I'll have a quick look at those Sink/source drivers ! – Foerster Feb 24 '18 at 21:09
• Could you change the pulse-width ON period (shorter than 14 us) instead of reducing LED ON current? This would be pulse-width-modulation, PWM. – glen_geek Feb 24 '18 at 21:25
• I had a look at a couple of led-driver ICs, which look kind of promising- even thought I'm not exactly sure what they are doing yet. @glen_geek : yes, I could, but then it wouldn be 36 kHz anymore, right ? – Foerster Feb 24 '18 at 22:02

The carrier pulses contain harmonics and the RC5 spec is rated at 25%~33%. Since the receiver has a BPF and AGC, attenuation of the fundamental will have a direct impact on path length. The question asks how to do this by analog methods, but in reality, any method that controls the fundamental Tx amplitude is identical including reducing the the PWM duty cycle(d.c.) of carrier pulses.

The Q of Rx BPF determines the bandwidth f/Q and approx. limitation for smallest d.c. for steady carrier.

Using fourier spectral analysis, I measured duty cycle ratio vs fundamental , f1 below, using a peak pulse at 0dB;

d.c. (~) f1 [dB]
1/2 . . . +2.1 ( Note: f1 pk is greater than squarewave pk)
1/3 . . . +0.9
1/4 . . . -0.9
1/8 . . . -6.4
1/12. . . -9.5
1/20. . .-13.7
1/32. . .-17.4
1/80. . .-26.0

These pulses will be filtered by the Rx BPF and added to the baseline noise to give a SNR and path loss for threshold of errors est. 15~20dB which in turn controls range.

## Conclusion

• Define range reduction, get Friss loss then choose duty cycle(d.c.) of carrier pulses for that loss on f1 from above table.

• no need to add any circuit.

• For anyone interested in my simulation that proves the above works. I chose same Q of 10 as Rx chip at 36KHz and same burst rate with 2.5% duty cycle and 20dB attenuation of a 1V signal, and both gave similar results at output of Rx BPF of 100mV tinyurl.com/y98facdk ... and if data rate is exactly 1/64 of carrier, it is synchronous. and is identical result to an analog attenuator. – Sunnyskyguy EE75 Feb 25 '18 at 1:42
• actually this answers is too sophisticated for me since I have very limited unterstanding of filters, but it sounds pretty convincing and solid! Also for it seems to be the most elegent solution and "for free" I'll try to implement it this way. – Foerster Feb 25 '18 at 19:57
• When you input a 2.5% duty cycle (1/40) pulse at 36Khz at full current, the BPF with a Q of 10 in the Rx chip will ring at 10% of -20dB of the voltage. never mind the Fourier stuff. You decide what attenuation you need from my table. data rate must be synchronous 36kHz/64 – Sunnyskyguy EE75 Feb 25 '18 at 20:14

As mentioned by @glen_geek in the comments, you may be able to achieve the control you are looking for by simply shortening the pulse width driving the IR LED. The shorter the pulse, the less energy going though the LED, the less energy transmitted.

This depends on the receiver to be able to still detect and decode the short pulses, but if it is using an analog filter or an FFT then reducing the width of the flash while maintaining the correct modulation frequency should have the desired effect of reducing perceived received amplitude.

I've used this technique a few times to limit the range of a transmitted IR signal, including here where a 10uS pulse width was found empirically to be wide enough to get the IR signal though a silicone cover but still attenuated enough to limit the range to the 1mm maximum distance we were going for.