IR beacon detection

Goodnight,

I know this might be a very simple and easy thing to do, but I have some doubts on how to detect an IR beacon signal, the signal will be detected using a TSOP1738, and its composed by an 40Khz square wave modulated at 600Hz, with a 30% duty-cycle, here is an image that makes it easier to be understood:

I know that my TSOP is a 38Khz model, but as far as I know they also detect signals above and bellow their designated frequency of operation, so I hope it will work.

My doubt is how to detect this signal, use pulse-in?
Or interrupts?
Or something else?

pulseIn() should work fine and return a number about 1700 (microseconds) for your waveform. The TSOP1738 will convert the 40kHz (hopefully...as you say it's pretty close to 38 kHz) to a steady logic 0 signal. When the 40 kHz light goes away the TSOP1738 will give a steady logic 1 signal.

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

This is for a micromouse contest, all the other teams use whelled robots, we will try our luck with a Bioloid humanoid, driven by an IGEPv2 board running openCv, so I will ask access to the test track and test the TSOP with pulsein.

Isn't the whole point of micromouse that it has to be fast - very fast :smiley:
I wouldn't have thought you're going to get the speed you need unless it's wheeled.

And is it bad that I read this as IR bacon detection?

Uhmmm bacon.....
Fried please!

We are not in the competition to win, but to showcase what can be done, and to learn a lot.
Our micro-mouse contest is not near as fast as those Japanese ones, and our bots have a max size of 40x40cm, so they are big and slow machines, but yes, our humanoid will never in its lifetime do the 7.5mx7.5m labyrinth in the 4min time limit..

Well next year I will compete with a quadcopter lol

Well next year I will compete with a quadcopter lol

Is that allowed?

I looked into the micromouse competition, it looks really fun - interesting how a number of them use fans to decrease the pressure under the 'mouse' to give it more grip to whizz round :slight_smile: