2
\$\begingroup\$

I have a PIC16F917 microcontroller that is used to operate a robot. I would like to add a sensor to it that will allow me to detect obstacles. How can I determine what sensor I should be using for this? Are there any special protocols I should be looking for to work with my PIC?

\$\endgroup\$
8
  • 2
    \$\begingroup\$ kate, goddammit, can't you see how ugly this 271(!) character link looks? Hide it behind a descriptive text, like hyperlinks are meant to be. (I've done it for you) \$\endgroup\$
    – stevenvh
    Commented Apr 9, 2012 at 15:38
  • 1
    \$\begingroup\$ @stevenvh It seems more of an electronics question, though: microcontroller, C, sensors etc. \$\endgroup\$
    – m.Alin
    Commented Apr 9, 2012 at 15:43
  • 1
    \$\begingroup\$ @stevenvh, When/why did electronics SE ditch robotics? Got a link to that discussion thread? \$\endgroup\$ Commented Apr 9, 2012 at 16:47
  • 2
    \$\begingroup\$ @Kris - Not the official announcement, but discussed here. The old name was "Electronics and robotics", but it was decided that robotics needed its own site, currently still in Area51 if I'm not mistaken. You may find more discussions about it in meta. \$\endgroup\$
    – stevenvh
    Commented Apr 9, 2012 at 16:59
  • 2
    \$\begingroup\$ Another meta post to reference. Sensors are still on-topic here though as far as I know. The part that is not is more of the mechanical and theory side of robotics. However, this question is very broad. It would be like asking "What is the best car, where should I park, and what color should I paint the garage?" We need a specific design question. So start with focusing on the sensor, what research have you done? What parts of picking a sensor are you struggling with? \$\endgroup\$
    – Kellenjb
    Commented Apr 9, 2012 at 18:01

1 Answer 1

3
\$\begingroup\$

There are so many sensors which can be used to detect objects in front of your vehicle.

Ultrasonic sensors:

These work as you might expect. One transducer sends out a 'blip' that's too high pitched for a human to hear, and measures how long it takes for the sound to reflect back from surfaces. These aren't perfect, however, and rely on there being a good reflecting surface. You may find that they just don't detect long-haired dogs, table legs, or hard flat surfaces at an angle.

Ultrasonic sensor

Sharp optical distance sensor:

These work by shining out a beam of infrared light, and basically looking at the spot it makes on a surface with a tiny 1D camera inside. The output is an analogue voltage which can be directly connected to one of your PIC's analogue input pins.

Sharp optical distance sensors

Whiskers:

A really simple way to detect objects is to make some whiskers. Think of these simply as switches with a very long lever attached to them. You can either buy some cheap microswitches and attach sticks to them, or make your own using metal wire. enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ thanks for all the information...I've decided to use a Sharp optical distance sensor!! \$\endgroup\$
    – kate
    Commented Apr 10, 2012 at 6:35
  • \$\begingroup\$ Good choice. But remember, they only have a thin beam, so they can easily miss thin or small objects. \$\endgroup\$ Commented Apr 10, 2012 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.