Arduino Light Reflective SensorFollow article
A photodiode and a white color LED could be used to build a circuit to sense the line for the line tracking robot car.
Bills of Materials:
OSRAM Opto Semiconductors Photodiode RS stock number:
Nichia LED RS stock number:
RS 10k Ohm resistor RS stock number:
RS 470 Ohm resistor RS stock number:
Arduino Leonardo RS stock number:
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.