Ultrasonic Sensor Issue

Hey all, our team uses the ultrasonic sensor that comes with the kit (LV-MaxSonar-EZ1 - Maxbotix) but recently we’ve been experiencing some issues with it. At the beginning of autonomous, our robot moves forward until a certain voltage is passed by the sensor to indicate its close enough to the rims; however, in some of our matches, the sensor gave us an incorrect reading, which made our robot shoot its balls prematurely (its a dumper robot). Would any loud noises such as loud bass music cause the sensor to pass an incorrect value and feed the robot a smaller value than it actually is? Is anyone else experiencing similar problems with this sensor? Thanks.

Also, would adding in a second at the beginning of autonomous for the robot to get the average values at 5 distinct times (say, 0.2 secs into auto, 0.4, 0.6, 0.8, and 1 second) work? In the code, as soon as a value lower than 0.55 is received our sequence structure moves onto the second frame; would taking an average value ensure that one faulty reading wouldn’t mess up autonomous? Much appreciated.

The sensor will get fooled by any balls your compatriots shoot at the baskets. As soon as a ball passes in range, either outgoing or on the rebound, your 'bot will think it’s the wall.

You’d probably benefit from not believing the sensor unless several sequential readings all come back the same.

I agree with Mark: If you can use a whole second’s average distance you are less likely to have a single ‘bad’ reading mess things up.

No, loud music does not affect the sensor - at least not until it’s so loud all the humans have suffered damage…:ahh: