Sunset Lamp
Automatic lights that use LDR technology flicker because of the shift in light intensity that occurs between dawn and dusk. Therefore, compact fluorescent lamps, often known as CFLs, shou…

Know the mission before touching a wire.
Understand what you are making, prepare the right tools, and make the workbench safe.
Project details
Sunset Lamp is a electronics project. Automatic lights that use LDR technology flicker because of the shift in light intensity that occurs between dawn and dusk. Therefore, compact fluorescent lamps, often known as CFLs, shou…
- Source pages
- 159-161
- Named parts
- 7
- Build goal
- Working, tested prototype
Tools you need
- Digital multimeter
- Wire stripper and side cutters
- Soldering iron with a fine tip
- Current-limited bench supply
Use eye protection, good lighting, and a clean insulated surface throughout the build.
Safety precautions
- Disconnect every power source before changing a connection.
- Check component polarity, pinout, and supply voltage twice.
- Use a current limit for the first power-up.
- This project may involve hazardous voltage. Work only with qualified supervision and proper isolation.
Gather, identify, and understand every part.
Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.
What's this?Image, role, pros, cons, handling & specifications
MODULE LEARNING VIEWLDR
A sensor converts a physical condition into an electrical signal the circuit can measure.
What it does hereIt provides project input as an analogue, digital, resistive, frequency, or calibrated signal.
Buy / compare this part ↗Advantages
- Adds real-world awareness
- Can usually be tested independently
- Often supports calibration
Limitations
- Readings can drift
- Placement affects results
- Some sensors need warm-up or calibration
Handling
- Protect the sensing surface
- Observe supply voltage and polarity
- Keep signal leads away from noisy power wiring
Specifications to verify
- Use the exact model, value, package, and rating listed for LDR; similar-looking parts are not always interchangeable.
- Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
What's this?Image, role, pros, cons, handling & specifications

Power supply
A power component supplies, converts, stores, or regulates energy for the project.
What it does hereIt must provide the documented voltage, polarity, isolation, and sufficient current safely.
Buy / compare this part ↗Advantages
- Stable power improves reliability
- Current limiting protects first tests
- Regulation reduces resets and noise
Limitations
- Wrong polarity can cause immediate damage
- Underrated parts overheat
- Mains circuits require qualified supervision
Handling
- Measure output before connection
- Use a fuse or current limit
- Insulate exposed conductors
Specifications to verify
- Use the exact model, value, package, and rating listed for Power supply; similar-looking parts are not always interchangeable.
- Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
What's this?Image, role, pros, cons, handling & specifications
SEMICONDUCTOR LEARNING VIEWNE555
A semiconductor stage performs switching, amplification, regulation, rectification, or logic.
What it does hereIt controls current or signal flow at a defined point in the circuit.
Buy / compare this part ↗Advantages
- Fast and efficient
- Compact
- Can control larger loads from smaller signals
Limitations
- Pin order varies
- Sensitive to overvoltage and reverse polarity
- May need cooling or bias components
Handling
- Verify the datasheet pinout
- Avoid static and soldering heat
- Check notch, stripe, or flat-face orientation
Specifications to verify
- Use the exact model, value, package, and rating listed for NE555; similar-looking parts are not always interchangeable.
- Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
What's this?Image, role, pros, cons, handling & specifications

NEUTRAL
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for NEUTRAL; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications
SEMICONDUCTOR LEARNING VIEWBT136 - specified part
A semiconductor stage performs switching, amplification, regulation, rectification, or logic.
What it does hereIt controls current or signal flow at a defined point in the circuit.
Buy / compare this part ↗Advantages
- Fast and efficient
- Compact
- Can control larger loads from smaller signals
Limitations
- Pin order varies
- Sensitive to overvoltage and reverse polarity
- May need cooling or bias components
Handling
- Verify the datasheet pinout
- Avoid static and soldering heat
- Check notch, stripe, or flat-face orientation
Specifications to verify
- Use the exact model, value, package, and rating listed for BT136 - specified part; similar-looking parts are not always interchangeable.
- Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
What's this?Image, role, pros, cons, handling & specifications

LED1 - indicator LED identified in the circuit
An output component turns an electrical control signal into light, sound, motion, switching, or displayed information.
What it does hereIt presents the circuit result or acts on the physical world.
Buy / compare this part ↗Advantages
- Makes system state visible
- Can be tested separately
- Supports clear troubleshooting
Limitations
- Loads may exceed controller current
- Polarity or driver direction can matter
- Inductive loads create voltage spikes
Handling
- Use the documented driver stage
- Check polarity and load current
- Add flyback protection for inductive loads
Specifications to verify
- Use the exact model, value, package, and rating listed for LED1 - indicator LED identified in the circuit; similar-looking parts are not always interchangeable.
- Confirm voltage, current, polarity, interface, driver requirements, and duty cycle.
What's this?Image, role, pros, cons, handling & specifications
PART LEARNING VIEWVR1 - preset potentiometer identified in the circuit
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for VR1 - preset potentiometer identified in the circuit; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
Connect one verified path at a time.
Explore the named components and standardized signal flow, then use Source Check to verify exact physical pins, values, and topology before applying power.
Trace this circuit.
Sunset Lamp: interactive parts, standardized terminals, responsive anchored wires, student explanations, and the original circuit reference in one shared system.
Trace before wiring
Follow power, ground, inputs, processing, and outputs in that order. Never guess a pin from package shape alone.
Connect with power off
Make short, labelled connections and share a common ground only where the schematic requires it.
Inspect every joint
Check continuity, polarity, adjacent shorts, and loose connections before the first power-up.
Open all source diagrams and build views 1 visuals

