Hi everyone,
I am trying to build a system that takes 2 analog inputs from a dual-axis joystick controller (via Arduino Nano) and sends them via IR communication to another microcontroller(arduino Mega in my case). I am trying to use my personal IR communication protocol because i will need more bits(20 bits per instruction) of data and I think NEC or SONY protocols are just not adaptable for my purposes.
According to the datasheet of the TS38238 it's optimal to set a burst time of at least 10/38khz per period, so i chose Tb(Burst period) = 390 us for each burst.
My protocol is for semplicity composed of:
- START period : 3 ms burst and 1 ms idle
- INSTRUCTION period where 1 = 1 Tb of burst and 3*Tb idles ; 0 = 1 Tb of burst and 1 Tb idle;
- END period of 1 ms idle.
After i arranged all correctly, it comes out that it works properly and receives data for just a few instructions.
In fact after a brief period of exposing the sensor to the IR led, I need to hide the IR sensor again and it start working for another brief period and so on..
Why is that? Why does it stop receiving data every time i put the IR emitter continuously in front of the sensor?
Is there something inside the sensor that doesn't like my communication protocol?
Thank you in advance.
I am trying to build a system that takes 2 analog inputs from a dual-axis joystick controller (via Arduino Nano) and sends them via IR communication to another microcontroller(arduino Mega in my case). I am trying to use my personal IR communication protocol because i will need more bits(20 bits per instruction) of data and I think NEC or SONY protocols are just not adaptable for my purposes.
According to the datasheet of the TS38238 it's optimal to set a burst time of at least 10/38khz per period, so i chose Tb(Burst period) = 390 us for each burst.
My protocol is for semplicity composed of:
- START period : 3 ms burst and 1 ms idle
- INSTRUCTION period where 1 = 1 Tb of burst and 3*Tb idles ; 0 = 1 Tb of burst and 1 Tb idle;
- END period of 1 ms idle.
After i arranged all correctly, it comes out that it works properly and receives data for just a few instructions.
In fact after a brief period of exposing the sensor to the IR led, I need to hide the IR sensor again and it start working for another brief period and so on..
Why is that? Why does it stop receiving data every time i put the IR emitter continuously in front of the sensor?
Is there something inside the sensor that doesn't like my communication protocol?
Thank you in advance.