|
Sensor Test Findings
Got the sensor last week, played over the weekend, have some initial findings: (I used a VEX controller for everything, but this is similar to what to expect with the FIRST RC)
I connected it to the controller easily - soldered in a male header and made up a custom cable for the analog input. Took +5v and ground from the RC, and fed the analog signal back. The 10 mV/inch scaling is very convenient, since 2.54 volts = 254 inches. In the RC, a count of 512 is 2.50 volts (not 2.54), so I just scaled the reading by 1/2 and used that as the distance in inches. (Yes, a small error is introduced, but not much). Leaving the RX pin open causes it to read continuously, about 20 times a second.
It detects a pencil out to 24 inches, a metal spray can out well past 10 feet, and larger objects out to the maximum 254 inches (over 21 feet). Accuracy is good, with about a 1/4" error at a foot and 3" error at 12 feet (Measured 144 inches, actual was 141 inches). After I left it on about 40 minutes, the accuracy changed a little, now reading 138 inches (actual 141).
The cone of detection is about 30 degrees, didn't find any dead spots or lumps. It detects the nearest object in that cone, but can miss an object that is particularly small. Near the limits of range, the cone gets a bit narrower, to maybe 20 degrees at 21 feet. Soft, poorly reflective objects (like a cloth-covered chair back) are not detected as accurately, but that's a characteristic of ultrasonics.
When the distance to an object changes rapidly, the output takes a moment to catch up the the reading. Shouldn't be a problem at 20 readings per second. I tested this by putting my hand a foot away while the sensor was reading something at 12 feet.
At 20 readings per second, sometimes the values jumped plus or minus one or two counts - remember, this was the analog signal - so I put in a loop to average 5 readings at a time, which resolved that. Generally readings were steady.
Overall, seems perfect for the kind of stuff FIRST is doing. It sure would have helped us in autonomous defense at Palmetto. I think teams would want to mount it on a servo and scan in seven steps to evaluate 180 degrees, and act on the data accordingly.
One really nice feature is that you can use the RX input with a digital output to turn the 'pings' on and off. If interference is likely, only ping when you need to, increasing the chance of hearing your own ping and ignoring others.
Of course, it has serial data (RS-232 format at TTL levels) and pulse width (read with interrupts) outputs, making it very versatile.
Let me know if there are any specific tests you want me to make. meanwhile I need to develop an algorithm to detect and avoid objects autonomously with my squarebot.
Don
__________________
I am N2IRZ - What's your callsign?
|