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.


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.


  • 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


  • 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 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


Scenario 2: Unobstructed room, partially outside of range


Scenario 3: Objects in room, all within range



Scenario 4: Same as Scenario 1, but more realistic



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


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.
I was originally planning on taking readings every 15 degrees, so this is not far off.  Now I just need to wait for the parts to arrive.

yeah the search is only dead with that particular search...


Here's the link to 360 distance sensing...


It seems that the search around here it not working! I dunno, I just get a blank page. At anyrate, Frits did this and it worked. When the search is working again I will post a link.

Hey, CtC, would you mind sharing what your search query was? I'm kind of keeping a list of known-to-fail queries to use for testing when I get to debugging the search engine. Thanks.

edit = This one?

I did a search for "Frits stepper"  --without the quotes

Definitely should work.

You only need a very small stepper motor since the sonar had is lightweight. I seem to remember that Electonic Goldmine had some 5 volt steppers that would run directly off a PICAXE without extra drivers. It was pretty cheap too, about $2 US.

I love Electronic Goldmine. I'll go check for the steppers. The only ones I have a waaaaay too big

UPDATE: They are on sale for $1.00 each


Haha, cool idea. Like the little spinny dishes on the heads of cartoon robots ;)