Night Light Saver

Not rated 22,375

Night Light Saver
Night Light Saver

A Microchip PIC12C508 8-pin CMOS microcontroller controls a night light, turning it on and off at preset times every day. It is designed to save energy, produce no electromagnetic interference (EMI), and operate without batteries, featuring a built-in lamp fixture and peak shaving capabilities. The SAVER V3.2 is the latest design utilizing the PIC12C508 microcontroller along with a small triac, MAC97A6. The design also demonstrates the use of the PCW PIC C Compiler. The schematic for the SAVER V3.2 is illustrated in Figure 1. A transformerless power supply is implemented, using a 0.22µF capacitor to limit current, providing approximately 10mA. Diodes rectify the AC current to DC, which charges a filtering capacitor of 100µF. A 5.1V zener diode supplies around 5V to the PIC12C508. The microcontroller operates with low power using a 32kHz crystal oscillator. General Purpose pin 2 (GP2) connects to a momentary button for setting the time to 8:00. General Purpose pin 1 (GP1) drives a small dot LED that blinks every 5 seconds during normal operation. General Purpose pin 0 (GP0) directly drives the small triac MAC97A6. The Saver.hex file is suitable for programming the PIC12C508 chip. Pressing the S1 button once sets the time to 8:00, with the light programmed to turn on at 19:00 and off at 22:00 every day. The circuit can operate even with incorrect connections of live (L) and neutral (N) wires; however, proper connections are recommended. After installation, turning on the main switch causes the functioning LED to blink every second. Pressing S1 once turns on the lamp for one minute, indicating the current time is set to 8:00. Each time S1 is pressed, the lamp will turn on for just one minute. The following day, the lamp will automatically turn on and off at the preset times, with the functioning LED blinking at a low rate to indicate normal operation. The Saver is not designed for energy-saving lamps, which typically use internal high-frequency inverters, although it has been tested with one from National with positive results. The initial design, SAVER V5.0, did not include a backup supply for line voltage failures. A modification can be made to include a backup circuit with additional signal diodes (1N914) and a supercapacitor (0.1F) for a couple of hours of backup time, or a battery for up to a year. GP0 requires an external PNP transistor to drive the triac with sink current to prevent discharging from the backup supply. Nighttime varies with seasons, affecting the on-time for the light. To change the on-time, simply press S1 to set the time to 8:00 or adjust it accordingly.

The SAVER V3.2 circuit is an efficient solution for automating lighting control while conserving energy. The choice of the PIC12C508 microcontroller allows for a compact and low-power design, suitable for various applications where timed lighting is beneficial. The implementation of a transformerless power supply simplifies the circuit, reducing the need for bulky components while maintaining functionality. The use of a triac for controlling the lamp provides reliable switching capabilities, and the integration of a zener diode ensures a stable voltage supply to the microcontroller, enhancing the overall performance and reliability of the device.

The design's ability to operate with incorrect wiring of live and neutral connections demonstrates a thoughtful consideration for user errors, although it emphasizes the importance of proper installation for safety and optimal performance. The programmable nature of the microcontroller allows for flexibility in setting the operating times, catering to different user preferences and seasonal variations. The inclusion of a momentary button for time setting offers a user-friendly interface, making it easy to adjust settings without complicated procedures.

Furthermore, the potential for adding a backup power supply extends the functionality of the device, making it more versatile for various environments where power outages may occur. This feature, combined with the low power consumption of the PIC12C508, makes the SAVER V3.2 an excellent choice for energy-conscious consumers looking to automate their lighting systems effectively. Overall, the SAVER V3.2 represents a well-designed electronic solution that balances functionality, efficiency, and user convenience.A Microchip PIC12C508 8-pin CMOS Microcontroller turns a night light on and off with preset time everyday. Save Energy, No EMI, No Battery, Built-in Lamp Fixture, and Peak Shaving It`s time for 8-pin microcontroller Microchip PIC12C508, the SAVER V3.

2, my latest design of a device that turns a night light on and off everyday. The circuit uses only a PIC12C508 8-pin CMOS micontroller and a small triac, MAC97A6. The Saver V3. 2 also demonstrates the use PCW PIC C Compiler. The schematic of the SAVER V3. 2 is depicted in Figure 1. A transformerless power supply uses Xc of a 0. 22uF capacitor to limit current providing about 10mA current source. The diodes rectifies ac current to dc current which in turns charged to filtering capacitor, 100uF. A 5. 1V zener diode provides dc supply ~5V to the PIC12C508. The microcontroller circuit runs with low power 32kHz X-tal. GP2 connects a momentary button for setting time to 8:00. GP1 drives small dot LED that blink every 5 s for normal running. GP0 directly drives with source current to a small triac MAC97A6. Saver. hex is HEX file suitable for writing the code to the PIC12C508 chip. This file sets time to 8:00 when press S1 once. Time on and off is set to 19:00 to 22:00 everyday. Although the Saver can operate even wrong connection of L and N to the circuit. The author suggests to correct AC line connection to L and N of the circuit. After finished installation, turn the main switch on, functioning LED will blink every 1 second. Let try press S1 once, the lamp will turn on 1 minute then off. The Saver assumes the current time is then be 8:00. Note that every time you press S1, the lamp will turn on 1 minute only once. The day after the lamp will then turn on and off at preset time. Functioning LED will blink at low rate indicating normal operation. The Saver was not designed for turning such energy saving lamps on and off. They mostly use internal high frequency inverter. I have been tested with one from National, it works! But I am not guarantee for your energy saving lamp. I shall be grateful if you could test and let me know the result. My first design as seen in SAVER V5. 0 does not provide backup supply if line voltage has failed. I have installed one at my home and have to repress S1 three times during three months. The Saver 5 draws much current while PIC12C508 draws as less as 36uA. So one can modify by putting backup circuit with additional one or two signal diodes, 1N914, say. A supercapacitor 0. 1F may provide backup time a couple of hour while battery may provide up to a year. GP0 needs external PNP transistor and drives a triac with sink current instead to prevent discharging from backup supply. Night time for different seasons is of course different in winter or summer, say. The sun will set more early in winter while later in summer. One may ask how can we change time on, since the chip was programmed time on/off at 19:00/22:00 everyday.

Very easy, just press S1 to set 8:00 early or later than our clock. Example is shown below; 🔗 External reference