Obstacle Detection Project

My son is doing a simple project for school. The basic premise is an “Sensor” detects whether an object is in front of it. If it does detect the object it will turn on a green light. If it does not detect the object it will turn on a red light. I am assuming this should be easy to do with Arduino. My questions are:

  1. Is my assumption correct?
  2. What else besides Arduino will I need (Specifically what kind of sensor)?

Thanks in advance for the help.

  1. Mostly correct, but the level of difficulty varies from individual to individual.

  2. Most such projects I see use a "ping" sensor. It's long name is "ultrasonic range sensor". Here's one, but you'll see them available at many other places as well (just that Fry's is down the street from me.) You'll also need some LEDs, resistors, an Arduino, wires and a breadboard.

Thanks for the quick reply. Thanks for clarifying the sensor type for me. For something "simple" like this will the coding be difficult?

Thanks again for your help

Another possibility is an infrared distance sensor, e.g. https://www.pololu.com/category/79/sharp-distance-sensors

For the digital versions, you don't need an Arduino. The sensor itself will light an LED if an object is within the detection range.

Thanks for the idea jremington. Forgive my ignorance but if you don't use an Arduino what do you use?

ingersollp: Thanks for the idea jremington. Forgive my ignorance but if you don't use an Arduino what do you use?

The sensor output may be able to drive a red and green LED directly (with appropriate current limiting resistors, of course. For example, output to RED LED to resistor to ground, and output to GREEN LED to resistor to VCC. It will only work with a detector module that has an op-amp or logic chip to drive the output.

I think I will stick with going the Arduino route. I think my son will be able to learn a lot from this.

Anyone have any thoughts on the difficulty of programming this? I have some limited experience with Java and Python and this will be my son's first experience.

Learn C/C++ and Arduino by starting with the simple examples: read a switch, blink a light, read the analog channels. This project is no more difficult than any of those.