Steve Robbins

Mindstorms Distance Sensor details/limitations

Recommended Posts

Hi,

I'm wondering where to find additional details about the distance sensor provided in Mindstorms 51515.  For example, I've just discovered that while it works well pointed squarely at a wall, as you pivot the sensor past 45 degrees, the distance reading suddenly jumps.  I guess this is because there is no longer enough signal in the return echo.  So then I started wondering if I am aiming towards a small tower (e.g. a 5cm by 5cm base), will I be able to detect it if coming towards its corner?  Would a round structure be better?  How big would it have to be?  I would also guess that there is a cone field of view for these sensors -- so what is the cone angle?  What is the behaviour if there are two objects in view?  

As background: I'm a robotics newbie, just dipping my toe into a Christmas present.  My current interest is mobile robots, so I built a very simple driving base using the wheel design of "Tricky" but with the distance and colour sensors facing forwards.  My goal is to have it drive around and locate targets by their colour.  So I coded a simple "spin around and record all distance/angle pairs" to build an initial list of targets (I'm coding this all in Python).  My floors are mainly medium shag carpet so the movement is not smooth and, as one might expect, this produces a lot of "noise" -- spurious objects that I filter out, but it also misses "obvious" objects too. Hence my questions above.

 

Share this post


Link to post
Share on other sites

It sounds like you understand pretty well how the sensor works. Basically, if you don't have a single, large, flat, perpendicular surface, then you get lots of noise and lost signals as you have seen. Ultrasonic sensors are really for measuring distance, not detecting arbitrary objects.

If you are into hardware hacking, the ultrasonic sensor comes apart and has a pin header to allow connecting other hardware. Maybe you could add better sensor such as a camera or lidar.

Example: https://ceeoinnovations.github.io/projects/Backpacktest.html

 

Share this post


Link to post
Share on other sites
6 hours ago, Tcm0 said:

There are technical specifications for spike prime. It's basically the same as robot inventor (just for schools): https://education.lego.com/en-us/product-resources/spike-prime/downloads/technical-specifications

 

I was not aware of those documents, so thank you!  They are relatively high level, though; I was hoping for a bit more detail.  Examples: entrance angle is specified but says "varies according to distance" -- varies how?; what is "Fast Distance sensing"?  The output resolution is given (1mm) but what is known about the accuracy?  Also, if the resolution is 1 mm, how come I only get integer output in cm?

 

4 hours ago, David Lechner said:

Basically, if you don't have a single, large, flat, perpendicular surface, then you get lots of noise and lost signals as you have seen. Ultrasonic sensors are really for measuring distance, not detecting arbitrary objects.

Fair point.  At the moment, I am just exploring how far I can push the provided hardware.  I have just coded up a routine that spins the robot and takes a measurement as fast as  I can, storing into a list of 360 elements -- one distance measurement (the smallest, if multiple) for each degree of yaw.  Then I segment the array by looking for discontinuities -- say a jump of > 5 cm in adjacent readings (all the objects in the scene are at least 10 cm apart).  Each span of similar readings should be "one object".  What's puzzling is that when I do consecutive runs without moving the robot in between, I may find 5 objects, or 4 or 3 or ...  I was naively hoping that even with noise, at least the number of detections would be robust.  I wonder if the scene complexity is a problem (echos?)?  I was doing the experiments on my dining room floor, with a number of chair and table legs as the objects.  Maybe I'll try a less cluttered area.
 

4 hours ago, David Lechner said:

If you are into hardware hacking, the ultrasonic sensor comes apart and has a pin header to allow connecting other hardware. Maybe you could add better sensor such as a camera or lidar.

Example: https://ceeoinnovations.github.io/projects/Backpacktest.html

I would think lidar -- being a distance measuring device -- would have similar limitations?  Or do you get a distance map instead of a single distance? 

Oh, that  camera addition looks very cool!!  I was wondering how I could get a camera on board - this might be the way to go.  Thank you!!

 

Share this post


Link to post
Share on other sites
On 1/3/2021 at 8:21 PM, Steve Robbins said:

At the moment, I am just exploring how far I can push the provided hardware.

Perhaps you could try logging the data and graph it. A visualization may provide some insight as to what is going on.

On 1/3/2021 at 8:21 PM, Steve Robbins said:

Or do you get a distance map instead of a single distance? 

This is EV3, but you get the idea... https://www.ev3dev.org/projects/2016/08/07/Mapping/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.