Confirm the hardware-only control path.
This project does not include firmware in the source. The circuit itself provides the required behaviour.
How to connect
- Match every controller label to the circuit view and source pin map.
- Join grounds before signal wires when separate low-voltage supplies are used.
- Keep motors, relays, pumps, and other loads on a suitable driver and external supply.
Common mistakes
Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.
Troubleshoot
Disconnect loads, continuity-test one path at a time, then test with a current limit.
Software preparation
No IDE, board package, library, or firmware upload is required for this project.
If you add a programmable controller as an extension, document its pin map separately.
How to upload code
The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.
Assemble, deploy, test, and troubleshoot.
Use the complete source notes in build order, then pass the final checks before calling the project finished.
Build in functional stages
- Power and regulation
- Controller or processing stage
- Inputs and sensors
- Outputs and loads
- Enclosure and strain relief
Power up safely
- Inspect unpowered continuity first
- Apply the lowest safe current limit
- Measure supply rails before signals
- Add one load at a time
- Record expected and actual results
Work from simple to complex
- Confirm power, ground, polarity, and orientation
- Compare each pin with the source
- Test inputs separately from outputs
- Replace only one variable at a time
- Power off before every correction
Follow the documented instructions.
These notes come from this project's source and remain in their original order.
Project overview
Project build noteAutomatic lights that use LDR technology flicker because of the shift in light intensity that occurs between dawn and dusk. Therefore, compact fluorescent lamps, often known as CFLs, should not be used in such circuits since the flickering light could potentially damage the electronic circuits included within the lamps. The sunset lamp circuit that is described in this article has the ability to solve the problem and promptly turn on the lamp when the light intensity drops below a predetermined threshold. Sunset Lamp circuit description The bistable action is provided by a popular timer IC called NE555 (IC1), which is used in this sunset lamp circuit as a Schmitt trigger. In order to achieve the immediate action, the set and reset operations of the comparators contained within the NE555 are utilized. The upper threshold comparator of IC1 trips when Vcc is 2/3 of its full value, whereas the lower trigger comparator trips when Vcc is 1/3 of its full value. The inputs of the threshold comparator and the trigger comparator of the NE555 are coupled together, and they are connected to the voltage divider that is produced by the LDR1
and the VR1 components. The voltage that is measured across LDR1 is influenced by the amount of light that is present. When the sun is shining, LDR1 has a low resistance, which causes the input voltage to the threshold comparator to rise above 2/3Vcc. As a result, the threshold comparators output drops to zero, which in turn resets the flip-flop that is included within IC1. However, the input to the trigger comparator is still greater than 1/3Vcc, which maintains the low state of the output pin 3 of IC1. Because there is not enough current for it to be fired, the triac BT136 that is connected to the output pin 3 of IC1 stays in its quiescent state. As a result, lamp L1 is in the "off" position during the day. Circuit operation When the sun goes down, the resistance of LDR1 goes up, and the voltage at the input of the threshold comparator drops to less than 2/3Vcc. Meanwhile, the voltage at the input of the trigger comparator drops to less than 1/3Vcc. As a direct consequence of this, the outputs of both the threshold and trigger comparators will become high, which will cause the flip-flop to become set. This causes the output pin 3 of IC1 to transition from being low to being high. Triac1 is able to conduct electricity after receiving the required gate current from resistor R2. As a result, it finishes off the power supply to the bulb by way of the Triac1. When IC1 is in a state of high output, LED1 will light up to show this. The power supply for the circuit is drawn directly from the mains through capacitor C4, which connects to the circuit. This capacitor is responsible for supplying the circuit with current. The alternating current (AC) that is supplied by capacitor C4 is rectified by diodes D1 and D2, while capacitor C3 provides the necessary smoothing. Zener diode ZD1 supplies the circuit with 15V DC that has been rectified. When the plug is removed from the circuit, the bleeder resistor R4 discharges the capacitor, releasing the voltage it had held. Construct the circuit on any type of multipurpose printed circuit board and encase it in a plug-in adaptor style box. Establish a connection between the adaptor box's pins and the live and neutral terminals. Make sure the box has holes measuring 5 millimeters for the LDR1 and the LED1. Install the plug for the device in a location where there is
sufficient daylight to prevent the circuit from functioning during the day. During the night, the light from the lamp must not shine upon LDR1. Caution is advised because this circuit has 230V AC running through it, and the majority of its points are at mains fatal potential. Therefore, do not touch any point in the circuit while it is powered, and only use a screwdriver made of plastic or insulation to make adjustments to the preset.
You built Sunset Lamp.
You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.
Browse all 500 projects