I'm new to Arduino.
I have a project to build transmitter and receiver pair with IR Led and IR silicon PIN Photo-diode and I have all the parts for it.
I Need to build a Smart Beam Break barrier i want to send a random 8 bit word, modulated on a 5-20Khz frequency to IR led.
In the receiver side a Silicon PIN Photo-diode.
1st thing is: I dont know how to send a random 8 bit word on a modulated frequency.
I wish to start with a simple 5 to 20 Khz modulated fixed 8 bit word to be send every 500ms and analyzed from the photo-diode connected to Arduino input.
I want to be able to change the frequency to study the frequency response from it.
I want to analyze the Time pass from send.
and to analyze the Receiving signal level.
2nd thing is: All IR apps ON Arduino Forums I found where using the 38Khz module detector, I cant use it with the need of variable frequency, and I have all the parts for making it.
Does somebody have an idea of an Arduino sketch for doing it.
I will appreciate any idea or a referred link.
look at interfacing a tv remote to arduino that will give you a good idea on how to proceed
...except that TV remotes typically use 38 - 40kHz modulation.
5-20kHz is a pretty easy proposition to encode, but decode would be tricky, unless you just decide on a single frequency.
Maybe use a common PLL chip like a 567 (?) to help you.
First not to expose to other 38 Khz around (security)
And later to use other kinds of light sensors but the IR one.
if the high 10 Khz is a problem, i can start with less then that, let say 1-5 Khz .
will it be posible to play with this code ??
I can imagine it would be quite hard, especially if there are other IR transmissions going on.
Rejection of these tones without hardware-assist makes to fairly sophisticated software.
Remember the software engineer's mantra
Fast. Cheap. Reliable.
I know i can skip my 555 20 Khz hardware and make it with Arduino later.
And sure i have to add hardware to the receiver.
A bandpass and a detector amplifier like the MC3373 i have in stock.
If the Arduinu is able to transmit data to other Arduino on IR connection.
Sure it can do that !
That way of connection is a simple packets of words send over IR.
So it can do that!
So, If I want to send a simple fixed 8 bit word (like any remote control do)
On let say 500 Hz carrier ? sure the Arduino can handle this !
Lets make it simple and skip the carrier first !
The sketch should first just choose, store and send an 8 to 16 bit random word.
Or make it simpler, A fixed chosen word for a start =”1100101010” or what ever.
Include start and end bits, delivered every 500 ms with no frequency carrier.
Then expect the same signal at the AT input pin.
Analyzed it by signal level and duration of receiving -.
By checking 3 parameters, duration,level and a valid word .
after comparing the received word and signal with the stored 8 to 16 bit random (or fixed) word and a fixed level trigger and duration I'll choose by trial, And flag a successful reading.
If it notice a change in parameters for few low level readings it will flag this out.
It should done just by comparing. i'm not sure, or maybe by sampling ADC, what do you think ?
After that we will deal with the frequency carrier and other things.
Should be simple .
Does any one can help me with this sketch ?
I will appreciate any help.