Shop OBEX P1 Docs P2 Docs Learn Events
Unstable distane measurement with PING))) — Parallax Forums

Unstable distane measurement with PING)))

I discovered some weird operation with the PING))) sensor the other night. I am building an autonomous quad rotor for a robotics competition, and I am using the PING))) for altitude hold, and a Pimoroni Propeller Hat mounted and powered separate from a Raspberry Pi. Right now for testing I have the PING))) sensor mounted on the front of foam core poster board. The PING))) sensor is pointed straight down. When I hold the Quad with the sensor about 25cm above the competition board which is made of 3/4" plywood the distance reading jumps between 1cm and 25cm. Trying to replicate the results I tried two PING))) sensors both mounted to the foam board and not mounted. To eliminate variables the foam board and PING))) were removed from the quad while trying to replicate the results. When mounted to the foam board both sensor's distance reading would jump back and forth between 1 and 25cm, but would be stable and display 25cm when they were not mounted. To make things more confusing if I put my hand under the sensor when it was mounted to the foam board it would work fine. I came up with the theory that the foam board might be reflecting the the sound back to the sensor, so I came up with another test. To test my theory I held the PING))) sensor vertically above the board and held a small piece of 1/8" plywood behind the PING))) about an inch. I varied the angle of the small plywood and noticed that at angles close to parallel the distance would jump between 1 and 25cm but as I increased the angle from parallel the distance became more stable. That test appears to support my theory. I was wondering has anybody seen similar operation and do you have any suggestions?

Sincerely,

Jason

Comments

  • If you're activating the Ping))) right after each received echo, you might be receiving doubly-bounced echoes from the bottom of your quad rotor. Always be sure to space your activation pulses by tens of milliseconds for the secondary echoes to die out.

    -Phil
  • Thank you Phil, I added a 10ms delay, and that has fixed the problem.

    Thank you,

    Jason
  • Welcome to the forums!

    Interesting project. Would you like to share your code and hardware layout?

    It may help others down the road.

  • Do I understand correctly the the solution is to have the time between measurements greater than the time to travel the maximum range of the sensor?

    So for ping, the range being 4 meters, the interval time should be greater that 0.12 seconds?

  • It doesn't have to be that long. Multiply-bounced echoes decay much more quickly than single echoes, so the critical time period is in the early milliseconds after the Ping))) is stimulated.

    -Phil
  • If you're using more than one Ping, you have to watch out for echos from the other sensors as well.
    I've been surprised how often I've seen multiple Pings triggered at the same time in projects. IMO, triggering multiple ultrasound sensors at once is an easy way to get erroneous readings.

    I'll throw in one more possible ultrasound problem for free. I attempted to use an ultrasound sensor with a small quadcopter and the motors of the small quadcopter produced a lot of ultrasonic noise. The sensor worked great with the motors off but as soon as they were turned on I the distance measurements were way off.

    I've often wondered if there are situations with a larger quadcopter where ultrasonic noise becomes an issue.

    BTW, welcome to the forum Jason. I agree with Jim (aka Publison) this sounds like an interesting project. It would be great to hear more details.
  • Thanks everybody for the welcomes. Publison and Duane I am currently in Grad school and classes end in two weeks; I am planning on releasing most if not all info after exams. Until that point you can visit my website that has a little bit info on the project: https://doylerobotics.wordpress.com/

    Duane thank you for the heads up because I have not had a chance to run the motors and Ping at the same time, so I'll keep an eye out for weird values.

    Jason
Sign In or Register to comment.