Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Getting two Arduino's talking with infrared.

Status
Not open for further replies.

gonadgranny

Member level 4
Joined
Feb 23, 2011
Messages
68
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,930
Hello all. I would like to be able to turn an led on and off remotely using a pair of Arduino's, an infrared led and receiver. ive manage to capture the codes of my remote controls and get the arduino to do my biddings when it recognises the codes but i get stuck when i try to use an arduino to send ir signals to an arduino. its really simple as all i want to do is turn the remote pin on and off.
ive even tried using the tone library to resonate the ir led pin at 38khz(which is the frequency of my receiver) but to no avail.
if anyone has any suggestions for how to accomplish this i'd be very grateful for the help. Cheers,
Dan.
 

ive manage to capture the codes of my remote controls

I've looked at remote control commands on my oscilloscope. The ones I've seen are a long sequence of 20 or 30 pulses. Some are short, some are long. From what I can see, 38 kHz is an approximate frequency. The question is whether your receiving unit is able to decipher the entire sequence of pulses. If just one of the pulses is misread, then it may reject the command.

Would your project work correctly if you were to send just one pulse? Or a slower pulse? Or a slower series of pulses? It may be necessary for you to use a slower and/or shorter command signal.

Have you done simple tests with the transmitting signal? Did you find out if the receiving unit detects a single pulse from the transmitter?
 

Hi,

You could generate a continous 38 kHz signal using one timer in pwm mode.
You could connect the IR diode between port output (anode) and pwm output (cathode, use a current limiting resistor. And in case the IR diode can't withstand the reverse voltage of VCC, you need an extra Schottky diode)

Now when you output a high on the port, the LED will send out 38 kHz pulses.

You may synchronize port output with pwm output.

Klaus
 

Would your project work correctly if you were to send just one pulse? Or a slower pulse? Or a slower series of pulses?
Hi there. Thanks for the reply. The project would work with a single pulse but im not sure how to do this. i only know how to use the arduino library currently.
You could generate a continous 38 kHz signal using one timer in pwm mode.i
thanks for the reply also., i have been looking into trying to generate a signal using pmw but am not sure how to set it so that the frequency is 38khz. i am only familiar with how to change the duty cycle. the frequncy as far as i know is always the same. do you know how to change the frequency?
thanks.
Dan
 

You need to compare IR LED's to ensure they are same .e.g. rated for 1A max impulse and 100mA continuous and also narrow angle for gain. (<10 deg)

You also need to ensure if you are sending > 100mA pulses that the pulse width is differentiated to reduce the avearge power inthe LED but maintain high peak power.

So compare LED currents in both using the drop resistor or such. Then compare pulse width of 38kHZ carrierand frequency accuracy ~5% , burst widths <5% and repetition rates. ( < 10Hz) to minimize avg LED power.

- - - Updated - - -

If you do this right, you can bounce it off any ceiling and go 10~30m easily as the Rx has AGC.
 

hi, the problem im having here isnt getting the power levels right, ive already got my setup to send and receive codes. the problem is i dont know how to send simple signals which will activate the receiver. ive only been able to use the examples included in the library and these are very complex and aimed at recording and mimicking consumer remote controls which is much more complicated than i need for my purposes.
 

It should be easy to program an Arduino to turn an led on and off (although I have not worked with one myself). Is it a simple matter of making one of its output pins high? It can either turn on the led itself (if the pin can provide sufficient power), or bias an amplifying device which drives the led.

Did you program both Arduino's to display verbose messages, telling everything it is doing?

The pattern of signal it is sending. Whether it detects a signal, or is still in a loop detecting no signal? Etc.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top