Today we are releasing another article from a long series about sensors, how to interface the sensors with electronic boards, and how to programming the sensors in order to display values generated by these. In this article, we present some of the most used light sensors in robotics as well as interfacing methods and how to program the sensors.
Light sensors come in different shapes and dimensions, they can be rounded, with corners, or even half a sphere. These sensors are simple, cheap, and can be used in a wide range of applications like a wheeled robot that follow a line or change the statements depending on light intensity. Any user can decide how to use the potential of light sensors in new and innovative ways for building wonderful robots, from simple to advanced applications.
In another article we make an overview of most popular light sensors used in robotics applications, and the tutorials from this article are based on this list.
How a light sensor works
Light sensors are also known as “Photoelectric Devices” or “Photo Sensors” since these are designed to convert photons into electrons (electricity). In few words a light sensor has as input light energy (infrared, visible light, or ultraviolet), while the output is an electric signal whose value depends on the amount of light detected by the sensor.
Tutorials and Resources
Below are displayed 9 most used light sensors in robotics and up to 16 tutorials that teach you how to programming and interface the light sensors with Arduino board.
Below you’ll find 16 tutorials that teach you how to interface and programming Arduino board to display the values generated by sensors. Each sensor has attached one or more quality tutorials with explanations and programming lines that can be copied into Arduino memory and start building simple applications based on these programs.
- Arduino Lesson 9. Sensing Light – lesson for learning how to use analog input for measuring the light intensity with the simple photocell sensor. In this project uses a 5mm red LED to generate light, while other components like resistors, shift register, or half-size breadboard are interfaced with the Arduino UNO board;
- Motion and Light Sensors with Arduino (and Without) – example how a simple light sensor can be used together with a motion sensor and the Arduino board to turn on an LED when is darkness or when motion is detected;
- Photocells – from basic information to programming lines, Photocells are a comprehensive tutorial from where users can learn how the light is measured, how to test a photocell sensor, connecting and using a photocell to Arduino Diecimila board;
- Light Sensor using Arduino – simple tutorial how to program the Arduino UNO board in order to change the condition statements depending on light intensity;
- Simple Light Reading With LDR + Arduino – simple example how to interface an LDR (light dependent resistor) / Photo-resistor sensor with Arduino UNO board and measure the voltage on the LDR using the analog read from the Arduino board;
- Arduino-Controlled Night Light – step by step tutorial how to interface and programming the Arduino board that automatically turn on LED’s when the light is turned off;
The sensor has a voltage range between 3 and 30 Volts, while its interface is Grove compatible.
- Grove – Digital Light Sensor – tutorial how to interface and programming the Grove Digital Sensor. Programming code allows the user to display the light intensity detected by the sensor;
- Programming the LilyPad Arduino: sensing (sensors) – tutorial for interfacing the LilyPad light sensor with an Arduino board and display on your computer the response to light changes;
- ProtoSnap – LilyPad Development Board Quickstart Guide – a comprehensive guide for getting into LilyPad electronics. From this guide you can learn how to install Arduino, how to interface the ProtoSnap LilyPad Development Board with a wide range of sensor and build simple applications;
- Proximity Sensing with the VCNL4000 + Arduino – simple application where both main features of the sensors are used. In this tutorial you can learn how VCNL4000 sensor can be interfaced with an Arduino board and write programming lines for proximity and ambient light detection;
- VCNL4000 – Integrated Proximity and Ambient Light Sensor – code example how to use the VCNL4000 with Arduino board and read the values for ambient light and proximity detection;
- Light Sensor – guide how to interface the BH1750 light sensor and display the light detection in Lux measurement units of illumination;
- Sensing Ambient Light – TEMT6000 + Arduino – simple example how to code and interface the TEMT6000 with Arduino board in order to read the output of the sensor;
- High Sensitivity Light Sensor TSL230R + Arduino – simple example how to interface the TSL230R sensor with an Arduino board and read the frequency from the sensor. A higher value of frequency means brighter light;
Color Light Sensor BoardA small light sensor designed for applications where is required to detect the differences between different visible colors.
- Sensing color with the ADJD-S311 + Arduino – tutorial how to interface the ADJD-S311 sensor with Arduino UNO board and programming lines for calibration and read the output of the sensor;
- ColorPal Arduino Demo – tutorial for programming and interfacing the sensor with an Arduino board. The code available in the article display serial RGB data based on sensor detection;