Maker Pro
Maker Pro

Pulsing an ir led using arduino

cyberteen

Dec 4, 2011
48
Joined
Dec 4, 2011
Messages
48
Hi guys,
I have an ordinary ir emitter and an receiver(just the LEDs with two pins). I managed it to send its signal to a pin on the arduino and am now able to control things like a led glowing when path obstructed. But I have no idea at what freq. the ir is transmitting. But I want a method to control the ir led to produce at an certain kHz. How do I do it using arduino?

Thanks for the help, in advance
 

MrEE

Apr 13, 2012
84
Joined
Apr 13, 2012
Messages
84
you can set up a PWM. See the datasheets on how to do that.
 

cyberteen

Dec 4, 2011
48
Joined
Dec 4, 2011
Messages
48
I basically don't have any data sheets, part nos and other details because i got it from an local electronic spares who just gave the parts alone. I read in several places in Internet, that they Pwm the transmitter at say 38 kHz. They don't clearly specify how to Pwm it at that freq.
 

MrEE

Apr 13, 2012
84
Joined
Apr 13, 2012
Messages
84
You need to be familiar with the AVR microcontrollers and have some basic programming skills at least in AVR assembly. I haven't used the Arduino myself because I design my own boards. I use the latest AVR studio and a common AVR programmer. Also you need to have some basic knowledge of electronics even though you are using a ready board such as the Arduino.
A datasheet for the device you are using is a must if you need to accomplish anything useful. There is a lot of homework you can and should do to start programming AVRs or other controllers. Start by visiting the ATMEL's and the AVRFREAK's websites. Also follow the links given earlier in this thread.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
You need to be familiar with the AVR microcontrollers and have some basic programming skills at least in AVR assembly.

There is zero need for assembly to do this... I suggested Googling the Arduino libraries that make this dead simple, not that it's all that hard anyway with most high level compilers to start with...

A datasheet for the device you are using is a must if you need to accomplish anything useful.
In this case since he/she has already got the IR LED and IR receiver working there is little need for the datasheet, more so just an understanding of how IR remotes themselves work and how to put out the IR signal and read in the received signal based on that protocol...

I'm guessing the IR LED is well just an LED, run it at generic safe levels and you will be fine, the IR receiver just takes the pulses of light and passes them out as digital signal, and since he/she has this working they know what pin is sending out the signal... Almost all these IR sets work identical, a quick Google search will almost certainly reveal plenty of 'generic' information the will work fine...

I'm not downplaying datasheets, it's always best to have them handy, but they are not necessarily needed in many cases... With a basic understanding of the components and some tinkering you can get by just fine for simple applications like this...
 
Last edited:
Top