Search
Close this search box.

Arduino Light Sensor

A Light Sensor is a device that detects light. It generates an output signal that is proportional to the intensity of light. A light sensor measures the radiant energy present in the wide range of frequencies in the light spectrum. Some of the common frequencies are infrared, visible and ultraviolet.

 

A Light Sensor is also called as Photo Sensor or Photo electric Sensor as it converts light energy or photons in to electrical signals.

There are different types of light sensors for different applications. A Photocell or Photo Resistor is the common type of light sensor.

A photo resistor changes its resistance when light is incident on it. Hence, a photo resistor is also called as Light Dependent Resistor or LDR.

When there is no light, the resistance of LDR is very high. When there is light incident on the LDR, its resistance decreases.

There are a wide range of applications of light sensors. The applications include scientific research to everyday residential applications like security systems, burglar alarms garage door openers, solar tracking systems etc.

In this project, a simple light sensor is designed using LDR. The project is built around Arduino. The circuit, components and working are mentioned in the following sections.

Also Check: BH1750 Ambient Light Sensor

Arduino Light Sensor Circuit Diagram

Arduino Light SensorHardware Required

  • Arduino UNO  [Buy Here]
  • Light Dependent Resistor (LDR)
  • 100 KΩ POT
  • Buzzer

Component Description

Light Dependent Resistor (LDR)

An LDR is a type of variable resistor that change its resistance according to intensity of the light incident on it. Generally, when the intensity of light is less i.e. in dark conditions, the resistance of LDR will be in the order of Mega Ohms (MΩ).

As the intensity of the light increases, it resistance decreases and falls down to few Ohms at maximum intensity of light.

Photo Resistors are semiconductor devices with photo sensitive cells. Photo cells are made with different compounds depending on the frequency of the light and application they are used.

Cadmium Sulphide cell based photo resistors are most common in consumer applications as they are inexpensive. Some applications are night lights, alarm systems, solar tracking systems etc.

Lead Sulphide and Indium Antimonide cell based photo resistors are frequently used for low to mid infrared frequencies.

Germanium Copper cell based light dependent resistors are used in far infrared frequency applications and they are used in infrared based astronomy and spectroscopy.

100 KΩ Potentiometer

This is a variable resistor whose resistance can be varied from 0Ω to 100 KΩ.

Arduino UNO

It is the main controlling part of the project. It has both analog and digital pins. It has 6 analog input pins and 14 digital I/O pins.

Circuit Design of Light Sensor

As the photo resistor or LDR is a variable resistor, a voltage divider network must be used to gets the analog equivalent output from it.

A 100 KΩ POT and the LDR form a voltage divider and the output of the voltage divider is given to the analog input A0 of Arduino.

A buzzer is connected to pin 11 of Arduino.

Working of Arduino Light Sensor

Light Sensors are very useful devices in wide range of applications. One of the common application is an automatic night lamp, where a light bulb is automatically turned on as soon as the sun sets down.

Another good application is solar tracker, which tracks the sun and rotates the solar panel accordingly.

All these applications use a simple photo resistor or an LDR as the main sensing device. Hence, in this project, we designed a simple light sensor that indicates when the light is indicated. The working of the project is very simple and is explained below.

All the connections are made as per the circuit diagram. The code for Arduino is written and dumped in the board. When the LDR detects a light over certain intensity, the Arduino will trigger the buzzer. When the intensity of light decreases, the buzzer is turned off.

The 100 KΩ POT used in the voltage divider network can be used to adjust the intensity levels at which the buzzer is triggered.

Code

Applications

  • Light Sensors are used in variety of applications.
  • They can be used in security systems like burglar alarm systems where an alarm is triggered when the light falling on the sensor is interrupted.
  • Another common application of light sensor is night lamp. As long as the sun light falls on the light sensor, the lamp will be switched off. When the sun light starts decreasing and is completely off, the lamp will be turned on automatically.
  • One of the important applications of light sensors is in generation of efficient solar energy. Light sensors are often used in Solar Tracking systems. The solar panel will be rotated according to the movement of the sun and its intensity.

7 Responses

    1. Home appliances work on high AC voltage. So, you need to give them an output in around 200V (not 5V). So, you have to use a 5V relay board (along with Arduino) which can control home appliances. And yes, there is no separate coding for interfacing Bluetooth, you just need to connect RX of bluetooth to TX of Arduino and TX of bluetooth to RX of Arduino (also connect the power pins of bluetooth).

  1. Dear sir(s),
    In prog of Code below;
    line number-2 //int ledPin = 13; // select the pin for the LED
    // are likely to be removed.
    Thanks, Regards
    Ref: Arduino Light Sensor Project

Leave a Reply

Your email address will not be published. Required fields are marked *