Let's Make Robots!

360 Range Finder

I just received my SRF05 and I can't wait to start using it.  While I was thinking about it, it occurred to me that I always see the SRF05 mounted on a servo, which allows maybe a 180 degree field of view for a robot. I wondered if anyone ever mounted a range finding sensor on a motor so a robot could see in every direction. 

I think I may try to build a 360 degree range finder, but I wanted to open this as a topic and get some ideas. Here's what I'm planning. Let me know what you think.

Hardware

My idea is the SRF would mount to a stepper motor with a position switch where the SRF is facing forward (0 degrees). This will allow a signal to be sent to the processor whenever when the 0 degree position is reached. Using a stepper motor means I'll know how many degrees the SRF has turned from the 0 degree position, so I can avoid wrapping wires around and around the motor shaft via programming.

Components

  • Processor: Picaxe 28x1 (that's all I'm familiar with so far)
  • Mini stepper motor (4 control lines, 24 steps per revolution)
  • Position switch (Optical, most likely)
  • Sensor mount

Input/Output

  • 4 output pins on the Picaxe to control the stepper
  • 1 output pin for the sensor (SRF05) output
  • 1 input for the sensor
  • 1 input for the limit switch at the front position

Programming

Programming and working with microcontrollers is pretty new to me, so advice is welcome.  I just received my Picaxe starter kit, so that is the platform I would use.  This SRF should work with other platforms too. My thinking is the microcontroller will control the stepper motor, receive position feedback from the 0 degree contact switch, and of course process the data from the SRF as usual.

On startup, the robot would:

  • rotate the SRF counter-clockwise until it reaches the 0 degree mark
  • rotate the SRF 15 degrees clockwise and take a sensor reading
  • store the result in a matrix
  • loop the last two commands until it has gone 360 degrees

Now our bot knows where it is relative to obstacles in it's vacinity. This data could be used for various navigation tasks.  Here are a few different scenarios a robot equiped with this sensor might encounter. 


Scenario 1: Unobstructed room, all within range

360_Sensor.jpg 


Scenario 2: Unobstructed room, partially outside of range

360_Sensor2.jpg 


Scenario 3: Objects in room, all within range

360_Sensor3.jpg

 


Scenario 4: Same as Scenario 1, but more realistic

360_Sensor4.jpg

 


There are clearly other scenarios, but I wanted to start getting some concepts down for my own thinking, and to get feedback.

Applications

My original ideas was a robot that will try to navigate to the center of a room so it is as far away from obstacles as it can be.  In an empty square room, this would be the  center.  Of couse the max range on the SRF05 will not work for all rooms, but you get the idea.  If the bot is among a bunch of obstacles, and wants to stay away from all of them, it could calculate this point, and then navigate to it.

To stay clear of obstaclee, the robot would:

  • pair each saved sensor reading from the matrix with reading 180 degrees opposite
  • determine which pair of readings are closest together
  • pick a point half way between them as its target position
  • navigate to this point
  • re-check the sensor to determine if it is in the correct position, or if the environment has changed.

Now that I've put some drawings together, I can see the calculations may be more difficult than I thought. In the rectangular room in Scenario 1 above, for example, is unrealistic. The robot will rarely be oriented along the axis of the room, so Scenario 4 is more likely to occur.

I'm still very interested in ideas for a use for a 360 degree SRF.  I'm really interested to know your thoughts on the usefulness of such a component, and feedback on the proposed implementation.

Data Management

With 24 data points, if each one requires a 16 bit word, I may have to come up with a clever way to process the data in parts.  Exactly how depends on what I want to do with the data.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

IR detection for tracking people might be a better application than navigation for the 360 degree range finder. I was thinking this morning that I may start off prototyping with a home-made IR detector, and see how that works with the stepper as a platform. The benefit of a 360 view for tracking people from a stationary position might be a better use for this idea.

Applications could be:

  • Intruder detection
  • Human/animal tracking
  • What else?
I'm thinking the TPA81 IR Thermal Sensor like TheCowGod used in BullyBot might work.
I sort of remember an experiment that used a sonar sensor on a robot, with the robot spinning in place taking readings. The readings were tabulated and plotted, with Secnario1 in use. When the robot was turning towards or facing a corner, some strange readings occurred, producing a greater distance reading than was there. It was estimated that the oblique sonar reflection from the wall was producing a weaker return than the bounce across the corner to return, making that longer reading. Something to watch for.
Updated with conceptual pics
You might consider using slip rings to make your connections so you can have continous rotation. A cheap & easy way to get them is at the 99 cent store in the electronics dept. They are used to keep your telephone handset cords from getting tangled and have 4 conductors, which is enough for most applications.

Great idea!  I saw a post from Fritz with the idea to use a stereo with microphone jack, but that only gets you 3 contacts.  Nice one.

I was originally thinking a home made slip ring.  More of a slide ring really.  Anyway, I decided for now to just keep track in software so I don't go 'round and 'round.  However, I will definitely consider implementing with your idea. 

That's a fantastic idea, I had to DIY some 2 contact slip rings myself just recently because I couldn't find anything suitable to salvage them from. Thanks for the pointer!

This sounds very interesting.

One thing to watch for though is the change your robot's movement will have on the map you produce in memory.  Unless you stop, make a 360° sonar sweep, move, repeat - you'r going to have a memory map that is skewed (think Salvadore Dali's clocks... only in memory :)

Of course, the faster your stepper motor turns, or the slower your robot moves, the less pronounced this will be.

So, knowing what direction you are moving, you could adjust your memory map (matrix) to compensate for the movement of your robot for  each "pixel" (sonar blip).

Decaying the blip over time would make this an even more interesting problem.  Consider driving PAST two boxes, with a gap between them.  For the moment the robot can see down the "alley" between the two boxes, it can get a quick sense of an open space on the other side.  But once it is past the alley it has no view of the other side of the boxes.  Remembering that space, but reducing its confidence in its reading would allow for interesting navigation alogrythms.

Can you tell I'm a software guy?

I don't mean to add complexitities to your design - it has been fun for me to think like this.  It is probably a wise move to keep it simple and disregard a large percentage of this post, especially to start.

And from a software standpoint, this reminds me a lot of the IBM robot/tank programming challenge
http://www.ibm.com/developerworks/java/library/j-robocode/

Best of luck!

Actually, being more of a hardware guy myself, I really appreciate your input.  It's going to take some learing on my part to determine how to use the data in software. 

Time to burn some new circuits in my brain.  ; j

I`m interested to see what you will do with the gathered data because I`m trying to do a similar thing too.

Don`t forget that the stepper you linked can only do 18 degree full steps or 9 degree half steps.