I’m currently having trouble finding a proper range sensor that could give me a reasonably accurate reading with a ~10m range.
The problem that I’m having is that the ultrasonic sensor will probably be interfered by others and itself… Any laser distance sensor (class I) will probably not bounce well off the back wall.
The kinect is great, but it only gives accurate readings within meters…
Pin 3 -
(AN) This pin outputs analog voltage with a scaling factor of
(Vcc/1024) per 2 cm. A supply of 5V yields ~4.9mV/2cm., and 3.3V
yields ~3.2mV/2cm.
So you just connect your +, ground, and signal wire of your pwm accordingly, and plug it into the analog breakout.
It says “about 4.9mV/2cm” So +/- 2cm, maybe a little less accurate than that though.
As far as code goes, it’s just a proportion between your voltage and your distance, hence “4.9mV/2cm”
If java’s your kind of thing, get.Voltage(); (from AnalogChannel class) it will return the voltage of the sensor, use the above proportion to convert that to a distance.
The ultrasonics really aren’t that susceptible to interference - they’re rather immune to it unless someone else has their robot directly pointing their sonar at yours. If that’s the case, it’ll probably only be for half a second max before the interference is completely gone and you can have good readings.
Edit: If you’re really concerned about interference, then consider placing two, or even three, sensors to do the same job spaced across the robot. The multiple sensors will serve as an easy form of error detection in the event that interference is experienced.
Or the multiple sensors will interfere with each other and make the problem worse. If you really want to run several ultrasonic sensors, you’re probably going to want to wire them so they aren’t all pinging simultaneously.
Naturally, you’d like to do this in any case, whether they’re facing the same direction or not. Multiple sensors in close proximity can have interference regardless of direction if you let them fire off willy-nilly.
Could you define, angle? They’ll work in any orientation; Because of the acoustic cone, though, they’ll detect any object, be it the hoop or not, along the path that the sound wave.
For certain models (the ones with the cone around the sensor), the acoustic cone is very narrow, and so it’s effectively a long range line detector. For the ones without the cone, it’s rather useless as-is unless you add your own custom cone to focus the sound wave, because the wide cone will probably hit the bridge or barrier and bounce back first.
Why wouldn’t you want to do this? If you don’t angle them towards the basket, it’s rather likely you’ll end up detecting the wall/bridge unless you choose the version with the cone.
The bridge? Are you gonna shoot from the opposite side of the field?
If you point at the basket you might get a return off the rim or the mount or the wall (with very little movement of the robot). I think it wiser to point it at the wall well under the rim for consistency. And you want a fine cone for this application.
Hello this is Thomas from MaxBotix. If you view our FIRST Support notes on Facebook have a comment on looking for the backboard with the sensor. If you read the text below you will see it may be better to use geometry to find distance of the sensor from the baskets. If you know the height of the baskets and you take the data from the sensor you can use those to find the exact distance from sensor to basket. If you have any questions you want to ask us please post them on our Facebook wall. This will help us to best support you with the competition
“How can we make sure we are sensing the back board and not another object, like another robot?”
First, the sensor will have to be perpendicular to the backboard and on the same plain as the backboard in order for the sensor to detect the backboard. If the sensor is off axis to the board, it will cause the ultrasonic sound to be reflected away from the sensor. A good example of this is to think of it as if you were to shine a flashlight in a mirror, does the light reflect back to you and cause you to illuminate? Or does it illuminate an area off to the side of you? This is the same concept for the ultrasonic sensor. If you put the sensor on an arm, this would likely help to align the sensor with the backboard. Without an arm the sensor will not see the higher backboards as the sound will reflect above the sensor.
If you have any questions you want to ask us please post them on our Facebook wall. This will help us to best support you with the competition.