Summary of Night Light Saver V3.2 using PIC12C508
The SAVER V3.2 is a night light controller using a Microchip PIC12C508 8-pin microcontroller and a MAC97A6 triac. It employs a transformerless power supply circuit with a 0.22uF capacitor and diodes to provide around 5V DC to the microcontroller powered by a 32kHz crystal. The device features a button to set the time and an LED indicator blinking every 5 seconds. The triac drives the load directly. The software sets the default on/off times and can be modified with a PCW PIC C Compiler.
Parts used in the SAVER V3.2:
- Microchip PIC12C508 8-pin microcontroller
- MAC97A6 triac
- 0.22uF capacitor (Xc)
- Diodes (for rectification)
- 100uF filtering capacitor
- 5.1V Zener diode
- 32kHz crystal oscillator
- Momentary push-button switch (S1)
- Small dot LED
Introduction
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.
Circuit Description
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.
Software
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.
The original source program SAVER.C and SAVER.H was written in ‘C’ language. User may change set time when press S1 and change time on/off.
To recompile the source file you need a PCW PIC C Compiler from CCS.
For more detail: Night Light Saver V3.2 using PIC12C508