Electronic – arduino – Use 555 for additional 40KHz PWM in Arduino

555arduinoinfraredledoscillator

I need to transmit infra red signals using IR LED from my Arduino device. The IR signals consist of PWM 40 kHz periods and "silence" periods of various length (typical IR remote signals).

I know there is IR remote library that uses internal clock registers, but unfortunately, my device has all PWM pins already used.

I need to power the IR LED with a regular PIN. As far as I know it's not possible to achieve exact 40 kHz on digital output PIN with software only. So I would like to include 555 circuit between Arduino digital output PIN and the IR LED so that the high state of digital PIN caused blinking of the LED at 40 kHz.

I'm not sure how the wiring should look like.

I was thinking of using this schematic:

Schematic

(Source)

And attaching +5V to Arduino output PIN, but I feel this solution is not perfect. Is there any better way to connect 555 to Arduino output pin?

Update:
I used solution described by akellyirl below and it works perfectly. I used R1=1000Ohm, 2000Ohm potentiometer as R2 and C1=C2=10nF. Pulses triggered by arduino pin connected to Reset pin of 555 of length between 400 and 1600 microseconds are properly interpreted by my Technics HiFi.

Best Answer

That schematic is poorly drawn and hard to understand. See here for a good tutorial.

enter image description here

Anyway, you should use Arduino to control the RESET pin (pin4). High enables the Oscillator , Low disables it.

Also, it would be far better not to drive the LEDs directly from the 555.

See this related question for more info on how to do that.