top of page

Light Intensity Measurement using LDR sensor and Arduino on TinkerCAD

Updated: Mar 25

Light Intensity is usually measured to control the switching on and off of the light in the Home Automation system. LDR sensor is the photoresistor that plays a major role in the Light Intensity Measurement circuit. Arduino is the brain behind smart lightning. LDR sensor full form is Light Dependent Resistor. The final step before deploying the smart lighting system is to fine-tune the Arduino code using the Arduino IDE, adjusting the thresholds for light intensity levels to ensure seamless and precise control over the LED brightness.

Devices and circuits are usually designed and simulated on software before building the circuit itself. This ensures circuit safety and makes it easy to build the circuit without worrying about any hazards from the design. TinkerCad is an online simulation software for electronics circuits. Let us explore how to measure Light Intensity using LDR and Arduino.

Let us see how Arduino empowers us to measure light intensity effectively. Let's explore how this powerful combination of Arduino and LDR sensors opens up exciting possibilities for a brighter and smarter future.

Table Contents:

Hardware Requirements For Arduino based Light Intensity Measurement Circuit

1. Arduino UNO Board.

Develop a stronger concept in Arduino through this article:- Click here to know more.

Arduino UNO
Arduino UNO

#Arduino board is a microcontroller that is used to accept inputs from sensors connected and provide an output action on the desired device connected to it. The sensor inputs can be from light-detecting sensors, motion sensors (Ultrasonic or IR), temperature sensors, etc. The output from this device can be received through other output devices such as LED, Buzzer, Serial monitor, etc.

Arduino Circuit Diagram for LDR Sensor:

An Arduino circuit diagram using an LDR sensor typically involves connecting the LDR to an analog input pin on the Arduino. Here's a basic schematic:

luaCopy code
LDR Terminal 1 ----> Arduino Analog Pin (A0)
LDR Terminal 2 ----> Ground

This setup allows the Arduino to read the analog voltage from the LDR, which changes based on light intensity.

Arduino Circuit diagram
Arduino Circuit diagram

2. Resistors

1.5k Ohm Resistor
1.5k Ohm Resistor

Resistors are passive devices that restrict the flow of current or divide the voltage through the circuit. The input power passes through these resistors and then to the sensors to avoid damage.

3. Breadboard


The breadboard is the basic component of any circuit building process. All components, be it input sensors or output display devices are connected to the power supply, microcontroller using wired connections through a breadboard. The holes in the breadboard are in series. There are various sizes like full-sized, half-sized, and mini breadboard.

4. LED


Light Emitting Diode is a commonly used light source. It is a semiconductor that emits light when current flows through it.

5. Jumper Wires

Jumper Wires
Jumper Wires

These are the main components that are used to establish the connections between different devices of the circuit.

6. LDR (Light-Dependent Resistor)


LDR is a #photoresistor that works on the principle of #photoconductivity. The surface of the LDR is made with a layer of semiconducting material that is responsible for measuring the light intensity. The principle states that when light falls on the surface of the semiconducting material, the electrons receive energy, and movement is caused inside the material.

When those electrons reach the valence band, electron-hole pairs are formed. This in turn reduces the resistance of the material and the corresponding voltage is given as the output of the device.

NOTE: The description of the electrical components is given for reference. We don't need the physical components for this project. The circuit simulation is done in the TinkerCad software.

LDR Circuit:

An LDR circuit is a simple arrangement that utilizes the properties of the Light Dependent Resistor to control various electronic components based on changes in light intensity. One common LDR circuit involves using an LDR and a resistor to create a voltage divider. The voltage at the junction of the LDR and the resistor changes as the light intensity changes, which can then be used to trigger different actions in a circuit.

Applications of LDR:

LDRs find applications in various fields due to their light-sensitive nature. Some common applications include:

  1. Automatic Streetlights: LDRs are used to detect darkness and turn on streetlights automatically when it gets dark.

  2. Camera Exposure Control: In photography, LDRs help control the exposure settings of cameras based on available light.

  3. Security Systems: LDRs can be used to trigger security alarms or lights when someone enters a room or area.

  4. Outdoor Light Control: LDRs are used in garden lights and outdoor lighting systems to turn on lights as dusk sets in.

  5. Solar Panels: LDRs can detect changes in sunlight to optimize the positioning of solar panels for maximum efficiency.

  6. Weather Stations: LDRs can be used to measure sunlight levels in weather stations to understand climate conditions.

Let us see uses of LDR :

LDR Can Be Used:

Light Dependent Resistors (LDRs), also known as photoresistors, offer a versatile solution for a range of applications where light sensing and control are required. Their unique property of changing resistance in response to light intensity makes them valuable components in various scenarios. Here are some ways LDRs can be effectively employed:

1. Automatic Lighting Control:

LDRs can be used to create energy-efficient lighting systems. They sense the ambient light level and automatically adjust the brightness of indoor and outdoor lighting, ensuring that lights are on only when needed.

2. Security Systems:

LDRs play a crucial role in security setups. They can trigger alarms, turn on lights, or activate cameras when sudden changes in light occur, such as when someone enters a restricted area.

3. Photography:

In photography, LDRs contribute to exposure control. They assist in metering light and adjusting camera settings to achieve well-balanced and properly exposed photographs.

4. Energy Harvesting:

LDRs can be used in conjunction with solar panels to track changes in sunlight. This data is utilized to optimize solar panel angles for maximum energy capture in solar energy systems.


LDRs help regulate the lighting conditions in greenhouses. They ensure that plants receive the right amount of light for optimal growth by controlling artificial lighting systems.

6.Automotive Applications:

LDRs can detect ambient light levels and automatically control headlights or dashboard lighting in vehicles, enhancing driving safety.

