GL5528 Photoresistor (LDR) with 470k/47k Resistor Divider
Discrete Transistor Automatic Night Light
Overview
An ultra-simple discrete transistor-based automatic night light powered by a 9V battery that illuminates a white LED in the dark using an LDR sensor.
System architecture
- POWER_SOURCE → SENSING_LDRPowerSupplies 9V operating power to the LDR voltage divider
- SENSING_LDR → TRANSISTOR_SWITCHGPIOFeeds analog threshold divider voltage into the BC547 base
- POWER_SOURCE → TRANSISTOR_SWITCHPowerSupplies collector power and bias currents
- TRANSISTOR_SWITCH → ILLUMINATION_LEDGPIOSwitches power to the white LED load via 2N2222 stage
Bill of materials
| Part number | Type | Component | Manufacturer | Package | Qty | Datasheet | Match |
|---|---|---|---|---|---|---|---|
| 6LF22XWA/B | POWER | 9V Alkaline Battery Provides primary 9V power supply for the entire night light circuit | Panasonic Battery | Bulk | 1 | Matched | |
2 alternatives consideredAI verified | |||||||
| GL5528 | SENSOR | GL5528 Photoresistor (LDR) with 470k/47k Resistor Divider Detects ambient light level to generate a variable analog threshold voltage | 森霸 | — | 1 | Matched | |
1 alternatives consideredAI verified | |||||||
| N2222 | ACTUATOR | BC547 & 2N2222 Two-Stage Darlington Transistor Switch Amplifies sensing voltage and switches the LED load current using 10k, 1k, and 4.7k base/limit resistors | On Semiconductor | — | 2 | Matched | |
| WP7113VWC | ACTUATOR | 5mm White LED with Fixed 470Ω Resistor Current Limiting Emits illumination when dark-sensing switch activates | Kingbright | — | 1 | Matched | |
Build guide
Procurement & Preparation
- Gather all electronic components including 6LF22XWA/B 9V Alkaline Battery, GL5528 Photoresistor, BC547 and 2N2222 transistors, WP7113VWC 5mm White LED, and required resistors (470kΩ, 47kΩ, 10kΩ, 1kΩ, 4.7kΩ, and 470Ω).
- Prepare the workbench, verify soldering iron temperature settings to 350°C, and lay out general-purpose PCB or perfboard along with hookup wire.
Hardware Assembly & Wiring
- Mount the GL5528 Photoresistor (LDR) and the 470kΩ/47kΩ voltage divider network onto the perfboard, connecting the sensing node to the transistor base network.
- Construct the two-stage Darlington transistor switch using the BC547 and 2N2222 transistors, integrating the 10kΩ, 1kΩ, and 4.7kΩ base and limit resistors.
- Install the WP7113VWC 5mm White LED in series with the fixed 470Ω current-limiting resistor, and connect the drive line to the output of the transistor switch module.
- Wire the 9V Alkaline Battery (6LF22XWA/B) battery snap leads to the main VCC and GND power rails of the assembled circuit.
Firmware Setup
- Verify that no programmable microcontrollers are present, as this circuit operates purely via analog discrete transistor logic.
Testing & Calibration
- Connect the 9V battery and perform a visual check for any smoke, excessive heat, or incorrect connections.
- Cover the GL5528 photoresistor with a finger or opaque object to simulate darkness and verify that the white LED illuminates brightly.
- Expose the photoresistor to ambient room light or flashlight illumination to verify that the transistor switch cuts off and the white LED turns off completely.
Document
Discrete Transistor Automatic Night Light
An ultra-simple discrete transistor-based automatic night light powered by a 9V battery that illuminates a white LED in the dark using an LDR sensor.
Executive Summary
This reference design defines the system architecture, critical component candidates, risk register, and validation path for Automatic Night Light. It is a system-level design deliverable; verify critical claims with manufacturer evidence and prototype testing before production release.
Design Overview
Requirements Coverage
| Requirement | Architecture coverage | Status |
|---|---|---|
| Automatic dark-sensing illumination | POWER_SOURCE, SENSING_LDR, TRANSISTOR_SWITCH, ILLUMINATION_LED | Covered |
| Discrete transistor-based switching circuit | Pending validation | Needs verification |
| Item | Details |
|---|---|
| Product Type | Automatic Night Light |
| Key Functions | Automatic dark-sensing illumination, Discrete transistor-based switching circuit |
| Power Source | 9V Battery |
| Connectivity | |
| Size | compact |
| Environment | indoor |
| Difficulty | Beginner |
| Est. Time | 1-2 hours |
System Architecture
Power Topology: Direct 9V battery connection powering the LDR sensing network and driving the two-stage BJT switch directly to the white LED through fixed current-limiting resistors.
Module List
| Module ID | Type | Name | Function | Voltage |
|---|---|---|---|---|
| POWER_SOURCE | POWER | 9V Alkaline Battery | Provides primary 9V power supply for the entire night light circuit | 9V |
| SENSING_LDR | SENSOR | GL5528 Photoresistor (LDR) with 470k/47k Resistor Divider | Detects ambient light level to generate a variable analog threshold voltage | 9V |
| TRANSISTOR_SWITCH | ACTUATOR | BC547 & 2N2222 Two-Stage Darlington Transistor Switch | Amplifies sensing voltage and switches the LED load current using 10k, 1k, and 4.7k base/limit resistors | 9V |
| ILLUMINATION_LED | ACTUATOR | 5mm White LED with Fixed 470Ω Resistor Current Limiting | Emits illumination when dark-sensing switch activates | 3.2V |
Power Tree and Signal Interfaces
| From | To | Type | Interface / rail | Voltage |
|---|---|---|---|---|
| POWER_SOURCE | SENSING_LDR | power | Power | 9V |
| SENSING_LDR | TRANSISTOR_SWITCH | data | GPIO | 0-9V |
| POWER_SOURCE | TRANSISTOR_SWITCH | power | Power | 9V |
| TRANSISTOR_SWITCH | ILLUMINATION_LED | power | GPIO | 9V |
Design Schemes
Two-Stage Discrete Transistor Dark-Activated Switch ★
Strictly honors the user's explicit component list, employing a BC547 as the high-gain input sensing stage connected to an LDR voltage divider, which subsequently drives a 2N2222 power transistor to switch the white LED on and off from a 9V battery source using specified resistors.
Trade-offs: Lowest possible cost and perfect adherence to user parts list, but suffers from linear transition region leading to partial LED glow during twilight and higher quiescent current draw compared to regulated solutions.
Key IC selection
Two-stage discrete Darlington transistor switch
- Need: Provide high current gain (beta) to switch the LED load sharply based on weak analog voltage from the high-impedance LDR divider.
- Class: General-purpose NPN BJT pair (BC547 and 2N2222)
- Shortlist: BC547 / 2N2222 combination, PN2222 / 2N3904 combination
- Pick: Select high-hFE small-signal NPN transistors in TO-92 packaging readily available in standard component catalogs.
Ambient light sensing front-end
- Need: Variable resistance matching human eye dark response to generate a reliable threshold voltage.
- Class: CdS Photoresistor (GL5528) with fixed resistor divider
- Shortlist: GL5528 (10k-20k dark, 0.5k-1k light), GL5537 series
- Pick: Select GL5528 based on dark/light resistance spread and industry-standard availability for low-cost optoelectronics.
Risk register
| ID | Area | Severity | Detail | Mitigation |
|---|---|---|---|---|
| r1 | power | high | Using a 9V alkaline battery for a continuously biased resistor divider (470k/47k) will cause high quiescent current drain (~17uA through divider plus transistor base currents) even in bright conditions, severely shortening battery life. | Increase the LDR divider resistance values (e.g., scale up by 10x) or replace the passive divider with an active comparator or ultra-low-power IC if battery longevity is a primary product requirement. |
| r2 | thermal | med | A fixed 470-ohm current limiting resistor connected across a dropping 9V supply to a 3V white LED drops ~6V across the resistor, dissipating roughly 76mW of thermal energy and wasting significant battery capacity as heat. | Optimize the series current-limiting resistor value based on the exact forward voltage of the white LED and the nominal end-of-life battery voltage to balance brightness and thermal efficiency. |
Bring-up and Validation Plan
- Power-off inspection and rail resistance checks
- Current-limited first power-up; verify every rail before enabling loads
- Validate interfaces and timing one subsystem at a time
- Run thermal, fault-injection, EMC pre-scan, and endurance tests for the target environment
Key Components
4/4 modules matched to real parts. See the BOM tab for the full component table.
9V Alkaline Battery (6LF22XWA/B)
Candidate 3 has an exact MPN match with the primary MPN (6LF22XWA/B) and correctly identifies 'Panasonic Battery' as the
Build Summary
- Difficulty: Beginner
- Estimated time: 1-2 hours
- Tools required: Soldering iron, Solder wire, Wire strippers, Wire cutters, Multimeter, Tweezers
See the Build tab for the full step-by-step assembly guide.
Evidence and Limitations
- Confirm part parameters, certifications, and compatibility against current manufacturer documents.
- Treat industry compliance without test or certificate evidence as a compliance gap, not an approval.
- See Reference Images for visual artifacts and Build Guide for detailed assembly and bring-up steps.