Shop OBEX P1 Docs P2 Docs Learn Events
Looking for ultrasonic sensor tips/tricks... — Parallax Forums

Looking for ultrasonic sensor tips/tricks...

I'm helping mentor a nearby high school robotics team for an upcoming, well-known robotics competition. Because many of the field elements consist of clear acrylic panels, we decided to use ultrasonic sensors for distance measurement. At the moment, the design calls for six such sensors: two on either side and one in front and back. The primary use case, I think, will be to help guide the robot through a 4 foot wide passage. The secondary use case will simply be general obstacle avoidance. When using multiple sensors, I know you have to avoid crosstalk, usually by staggering each measurement. However, this begs the question: how do you use these sensors if other robots in the vicinity are also using them?

And, while on the topic, does anyone have any other ultrasonic sensor tips or tricks we might find useful?

Comments

  • As far as interference from other ultrasonic sensors, you could try to keep a rolling average of distance, and maybe also delta distance, and use this data to throw out grossly unexpected measurements, but that will only work up to a certain point.

    My mental picture of this, If correct, with a 4 foot wide acrylic passage, is that this is going to be treacherous. The highly reflective wall panels won't be perfectly flat, neither will your robot likely be perfectly aligned in the passage. Your echoes may never return via a predictable path, or at all. Random echoes will make the jump from side to side an amazing number of times, and the curvature of the panels will cause random focusing and scattering of the signals as well.

    A competition? The first thing I would do is use my ultrasonic sensors as jammers, firing them as often as possible. and then start playing with infared sensors and polarizing sheets... Acrylic is so amazingly reflective at certain polarizations.

    Maybe some combination of polarized infared and ultrasonic with cross-checking?
  • The walls of the passage are flat, and should be relatively perpendicular to the ultrasonic sensors. If we use sensors with some auto-gain control, I'm hoping that the reflections will be kept to a minimum. Unfortunately, we can't try to jam other robots, partly because there will be two other teams that will be in the same alliance with us. The team selection is random, so we don't have any realistic way to coordinate/synchronize our system behaviors.

    At the very least, if the other robots that happen to also be using the ultrasonic sensors are designed to maintain a fixed ping interval, I might be able to shift our pings to occur in between theirs. However, considering how slow the ranging period is, this may not be practical.

    I do agree, though, that we should work from a rolling average (even if just 2-3 samples wide).
  • Regarding interference from other sensors: try to find a sensor that uses an unusual frequency. Ultrasonic sensors have very high Q, so they should not be sensitive to signals that are a little off-frequency. Of course a direct hit from another emitter might cause front-end overloading. Then all bets are off.

    -Phil
  • xanaduxanadu Posts: 3,347
    edited 2016-01-21 21:57
    I've been playing with Ping sensors for the past hour and the results vary a lot. I tried to trick a robot with one Ping sensor on it. I used two more Pings in the same room, one static and one mobile. It was both easy and hard to fool it. I found the only thing I could do is periodically stop the robot and wait for the Ping value to settle, then start moving again. That worked well when the other mobile ping finally flew away. It worked for the static Ping too, but then the bot is stuck.

    Master timing signal for all of the bots aside, timing them apart on a single robot is easy. Setup a filter to get rid of large changes. Most of my interference made a change faster than the bot could travel. Possibly stop the bot and wait for values to settle before moving again if you want to be as accurate as possible. Of course stopping assumes the offending signals eventually go away.

    From what I've seen in 600sq' with three sensors, a big room full will be really hard to deal with. You really wouldn't know until you got there so many come up with a few backup plans. If there are a lot of these bots in a small area it's going to take a lot to get it to work.
  • Is this typical of robotic conventions to not give you a clear space to present?

    Seems kind of odd IMHO. Or maybe that's the challenge, that bots can't interfere?

  • I also think it's a little odd that the competition allows simultaneous operation. Sensor interference is a given in these situations, and is usually reserved for fairly sophisticated (eg DARPA) level events. What is this "well-known robotics competition"?
  • FIRST Robotics Challenge. To get a good idea of what we are up against, watch this:



    In the video, the passage I refer to above is each of the defenses, where the clear acrylic walls on either side of a defense (referred to as "shields") are the passage walls. Mostly, the above conversation revolves around the 15 second autonomous period at the beginning of the match. Fortunately, considering the starting configuration and a couple "dumb" maneuvers we can do, I think the students can do a decent job of breaching at least one defense during that period. Once they switch to teleop mode, the ultrasonic sensors will be employed in a different fashion, which is where I was mostly concerned about interference from other robots.
  • ercoerco Posts: 20,255
    edited 2016-01-22 00:43
    WOW. Seems unbelievably complicated. Certainly a good challenge for high school teams. I'm amazed anyone actually enters these, considering how hard it is to get individuals to compete in robot contests, even with simple goals. At Robothon, Carol Hazlett said no one actually complete the relatively simple course where any type of walker walks up to a wall, does a U-turn and walks straight back. Kind of embarassing.

    Good luck Seairth, I'm sure your team will kick Smile at FIRST!
  • Given the animation, I don't think there will be much chance for heavy direct interference unless two robots are staring each other down. It's likely to occur at some point, though, so it pays to write your control software to measure proximity based on a series of pings. The classic statistical methods are better than taking unilateral action based on a single result; i.e., in X series of results, throw out any that are well outside the average (likewise, they do not influence the average). Such readings are likely spurious, and incorrect. It helps to take readings from more than one sensor of the same type.

    Even with clear plastic panels, I think you'd also want some kind of IR detection. From the video there will be other obstacles, including other robots.

    I haven't read the rules, but in general, it's not allowed for teams to intentionally obstruct or impair sensor readings, but in these, it can pay to bring along an ultrasonic microphone to catch the cheats (IR is easy to see in any camcorder). Otherwise known as a bat detector. Plenty of project plans available for these.
  • You can't do this with a PING, but if you roll your own transmitter to creates a scenario where you have ONE ultrasonic transmitter, transmitting all of the time, and at least two receivers, listening all of the time, you can gain an intuitive knowledge of how object around you affect the sensor readings. Differential detection is key here. Also for a slight variant, the transmitter could send a continuous Serial stream (RS232, whatever)... for the receivers look at the "time of flight" difference of the "data frame" or "data packet" being sent. Again, an intuitive exercise.
  • You actually can do differential detection with the Ping))), but it takes three of them:


    -Phil
  • "You actually can do differential detection with the Ping))), but it takes three of them" - perhaps, but is seems a little bit of a schlep using 3 Pings when you only need half as many RX/TX ultrasonic transducers. Don't know if you can do packet framing with the Ping))) solution. The benefit there would be to discriminate against "opponent interference".
Sign In or Register to comment.