7.Consumer Electronics:

LDRs find applications in devices like laptops and smartphones, where they can adjust screen brightness based on the surrounding light, providing a comfortable viewing experience.

8. Weather Stations:

In weather monitoring systems, LDRs gauge sunlight levels to assist in understanding climate patterns and trends.

9. Artificial Intelligence:

LDRs can be used as sensory inputs in robotics and AI systems, allowing them to adapt to their environments based on changing light conditions.

10. Home Automation:

LDRs are integral to home automation systems that adjust lighting, heating, and cooling based on natural light levels, enhancing energy efficiency and comfort.

What is LDR Sensor Arduino:

Arduino microcontrollers provide an ideal platform for integrating LDR sensors into projects, allowing for precise light sensing and responsive control. Here's how an LDR sensor can be effectively used with an Arduino:

1. Hardware Setup:

Connect one terminal of the LDR to an analog pin on the Arduino (e.g., A0) and the other terminal to the ground (GND) pin. By creating a voltage divider circuit with a resistor, the varying resistance of the LDR can be converted into an analog voltage reading that the Arduino can process.

2. Reading Light Intensity:

The Arduino's analog-to-digital converter (ADC) reads the voltage across the LDR and converts it into a digital value. The value obtained is proportional to the light intensity falling on the LDR.

3. Threshold-based Control:

By setting threshold values, the Arduino can make decisions based on the light intensity. For example, it can turn on an LED when the ambient light drops below a certain level, or it can trigger actions when the light intensity changes significantly.

4. Serial Communication:

The Arduino can send the obtained light intensity readings to a computer via serial communication. This data can be visualized using software like the Arduino IDE's Serial Monitor or custom applications.

5.Responsive Systems:

When integrated into projects, LDR sensors and Arduino boards can create systems that adapt to changes in light conditions, providing an interactive and intelligent experience.

The combination of LDR sensors and Arduino opens up a world of possibilities, allowing enthusiasts, students, and professionals to create innovative solutions for a variety of applications that rely on light sensing and control.

Let us see LDR sensor working :

LDR Sensor Working:

The working principle of an LDR sensor is based on the fact that the resistance of the semiconductor material within the LDR changes with varying light levels. In bright light, the resistance decreases, allowing more current to flow through the LDR. In low light or darkness, the resistance increases, limiting the current flow. This change in resistance is exploited in circuits to detect and respond to changes in ambient light conditions. When the LDR is exposed to light, the voltage across it changes, which can be used to control other components in a circuit, such as LEDs, relays, or microcontrollers like the Arduino.

By combining LDRs with microcontrollers like the Arduino, you can create responsive and intelligent systems that adapt to changes in light conditions and trigger appropriate actions based on those changes.

Software Requirements For Arduino Based Light Intensity Measurement Circuit

TinkerCAD circuit simulation software.

TinkerCad Logo
TinkerCad Logo

It is an online simulation software used for circuit design. It has all the electrical components required to built circuits and runs them. You can tinker with various Arduino circuits and just like Arduino IDE write the code in TinkerCAD com.

Visit the TinkerCad website.

Creating the light intensity measurement with the help of LDR sensor and Arduino

Circuit Connections and its Working :

Let us now understand the circuit connections.

First, it is necessary to define the ground and power supply line of the breadboard. This is done by connecting the 5V supply pin from the Arduino to one of the lines of the breadboard and the Ground (GND) pin of the Arduino to another line of pins of the breadboard. In the given circuit diagram, the wires in Red are connected to the power supply and those in Green are connected to the Ground.

The LDR has two terminals of which one is directly connected to the Analog pin (A0) of the Arduino and the same PIN is connected to the ground line of the breadboard through the resistor. The second pin of the #LDR is connected to the power supply line of the breadboard.

Next, in this circuit, LED is the output device. So the anode terminal of the LED is connected to the Digital pin (PIN 9) of the Arduino. The cathode terminal of the #LED is connected to the ground line of the breadboard through the resistor.

We are using Multimeter as the output indicator. Hence, the pin used for output, i.e. PIN 9 is connected to the positive (RED) terminal of the Multimeter and the negative (BLACK) terminal of the #multimeter is connected to the ground line of the breadboard.


NOTE: The default code present in the TinkerCad window needs to be removed and the program code needs to be written. Download the document and copy-paste the code in Tinkercad to simulate the circuit.

Watch the below-given Arduino project video for the practical explanation of designing the circuit and to know how the simulation #software works.

Project Video By - Navya Tatiparthi

There are a few more articles on Arduino that you might like to read:-

Simulation software plays a major role in the building of large circuits as they help analyze the working of the circuit before it can be built practically. It helps us create a #virtual design of the circuit we want to build and avoid damages to the circuit if in case we don't know, beforehand about the correct circuit connections.

For more Arduino projects using TinkerCad click here.

Simulation software can help us build more effective and efficient projects as it provides validation for the circuit we will be building using the actual components. #Design your own circuit, run the code in the software, and validate your project.



Follow us:

Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, quizzes and contests.

Check out:

Do check out the below links to know about Internship Opportunities, Training & Courses.

Related Posts

See All


Informative and concise! LearnElectronics India always delivers quality content.


Anushka Gupta
Anushka Gupta
Jul 23, 2023

This blog post is a must-read for anyone interested in electronics and Arduino! Learn Electronics India has done an incredible job providing a detailed guide on Light Intensity Measurement using LDR Sensor and Arduino on TinkerCAD. The explanations are clear, and the accompanying visuals make the learning experience enjoyable. It's evident that the author has a passion for teaching and wants to empower others to delve into electronics. This blog has earned a permanent spot in my bookmarks! Great work.

bottom of page