Hello to all,
I want to make IR digital communication between two AVR MCUs but I have no idea about the practical restrictions and hurdles.
Here are my questions.
1. Do i need a specialised IR receiver (three pinned packages) or simple IR receivers (those 2-pin black LED types) will do!
2. How much will be the error rate in both above Situations in similar conditions
3.Is a hardware Uart necessary for IR transmission?
here's what I'm assuming
1.I will connect the transmitter IR LED to a normal I/O pin and IR receiver (2-pin LED style) to an ADC
2. at the startup the program will calculate a threshold value using the ADC value from ambient light (will also re callibrate when too much error)
3. A software loop will control the whole logic! (fast speed is not a concern)
4. the loop will transmit one data bit in each iteration of the loop that will keep the LED on/off for a time long enough that the receiver on other unit has sufficient time to react to it and and the receiving MCU can take a proper ADC reading.
5.if ADC (value > threshold) then bit=1 else 0
6.then it will wait to receive the IR signal for the same time while the other replies
so as you can see I am willing to provide enough time for sampling through ADC hence I will get low speed .. and I'm fine with 100bps since my required data is just 2 byte per second..
so given Speed is not a concern will the above setup work?
I want to make IR digital communication between two AVR MCUs but I have no idea about the practical restrictions and hurdles.
Here are my questions.
1. Do i need a specialised IR receiver (three pinned packages) or simple IR receivers (those 2-pin black LED types) will do!
2. How much will be the error rate in both above Situations in similar conditions
3.Is a hardware Uart necessary for IR transmission?
here's what I'm assuming
1.I will connect the transmitter IR LED to a normal I/O pin and IR receiver (2-pin LED style) to an ADC
2. at the startup the program will calculate a threshold value using the ADC value from ambient light (will also re callibrate when too much error)
3. A software loop will control the whole logic! (fast speed is not a concern)
4. the loop will transmit one data bit in each iteration of the loop that will keep the LED on/off for a time long enough that the receiver on other unit has sufficient time to react to it and and the receiving MCU can take a proper ADC reading.
5.if ADC (value > threshold) then bit=1 else 0
6.then it will wait to receive the IR signal for the same time while the other replies
so as you can see I am willing to provide enough time for sampling through ADC hence I will get low speed .. and I'm fine with 100bps since my required data is just 2 byte per second..
so given Speed is not a concern will the above setup work?