Hi everyone,
My team and I are considering purchasing an ultrasonic sensor (or any type of distance sensor I suppose). Currently we have the MaxBotics sensor included in the KOP, but it’s range is relatively limited and it seems very inaccurate. We also have another ultrasonic, but it uses i2c, which is taken up by the color sensor this year. Which distance sensor would you guys recommend buying (preferably from AndyMark or VEX, but we’re open to other companies)?
My recommendation is to think hard about why you need an ultrasonic sensor, then try to find another sensor that will fulfill that task. Ultrasonic sensors are notoriously noisy and unreliable. IMO the best ultrasonic sensor is no ultrasonic sensor.
Our main purpose is for getting the distance to the port and use that information coupled with information from vision to drive towards the port at a specific heading, if that makes sense. What kind of distance sensor would you recommend? Lidar?
I would probably recommend using a camera and vision. With some open-source software you should be able to get decent distance readings that way, probably more accurate, less noisy, and with a longer range than an ultrasonic sensor could give.
We were originally planning to use multiple i2c ultrasonic sensors to allow us to slow down when approaching the end walls at speed. We had multiples running using an Arduino to split the signals, but quickly found many reliability issues with the system including our Arduino no longer powering on the day after having code that worked. Tonight we are going to try using the Vex Ultrasonic sensor https://www.vexrobotics.com/276-2155.html
Let me know how that goes. Also, which one specifically?
We have vision working, but how would I use that to get distance? If I used the size of the target, wouldn’t it vary depending on the angle between the robot and the target?
We’re using these (https://www.amazon.ca/HC-SR04-Ultrasonic-Distance-Arduino-MEGA2560/dp/B01COSN7O6/ref=mp_s_a_1_4?keywords=ultrasonic+sensor&qid=1582048623&sr=8-4) sensors and they work great. You can just connect them to the DIO ports and they work great, you just use the Ultrasonic class in WPILib for the code. See this post (HC-SR04 Ultrasonic Distance Sensor wiring and programming) for how to wire them.
You might try this: https://www.adafruit.com/product/982
It will do PWM output which, this year, the Rio is able to read. (Look up “duty cycle” in the software documentation.)
I2c is like can, you can use multiple devices wired together.
Would we have to buy a splitter for that?
or build one.
There’s a tutorial in the limelight documentation that you can use:
https://docs.limelightvision.io/en/latest/cs_estimating_distance.html
Thank you so much
just solder some wires together
We got the Rockwell ultrasonic on FirstChoice a year or two ago. I really like it. Its bulletproof, stable, led indicators. Data sheet says it needs 15V but it powers just fine off of the 12V. Only issue is that it outputs 0-10V for full scale while the Roborio range is 5V. You need a resistor divider to scale that voltage down for the Roborio.
Andymark has the one with 12 inch range. That’s probably my only complaint. The version with 31" range would be more useful. And its near $125/ea retail. So much more expensive than most ultrasonics but its a battleship.
From Andymark First Choice:
Ultrasonic Proximity Sensor & cable (889D-F4AE-2, 873M-D18AV300-D4)
Source(s): Rockwell Automation
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.