Skip to main content

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.

Schematic diagram:

light-reflective-sensor-1_e540f5563decafd3d95cd8c67e06ef16189feab1.jpg

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:

light-reflective-sensor-2_a47eecd2b04c67b3e0ae0d3b1a08829710da5ba4.jpg

Photodiode is a component which is able to convert light into current which in this circuit, light is emitted 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 output to analyst and identify colour.

After connecting the circuit to the Arduino board, AnalogReadSerial (an example under Basic in Arduino IDE) is programmed 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…
DesignSpark Electrical Logolinkedin