Light-Dependent Resistor Circuit

by yoshi70066 in Circuits > Sensors

418 Views, 6 Favorites, 0 Comments

Light-Dependent Resistor Circuit

Screenshot 2025-09-02 at 9.40.11.png

In this project, I decided to make a light-dependent resistor circuit that turns on a lamp in the absence of light and turns off in the presence of light. The input, which is the ambient light which will be processed by the sensors and LDR, and returned as the output through an LED lamp. The real-life application for this circuit would be a street light, which checks light levels to efficiently provide lighting on the street.

Supplies

  1. Breadboard
  2. Perfboard
  3. Potentiometer (250 Kilo-ohm Resistor)
  4. 600 Ohm Resistor
  5. 9V Battery
  6. NPN Transistor
  7. 2V Lamp
  8. LDR/Photoresistor
  9. 1 Kilo-ohm Resistor
  10. Wire

Calculations and Schematics

Screenshot 2025-08-22 at 14.03.41.png

About the Schematics:

  1. Positive power goes to the LED(through the resistor) and the potentiometer.
  2. Current flows through the potentiometer into the LDR.
  3. Current flows through the LDR, resistor to the base of the transistor.
  4. The transistor acts as a switch that allows current from the LED to flow to ground at a certain variable input.
  5. The LDR has high resistance when light is present, so current cannot go to the base of the transistor; therefore, it remains off. Because the current cannot get through the transistor to ground, the bulb remains off.
  6. When there is a lack of light, the LDR has low resistance, directing the current to the base of the transistor. The transistor turns on, the current gets through the collector and emitter, and the bulb turns on.


Necessary Calculations:

  1. Voltage needed to drop: (9v - 2v) = 7v
  2. Current: 11.5mA
  3. 32.6 mA = 0.0326 A
  4. 7v / 0.0326A = 608.7 Ohms
  5. I need a roughly 608-ohm resistor

TinkerCad Simulations

Screenshot 2025-08-22 at 14.10.11.png
Screenshot 2025-08-22 at 14.19.09.png

Try different simulations in Tinkercad to ensure the circuit works before proceeding to the perfboard soldering. To find components, move the right toolbar and search for the necessary parts. To try a simulation, press "start simulation" and move the cursor around to change the input value. To insert wires, click and drag to the place you want to connect. One useful feature is the multimeter tool, which allows you to measure resistance or voltage.

BreadBoard

Screenshot 2025-08-22 at 14.35.13.png

Align the components in the same manner as the TinkerCad simulation. I used a power supply module that connects to my laptop; however, you can use any form of supply to power the circuit. Connect the power supply by attaching the corresponding wire to the row indicated on the breadboard, marked with a blue/red line or a plus/minus sign.

Ensure that the components are aligned horizontally so they don't form a series connection to themselves.

Soldering the Circuit Onto the Perfboard

Screenshot 2025-09-02 at 9.20.54.png

Unlike the breadboard, each socket is not connected to the others, so you need to use wires or solder to connect the components. To make the soldering process easy, preheat the metal part of the component and the socket for around 5 seconds with the soldering iron. After that, use your other hand to apply the solder for roughly 3 seconds for a clean solder.

Here are some safety considerations for soldering:

  1. Always wear safety goggles
  2. Solder in a ventilated area and avoid inhaling the smoke
  3. Keep your area tidy and remove flammable items from the table
  4. Always keep your soldering iron in the stand, and use a wet sponge in case there is extra solder on the iron

Designing the Enclosure

Screenshot 2025-08-24 at 19.22.37.png
Screenshot 2025-08-24 at 19.23.06.png
  1. I chose Fusion 360 to create this enclosure.


  1. The specifications required were a 10cm x 5cm rectangular prism with 3 holes for the potentiometer, LDR, and lamp. For the width and length of the prism, I added 5mm to each dimension to allow for extra space. I then used the modify tool to shrink the inner part of the upper lid, ensuring it latches properly onto the bottom lid.


  1. To create the 3 holes accurately and quickly, I took a photo of the perfboard circuit to use as a reference image. To insert this into Fusion, press "insert", then "canvas". Select the photo from your desktop, and then once loaded onto Fusion, right-click on it and press "calibrate". This ensures that the reference image is scaled correctly relative to the enclosure, and then press the hole tool under the create tab to create the holes.


  1. Once you finish rendering the enclosure, make sure to save the body as a mesh. You can do this by right-clicking on the corresponding tab on the upper left side and pressing the "save as mesh" button. Export the file as an STL, and then 3D print it by using an app that converts STL into G-code.

Assembly/Modifications

Screenshot 2025-09-02 at 9.30.52.png
Screenshot 2025-09-02 at 9.31.03.png
Screenshot 2025-09-02 at 9.31.12.png
Screenshot 2025-09-02 at 9.31.24.png

To improve my enclosure and circuit, I did the following:

  1. I attached a switch between the power supply and the circuit so I can save battery usage whenever not in use.
  2. I cut the circuit with the electronics guillotine to create space for the battery within the enclosure.
  3. I used foam tape to elevate the circuit so that the LDR could detect more light.
  4. I switched the battery holder to the battery clip so that access to the battery would be easier.
  5. I drilled a hole for the switch on the enclosure.

The Final Product

Screenshot 2025-09-02 at 9.43.43.png
Screenshot 2025-09-02 at 9.43.55.png

Downloads