Notifications
Clear all

Ultrasonic Sensors  

  RSS

starnovice
(@starnovice)
Estimable Member
Joined: 1 year ago
Posts: 168
2020-05-01 4:59 pm  

@ dronebot-workshop and everyone else:

I'm at the point where I would like to add ultrasonic sensors to my DB1.  I am thinking of 2 sensors on each corner so from each corner I can look forward and backward (a total of 8 sensors).  At this point I am only concerned with collecting data. Later I will decide how to react to that data.

Tentatively, I am thinking of using an Arduino Nano to control the sensors.  Because of overlapping sonic waves adjacent sensors cannot be activated simultaneously, but you could do all four sensors that point to the side, for instance (maybe, I haven't tested that they are far enough apart yet). 

The other issue is how is the data communicated to the rest of the robot?  I can't wait for the Mega board to ask me for data because if we are about to crash I need to tell it immediately. Issue an E-Stop to the Mega? But what if we are only getting close and it doesn't really warrant an E-Stop yet?  Also how close is close enough to warrant an E-Stop.  I'm thinking at startup the Mega tells the Ultrasonic system at what distance to issue an E-Stop.

Can the ultrasonic data be used for a first level SLAM system until a Lidar is made available? (in other words, a Lidar with only 4 cardinal points)

I would welcome any thoughts on this to maybe reduce the amount of discovery and rework.  I'm addressing Bill in hopes of getting an update on his current thoughts.

Pat Wicker (Portland, OR, USA)


Quote
Topic Tags
robotBuilder
(@robotbuilder)
Reputable Member
Joined: 1 year ago
Posts: 493
2020-05-01 8:57 pm  
Posted by: @starnovice

Can the ultrasonic data be used for a first level SLAM system until a Lidar is made available? (in other words, a Lidar with only 4 cardinal points)

In fact I am intending to add sonar to my robot base (which I haven't worked on for months) to experiment with using it for mapping.

There are some examples on the internet for using ultrasonic data for a SLAM system.

For me the fun is working it out myself by adding the sensors on the robot and seeing what happens in actuality rather than in theory. Use that real data to figure out algorithms to map obstacles around the robot base and use encoders to measure how far the robot base moves between sonar readings and see how the data changes.

This was the last time I played around with the ultrasonic sensor.

https://forum.dronebotworkshop.com/sensors-modules/object-detection-and-avoidance-using-ultrasonics/#post-3681

 

This post was modified 5 months ago by robotBuilder

ReplyQuote
Spyder
(@spyder)
Prominent Member
Joined: 1 year ago
Posts: 820
2020-05-01 10:07 pm  

I'm about ready to connect the first ultrasonic sensor myself. This first one is in his head, connected directly to the Jetson Nano (due to the proximity of the 2 devices) the other sensors will be connected to the Mega, except for the Lidar, which I'm pretty sure is going to be connected to the Nano as well. There's not going to be any more wires going down thru the neck. I managed to get 11 wires down there, and that's all I have room for cuz of the gears and motor in his neck, so I don't see how I'm going to connect the lidar to the mega the way Bill has it in his video

I just need to solder a few extra connectors to the patch panel in his head first, then I'm going to start actually connecting the things in his head

Maybe I'll even turn it on

That should be fun


ReplyQuote
starnovice
(@starnovice)
Estimable Member
Joined: 1 year ago
Posts: 168
2020-05-01 10:35 pm  

So some of my points were:

1. Do you think I can run 8 sensors off of one nano?

2.  How should I share the data if DB1 is using I2C?

3. Kind of sounds like a good place to introduce ROS client server communications.

Pat Wicker (Portland, OR, USA)


ReplyQuote
robotBuilder
(@robotbuilder)
Reputable Member
Joined: 1 year ago
Posts: 493
2020-05-01 10:51 pm  
Posted by: @starnovice

1. Do you think I can run 8 sensors off of one nano?

Set up a serial interface to all the sensors?

This seems to be about the same problem?

https://forum.arduino.cc/index.php?topic=494594.0

 


ReplyQuote
starnovice
(@starnovice)
Estimable Member
Joined: 1 year ago
Posts: 168
2020-05-01 11:55 pm  

@casey Thanks for the reference, casey.  But boy that sure is an example of people needing to use both a grammar checker and a spelling checker.  Some of those entries are just painful to read. If I can make my way through it the interrupt solution sounds interesting.

Pat Wicker (Portland, OR, USA)


ReplyQuote
Spyder
(@spyder)
Prominent Member
Joined: 1 year ago
Posts: 820
2020-05-02 2:01 pm  

Okay, that didn't work out well at all

I didn't notice that all the pins along the left side of the board are GND, and all the pins on the far right side of the board are VCC

Which means that the only thing I accomplished is shorting out anything I connected to this board

So now I have to desolder a single pin along each edge of the board

Or maybe I'll just whip out the dremel


ReplyQuote