I’m getting my bot ready for our RSSC’s contest, the Can-Do Challenge on Feb 14 (https://www.rssc.org/can-do-challenge.html), and need some advice on use of the Ultrasonic sensor use.
I’ve attached two pictures of my bot. I’ve used this sensor before successfully for at least 2ft in contests a long time ago where I mounted it horizontally. However, in this design I thought vertical would be better to detect a can. I tried horizontal first, but it didn’t work any better.
https://www.youtube.com/watch?v=dNbv3ONI3cU&list=PLmb0WjGtyZZS9qjUYhY4bdeh4ZQYx7BYS
Each tile has 12in (30cm) sides
I can reliably get good distance measurements when a can is within 1-2 feet (30-61cm), but I need a 3 feet (91cm) range for the contest.
The sonar seems to be very sensitive to its pitch and if pitched a small angle too low it strangely sticks to reading 23cm, some point on the floor. If it is slightly too high then it misses the can entirely. The further away the target is the smaller the sweet spot angle.
But keeping it exactly level on a moving platform is challenging. I’ve tried adjusting its pitch very slightly but it has not resulted in an improvement. My earlier bot design was a little more stable and maybe kept the sensor more level?
I do have a second ultrasonic sensor and am wondering if I should mount it as well. Both units behave the same when mounted in the position shown.
Thanks,
Jim
Thanks for the advice. After some tests I decided on a rear of robot, centered, and horizontal orientation for the U.S. sensor because I can reliably rotate close to 180 degrees with my odometry based localization and even have an IMU mounted if necessary to use. Even with this the range that the can is visible seems to be maxing out significantly less than 90cm. I’ll try different floors like cement vs. my shiny marble tiles and try the foam tape trick on the lower half of the transmitter.
Jim
From: rssc...@googlegroups.com <rssc...@googlegroups.com> On Behalf Of Bob Huss
Sent: Wednesday, January 21, 2026 3:31 AM
To: John Davis <jfd...@sbcglobal.net>
Cc: RSSC-List <rssc...@googlegroups.com>; hbrob...@googlegroups.com
Subject: Re: [RSSC-List] Need advice on Lego NXT Ultrasonic sensor use.
What I found on NXT was to test the edges of the claw to be wide enough to not be seen by the U.S. sensor. Then I would search only left direction for the edge of the can, on several trial runs. Then I add several milliseconds to center the claw on can. If I remember right, the left part of the sensor is transmit, so I am guessing that the horizontal mounting position might be better if sideways movement is quick.
Good luck.
Bob Huss
On Tue, Jan 20, 2026, 12:00 AM John Davis <jfd...@sbcglobal.net> wrote:
My suggestion is foam-tape off a lower section of the transmitting sensor and aim slightly below the optimum. That way, if the robot tilts upward it may still see the can but the nearby floor will not be illuminated. If it tilts downward, the floor reflection may still be reduced sufficiently while the normal cone still strikes and reflects from the can. I think the lower 'eye' is the transmitter on your robot.
John F. Davis
(310) 961-2196 (cell)
--
You received this message because you are subscribed to the Google Groups "RSSC-List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rssc-list+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rssc-list/011e01dc897a%243400b7f0%249c0227d0%24%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "RSSC-List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rssc-list+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rssc-list/1410067103.1200675.1768885196171%40mail.yahoo.com.
--
You received this message because you are subscribed to the Google Groups "RSSC-List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rssc-list+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rssc-list/CAMEE1iSsWVHXpxQ6PN76Z1rN1Hn%3DoMPvyLiM2Aa%3D7%2BwL%2BiBong%40mail.gmail.com.
On Jan 22, 2026, at 10:26 PM, John Davis <jfd...@sbcglobal.net> wrote:I was playing with an NXT ultrasound with a 40 kHz sensor taped onto it. (I like to see the actual chirp and echoes on a scope.) It occurred to me that driving over a smooth floor is just like driving along a wall; at certain distances from the wall the echo returned (when the side lobe of the chirp hits the wall) can be strong enough and at an angle to be seen as a target closer than the actual object.
One way to eliminate that might be a front-mounted ultrasonic close to the ground; any possible reflection will come from a nearby more perpendicular angle and thus be too close in time to be detected. (For ground further away the transmission angle will be too shallow to reflect back into the receiver.)
On Wednesday, January 21, 2026 at 07:28:50 PM PST, <jimdi...@gmail.com> wrote:
Thanks for the pointers to all.
Here’s a milestone in my progress:
https://youtube.com/shorts/2u_xTZ9i4l8?feature=share
Now I’ll try to extend the range capability and improve the success rate!
Re the comments, I do like to take many measurements while the robot is moving or scanning completely past the detected, in range target in this case to find the minimal distance and optimal angle to the target. Because this is for a constrained contest and arena (https://www.rssc.org/can-do-challenge.html), then I don’t need to engineer it beyond those requirements.
Personally, if I were building a modern robot for this contest, I would not use an Ultrasonic sensor, but instead a ToF infrared sensor module like the VL53L7CX which is available in ready to use boards in the market for a range of prices. I have bought DFRobot’s RP2040 uC based board (https://www.dfrobot.com/product-2999.html) available for under $22
For my YOLO object detection implementation on Big Orange I’ve been using basically the same algorithm Chris describes below for several years, calling it computePersistance(). It works quite well.
Jim
From: Chris Albertson <alberts...@gmail.com>
Sent: Friday, January 23, 2026 10:34 AM
To: John Davis <jfd...@sbcglobal.net>
Cc: Bob Huss <boba...@gmail.com>; Jim DiNunzio <jimdi...@gmail.com>; RSSC-List <rssc...@googlegroups.com>; hbrob...@googlegroups.com
Subject: Re: [RSSC-List] Need advice on Lego NXT Ultrasonic sensor use.
I tried to solve this and some other problems with ultrasound by taking advantage of the fact that the robot is moving.