URF prototype

I put together one of the SRF02 ultrasonic range finders onto my prototyping Pi:

Prototype range finder

Prototype range finder

Knocked together some simple code…

An it all just worked! Ranges detected accurately to large objects, while ignoring little things in the way.

Next step is to install this on Chloe once her new arms turn up.

7 thoughts on “URF prototype

  1. I ordered the same sonar a few days ago, still waiting for it.
    Did you use a logic level converter, or does it work directly from 3.3v?
    Thanks,

    • I risked it and did neither – the SRF02 is powered from the GPIO 5v pin, and the i2c feeds directly to SDA /SCL on the GPIO.

      I realized I was pushing it, depending on how the GPIO input circuitry was done, but it seems to work well.

    • Actually, it wasn’t a complete guess – I read around about i2c – wikipedia as a good start, and there seemed to be no definition of 3.3v vs 5v. Either that was really poor design, or it didn’t matter because of how the inputs were wired meant 5 or 3V. I went for the latter, and it just worked!

    • More than, I think for horizontal. Phoebe is 75cm diagonally or 53cm square or 26cm from center. So I’ll just set her up with a “personal space of 50cm radius, and woh betide anyone who encroaches nearer! If possible sensors will be attached near her core rather than at the tips of her arms.

      For vertical, she needs to stay away from the floor / ceiling by more like 30cm to avoid ground effect.

      So minimum 16cm is perfect.

        • 🙂 I wish! My aim is that she will center herself within any space less than 12 x 12m at a slow drift, but if she detects an object close to the ‘personal’ space, she’ll run away like a coward, or if there is no direction she can run without encroaching her personal space in another direction, she’ll abort the flight.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.