IR Transmitter

I have a parallax IR Transmitter that works by sending a 38khz signal. How can I generate this signal and send it to my Arduino output pin?


did you try a google search on some keywords like : arduino ir transmiiter

Another approach you can take is to build a 38 khz oscillator using a 555 timer and turn it on and off using an output pin from your Arduino.

I build a transmitter using this circuit:

The Arduino connects to pin 4. The way this circuit is shown the resistor R5 keeps the oscillator on unless pin 4 is pulled low by the Arduino. I did it the other way, connecting R5 to ground so the oscillator is off by default and it transmits whenever I drive pin 4 high.

You need a multimeter which can measure frequency to set the R2 variable resistor until the oscillator runs at 38 khz.

I did do a google search and found a ton of info on IR communication, which I'm not interested in. I do not have a multimeter that measures frequency to create the 55 timer circuit, although I think that is a great idea.

I'm just looking to send a 38khz signal for a duration.

You have a number of options to get the right frequency for the 555 timer (in order of increasing accuracy): - "Twiddle" the variable resistor until something works. - Use your multimeter to measure the correct resistance and use the standard 555 timer calculations to find the approximate frequency (see the above referenced page). - Use the frequency counter library to measure the frequency using D5. - Use the InputCapture pin of the Arduino (D8) to measure the frequency.

I did do a google search and found a ton of info on IR communication, which I’m not interested in.

On the first page of google hits is this thread that has code to create a 38khz signal in arduino:

The google search also yields links to code that uses the Arduino timers to create the signal.