DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Arduino Light Reflective Sensor

A photodiode and a white color LED could be used to build a circuit to sense the line for the line tracking robot car.

 

Schemetic diagram:



Bills of Materials:

OSRAM Opto Semiconductors Photodiode RS stock number: (654-8902)

Nichia LED RS stock number: (713-3996)

RS 10k Ohm resistor RS stock number: (707-8906)

RS 470 Ohm resistor RS stock number: (707-8851)

Arduino Leonardo RS stock number: (761-7324)

 Experimental setup:

Photodiode is a component which is able to convert light into current which in this circuit, light is emmitted by the white colour LED next to the photodiode. So, Arduino board could read the input current and then by making use of Analog to Serial function, output the amount of reflected light. Therefore we can make use of the serial ouput to analyst and identify colour.

After connecting the circuit to the Arduino board, AnalogReadSerial (an example under Basic in Arduino IDE) is programed to the board. Then open the Serial Monitor(under Tool in the IDE) to monitor the serial output value.

As different colour will reflect different amount of light, when the light reflective sensor is put on top of black colour, little or no light will be reflected by being absorbed by the colour, so the reading of the serial output will be closed to 0. When the sensor is put on white paper, the amount of reflected light is much more higher, so the serial output value could be up to around 10.

 

Demo Video:

sunnywty has not written a bio yet…

1 Aug 2014, 7:55