Shop OBEX P1 Docs P2 Docs Learn Events
Modulated Light Beacons for Orientation in a Room — Parallax Forums

Modulated Light Beacons for Orientation in a Room

Hi perhaps someone has done something similar or has some other comments? - Thanks in advance!

Idea is:

  • A robot is moving inside a room.
  • Goal is to have position and orientation.
  • It has a fototransistor mounted similar to the robots having a ping sensor, so that it can be turned horizontally with a servo motor. Actually the idea is to use the same servo. The fototransistor is sitting in a tube, so that it's angle of vision is limited. - A 1 pixel camera.
  • In the room there are at least 2 light beacons, which each have a light (preferable visible). These lights are modulated as square wave blinking on/off but the two (or more) beacons each have their own frequency, to be able to distinguish them.
  • The signal from the fototransistor is high pass filtered, amplified and fed to a P2 ADC then filtered again either with the Goertzel Smart Pin Mode or with Goertzel Software working on a sampled buffer.

I had done something in this direction using a camera some time ago. It's frame frequency was low and the blinking frequency was also low. Now I am more thinking of something like 10 kHz.

The method seems to be interesting, because a beacon can be build cheaply and the hardware on board of the robot seems also to be very simple, if the P2 can do a lot.

Of course wondering about resolution and possible range.
Cheers Christof

Comments

  • banjobanjo Posts: 476

    While not same as you are planning, at least it might give you some ideas: Earlier this year I used modulated IR for navigation in a straight line, see this discussion (you were also participating): https://forums.parallax.com/discussion/comment/1566360/#Comment_1566360
    I got a lot of help from @JonnyMac so kudos to him.

  • RaymanRayman Posts: 15,886

    Hmm... Maybe one would want to use a camera to localize the beacon? In that case would want to use very low frequency, <<60Hz...

  • @banjo said:
    While not same as you are planning, at least it might give you some ideas: Earlier this year I used modulated IR for navigation in a straight line, see this discussion (you were also participating): https://forums.parallax.com/discussion/comment/1566360/#Comment_1566360
    I got a lot of help from @JonnyMac so kudos to him.

    Thank you! There are indeed some valuable hints in your thread!

  • @Rayman said:
    Hmm... Maybe one would want to use a camera to localize the beacon? In that case would want to use very low frequency, <<60Hz...

    Thanks! Yes, a camera is a possibility. I actually have done some experiments. https://forums.parallax.com/discussion/175897/thoughts-about-robot-navigation-using-blinking-beacons-and-camera-s#latest
    In my opinion P2 is not really matching to cameras. Not enough RAM. Also I had problems controlling the camera when brightness was low. The camera then switched to a very slow frame rate.

    Idea now is to use the onboard possibilities of the microcontroller with minimal external hardware.

    • P2 has an ADC, quite good for AC voltage,
    • a core can be dedicated to analyse the signal.
    • A Goertzel filter for one frequency does need only minimal RAM.
    • I already learned, that P2 can indeed receive a long wave (77kHz) radio signal in all of this other stuff in the aether.
  • Made a funny first measurement. Wanted to know if a LDR D=5mm might work here. LDRs are slow but I don't know how slow.
    So I varied frequency and up to 500Hz it gives reasonable signal.
    Sender is a bright yellow 5mm LED.
    At a distance of 7cm I can see the 500Hz at some 3mV.rms in the FFT of my scope.
    This seems to work better than my selfmade fototransistor which is a BC107 with a metal cap that was sawn off many years ago. :-)

    Perhaps I should try a small solar cell as area seems to help?

Sign In or Register to comment.