IR trasmitter with 38kHz freq and 10% duty cycle with timers

Hi all, this is my first topic. I need to obtain the following: I have to drive an IR barrier with the "classic" 38kHz. I'm easily able to do so using this tutorial:

http://tthheessiiss.wordpress.com/2009/08/05/dirt-cheap-wireless/

From pin 9 and 10 a constant 38kHz is generated, this signal drives a power transistor that drives my IR LEDs. The problem is that the generated waveform is 50% duty cycle and I'm not able to understand how to change the duty cycle to 10% acting on timers parameters. The reason to go to 10% is that my IR LEDs are rated to 60mA with square wave and 120mA with 10% duty cycle. Working at this reduced d.c. allow me to use higher current resulting in higher barrier range.

Apart from above, I have another question: the TSOP1838 IR receiver works only with 50% or also with 10% modulated signal? I ask this because I'm not able to find this information on the data sheet and if the IR receiver does not recognize the 10% duty cycle modulated signal the problem is solved :-)

Thank you very much.

Hi, It almost certainly will not recognise the 10% duty cycle.

What I have done to acheive a similar goal is generate the usual 38Khz 50% duty cycle signal, but then enable/disable this signal at 1Khz with 50% duty cycle so the end result is equivalent to 25% duty cycle.

I am doing this through 555 timers in hardware, its really overkill to use an Arduino for generating such a simple signal if all you are using it for is generating a light barrier - the Arduino is of course completely appropriate for doing something smart on the receiving end.

Here are some links -

http://rcarduino.blogspot.com/2012/03/punk-consoles-and-ir-transmitters-555.html

And the first part of the lap timer build along which uses this signal is probably relevant to you as well -

http://rcarduino.blogspot.com/2012/07/lap-timer-build-along-part-one.html

Duane B

Thank you very much, so I maintain the 50% duty cycle and I will supply the barrier with 60mA. I understand what you suggest, anyway this function si only one part of the project, this is the reason why I intend to use timers to do this, in order to free the Arduino core software to do something else. I'm developing a multi-car RC timing system. When The project will be finished I'm happy to share all the informations and schematics :-)

Thank you again