Go Down

Topic: 38khz IR LED (Read 2 times) previous topic - next topic

JimboZA

No that is just a LED there is no driver and no modulator.

It says it delivers a 38kHz signal..... otherwise wouldn't they just call it an LED? But whatever, that was just the first on Google found for me, so even if it is just an LED, I'm pretty sure there must be some that do the trick.

But that said, if it's easy enough to do it in code as your sample suggests, then that's the way to go.
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

EVP

Thanks Mike/Jimboz. Mike i was thinking might want to control it because i will potentially have 64 IR led's and i was thinking about the power consumption and sensitivity calibration of my sensors (proximity). Getting the right frequency is more important for now though.
Jimboz i like that if it really foes give 38khz i will have a closer look.
Mike that code looks good as well i'll have a look. After posting the  original comment i had a go using a timerone library. After reading a web post on another board about using timerone i set it up like they said (26 micro seconds). Strangely this gives 19.4khz. Whats more odd is when i did get it working with the 555 that was at 19.4khz as well. I'm going to do some more experiments today.
Thanks for the input guys cheers.

rickso234

THe IRremote library is quite useful (although I've yet to use it myself). It can read IR pulse streams from something like an TV remote and can also transmit IR pulses in several of the standard protocols. You pass the pattern to a function and it handles everything else, giving you a modulated signal on a digital pin that you can connect to an IR transmitting LED.

Grumpy_Mike

Quote
Strangely this gives 19.4khz. Whats more odd is when i did get it working with the 555 that was at 19.4khz as well

Yes it will. To get 38KHz you have to go up and down in 26uS, if you just set a period of 26uS then that gives you 19.4KHz.
So that is a high period of 12uS and a low period of the same giving a total period of 26uS or 38KHz.

EVP

Yes i figured out what was happening eventually. Since moved to the code you posted it works great thanks. I have figured out what does what just need to pick through it might as well use this to learn about timers. Cheers.

Go Up