This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Decoding infrared signals with nRF52 Development Kit, is it possible?

Hello, we have made cars that play laser tag against eachother using infrared emitters and receivers. The problem is that the infrared radiation bounces off the surroundings, and the cars end up getting hit by themselves.

The way it is set up now is that the nRF52 DK sends a 38kHz carrier signal for about 32 milliseconds to the infrared emitter.

What I would like to do is have the DK send modulated signals with several differently timed pulses in specific intervals, and that these specific interval pulses are registered in a library. This way the DK can compare the intervalled pulses and ignore its own signal.

But I read that having crucially timed tasks like this would not be possible due to the SoftDevice interrupting the timing. (link text).

Is this correct, and should I start looking for other solutions?

Parents
  • Yes, doing bit-banging while the SoftDevice is running will lead to some problems where the SoftDevice will interfere with the timing. I think you should be able to do this, but of course it depends on what protocol you are using (how the timing is), how often the SoftDevice interrupts your code (advertising interval or connection interval) and how many other processes your application is doing. If you are check if the data received is corrupt (f.ex. with CRC) and can accept to drop packets I believe this is plausible. You should run the IR code in APP_PRIORITY_HIGH interrupt and consider using capture task together with interrupt to catch the timing.

    Which protocol do you intend to use? I remember using this protocol a while back on an AVR chip to receive data from an IR remote. This does not have very strict timing so it should be possible to use together with the SoftDevice.

Reply Children
No Data
Related