Fecking rangefinders

  • SRF02 can’t run at 400kbps I2C baudrate necessary for reading maximum data from the MPU-9250 IMU.
  • TeraRanger needs a 12V power supply and provides 5V serial or I2C meaning level shifting to interface with the Raspberry Pi serial / I2C pins
  • LEDDAR uses weird and slow modbus protocol over serial meaning the IMU FIFO overflows if I’m sampling it above 500Hz – 1kHz works perfectly without LEDDAR.  Essentially, it’s wasting time I’m going to need for Camera, GPS, and Scanse Sweep processing,
  • Garmin LiDAR-Lite supports the necessary 400kbps I2C baudrate at 3.3V, but requires low level I2C access requiring a 20ms gap between sending the read request, and reading the response data.  Arduino provides this low level access, higher level smbus I2C via Python does not.  There are also comments around suggesting no other I2C activity can take place during that 20ms i.e. can’t access IMU during the 20ms!

All the sensors work, it’s just the API to access the data that’s non-standard in every one of these.  Did nobody on the design teams consider using a standard API for modern interface technology?  FFS!

P.S. Yes, I know there’s a URF that supports 400kbps I2C baudrate at 3.3V, but it has a bloody great potentiometer on the underside meaning it’s nigh on impossible to attach it ground-facing under a quadcopter.

P.P.S.  I know I could use the PX4FLOW; I actually have 3 but only one of these (the original) works; the clones both do not.  And anyway, where’s the fun in that compared to a vertical rangefinder, the Raspberry Pi Camera and the MPU-9250 gyro i.e. the three components that make up the PX4FLOW?

3 thoughts on “Fecking rangefinders

  1. I hate it when devices cannot talk to each other. I also have 3 useless sonars at home due to this.
    Regarding the LIDAR-lite, did you try the PWM mode? With PIGPIO alert functions you should be able to sample the signal and get all the transitions. It looks like it’s 10 microseconds per cm and by default PIGPIO has a resolution of 5 micros. You can lower it to 2micros if you need it but 5 should be enough considering the lidar resolution.

    • I haven’t tried PWM yet but I will if I’m forced. After all, Garmin say I2C is supported, though I got a response from them today passing the buck to their distributors to support their device. Fingers crossed Sparkfun will do a better job than Garmin.

      P.S. You might not like your RC transmitter, but I thought it was pretty cool – still RPi to the core! I agree about the screen brightness, that’s going to be a tough problem to fix.

      • Thanks for the nice words. It was nice in a way I agree, yeah. And simple too – the rpi screen is compact, fast and easy to connect. But almost unusable outside in sunlight.
        I was disappointed that I spent so much time designing it and writing code and testing hardware but I completely forgot to check the brightness outside 🙂
        It’s also annoying that it takes so long to develop custom hardware like this and especially custom software. Honestly I think it’s faster to make hardware than software today.
        Maybe I’ll give rust a chance after all.

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.