Go Down

Topic: IR LED needs to transmit 38khz please (Read 2 times) previous topic - next topic

stadham

Hi, I want to have an IR LED transmit a 38 kHz signal to. I want to be able to have the Arduino do it. This will then be detected from by a TSOP 1738 38 kHz IR receiver connected to the Arduino. That detection will then be will be used as a switch. Where once it is triggered another thing happens. This is the same as used on a robot in obstacle avoidance. My object will have the transmitter and receiver side by side and then when an object for example a hand passes in front of it and it detects something is there something else happens.

My question is can the Arduino send a 38 khz signal ot to the LED? I have done it with a Basic Stamp with the  FREQOUT command in pbasic. Anything like that in Arduino?

beckel

You are probably better off using some kind of 555 timer connected to the IR LED circuit to create the 38kHz carrier frequency than trying to generate it with PWM [analogWrite() command]. Connect that timer to a digital pin. When you set the pin high, it will automatically oscillate at the correct frequency. It is a lot more accurate and the Arduino is freed up inside the pulses to do other work. Here is a page on 555 http://www.uoguelph.ca/~antoon/gadgets/555/555.html oscillators. You need to get the right resistor-capacitor combo to achieve 38kHz. This site provides a simple formula. Also, if there is going to be no actual data communication (other than a 'switch') b/w these 2 modules, there are probably easier ways to do what I think you are talking about using just 2 IR LEDS.

stadham

Thanks for the information that page looks like just what I need I will build one tonight.    :)

Thanks for your responce

pha555

I have an 8-pin PIC which provides common frequencies used for IR transmitters.

See http://www.phanderson.com/picaxe/

External Infrared Transmitter, 38, 40 and 56 kHz


Peter H Anderson

stadham

Thanks those look great I will have to order one when I get back to the states this Christmas Too bad I live in China. I may order now and pick it up when I am there.

Also Peter you have a small dongle on the serial cable connected to the Arduino Solderless Development Package. Anyway I can get a schematic of that?

Thanks

Go Up