Main Content

How to make an LDR auto light controller device with a built-in battery charger circuit that could fit in your pocket.

In this project, I will show you how to make an LDR auto light controller device with a built-in battery charger circuit. This device uses an LDR (Light Dependent Resistor) as a variable resistor to control the brightness of LEDs based on the ambient light levels. It also includes a charging circuit for the rechargeable battery and a custom PCB and housing design.

The LDR acts as a variable resistor where the measured resistance value depends on the intensity of light applied to its photoconductive material. The lower the light intensity, the higher the resistor value. This interactive component can be used in several applications, and probably the most commonly used purpose of LDR is auto light controlling.

To create the voltage divider circuit for the LDR, I used an NPN transistor and placed the LDR in series with a 10K Ohm resistor at the base of the transistor. This will decrease the voltage at the base by increasing the light intensity, which turns off the transistor and the LEDs. The 10K Ohm series resistor is used to define the circuit light sensitivity. It’s important to note that the lowest LDR resistance value is 1K Ohm, so I recommend that the series resistor shouldn’t be lower than 10K Ohm.

To power the circuit, I used a 3.7V rechargeable battery, and I included the charging circuit that I made in my previous videos. All I had to do was duplicate the same circuit setup and add a P-MOSFET to help me switch the power from USB to Battery when I disconnect the device from the charging source. This way, the device will automatically switch from being powered by Battery to USB, and I can keep the Battery charging safely.”

Link to article