1
\$\begingroup\$

I'm making a small toy that will use the sensor reading to avoid colliding with a wall. Before buying the sensors I want to confirm that can they detect green, pink, or white colored walls.

\$\endgroup\$
5
  • \$\begingroup\$ IR should "see" all of those equally well. \$\endgroup\$
    – pjc50
    Commented Oct 2, 2014 at 12:42
  • \$\begingroup\$ Do you have a sensor already picked out that we can look at? \$\endgroup\$
    – ACD
    Commented Oct 2, 2014 at 12:45
  • 3
    \$\begingroup\$ I'm tempted to say "big toe" \$\endgroup\$
    – user16324
    Commented Oct 2, 2014 at 12:48
  • 3
    \$\begingroup\$ Depending on your definition of 'colliding' a simple switch from a end of steel-wire (maybe with a microswitch) could do the job. \$\endgroup\$ Commented Oct 2, 2014 at 12:56
  • \$\begingroup\$ why does it have to be a sensor, why cant your little toy just run into the wall? isn't that more cute? A simple contact switch as Wouter has suggested would be fine, cheap, and more reliable \$\endgroup\$
    – KyranF
    Commented Oct 2, 2014 at 13:02

3 Answers 3

2
\$\begingroup\$

Search for HC-SR04 on any shopping site. Their price starts at about 1 GBP. It appears to be the same part as at dx.com.

They will need something to drive the transmit pin, and time the 'echo'. Most people use a microcontroller. The sensor has an input pin to trigger the transmitted signal, and an output pin which it asserts to say when it detected the echo. So the total cost needs to include an MCU.

An alternative is IR. The technique measures the brightness of light reflected from a surface. It needs some calibration, and is usually only good for about 20-30cm. Further, they can be confused or swamped by sun-light, and some types of lighting. So typically they are measured with the IR emitter on, and off, to get a difference. Usually people use a MCU. Search for 'micromouse distance sensor', and you'll find lots of information.

Silicon Labs make Si1102 Proximity Sensor IC. It uses IR. However, is autonomous, and does all of the processing itself. Its sensing distance is programmed with a couple of resistors, and it raises a digital pin when the sensing threshold is crossed. So it doesn't actually need an MCU. It is under 2 GBP from distributers, and also needs an IR emitter (which are under 0.50 GBP).

\$\endgroup\$
1
\$\begingroup\$

An ultrasonic sensor should do the job quite okay. You can buy some already easy-interface'able to uC, just like the one here:

http://www.dx.com/p/navo-ultrasonic-sensor-distance-measuring-module-green-270051

\$\endgroup\$
2
  • \$\begingroup\$ 6USD is not cheap :) \$\endgroup\$ Commented Oct 2, 2014 at 13:25
  • 1
    \$\begingroup\$ Huh, well, maybe, but you get the pcb, soldered pins, all the stuff to prototype right away. :) \$\endgroup\$
    – Mike Spark
    Commented Oct 2, 2014 at 13:35
0
\$\begingroup\$

There is two simple ways, 1.Direct use of ultrasonic sensor should do the job. 2.Configuring basic IR sensor with filters which can be used as Obstacle detector .

\$\endgroup\$

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.