This is an upgraded version of Anthony Smith’s designs for a lock / lock switch (see entire series below). The new design switches a 120 VAC load and includes several much-needed details about power, a timed automatic shutdown, mains connections and other minor modifications.
The operation of a momentary push button switch (ON) locks a bathroom exhaust fan (or other load) on or off. Press the switch and T2, an NFET BS170, is locked and the fan turns on; push it again and T2 is locked and the fan stops; leave the fan on and it will turn off automatically after 27 minutes.
The node designated by A in Figure 1 is the key junction. When A is low when all transistors are started and the fan is off, the Reset input of binary counter 4060 is high, so it is inactive, and all of its outputs are on. low state. The quiescent current is less than 0.1 ÂµA, plus the current through the Zener diode and the optional LED in the switch. When A is high, all transistors (except T3) are activated, the 4060 Reset is brought to a low state, i.e. active / activated, and the fan is on. In this state, the current load for the switch is 15mA, plus 4mA through the Zener.
Figure 1 Here is the circuit design for an on / off or timed bathroom fan. (Click to enlarge)
When the momentary push button switch (PB) is closed, 12V from C3 is applied to A, causing T2 to activate. This state grounds the reset bus, activates the PFET T4 by setting Vgs (enabled) on its grid through voltage dividers R6 and R7, turns on PNP T5, which drives the optoisolator to turn on the power triac, and starts timer 4060 by pulling its reset pin down. T4 applies VD through R5 and R6, which puts 10V at A, keeping T2 locked, and turns T1 on by draining the charge from C3 through R2 and leaving 0V at the open PB switch ready for pressing the d switch button ‘stop.
Manual push-button shutdown can be performed a few seconds after switching on the switch, or vice versa. If the momentary switch PB is now closed, 0V is applied to A, turning everything off. The switch can be held for 2 seconds without affecting the operation. R1, R2, R6 and C3 form an RC timing circuit which protects against switch bounce.
OUT-14 of the 4060 goes high after 27 minutes and turns on T3, which applies 0V to A. This turns off T2, which turns off T1, T4, T5, the optoisolator, triac and fan, and applies VD on resetting 4060, stopping its oscillator and making OUT-14 low, which turns T3 off.
Once T2 is off, it takes anywhere from a few hundred nanoseconds to a few microseconds for T4 to shut down and lock ground to A. However, it only takes 70 to 150 nanoseconds for the 4060’s reset to ramp up, propagate through the chip, and turn off the T3. To ensure that the reset does not go up until A is locked low by T4, a large RC delay of 1.25 seconds (R11 and C4) is inserted to keep the reset below VH / L of 6V until then.
Counter / timer
The CD4060BE is a 14-stage binary counter with oscillator, manufactured in standard CMOS logic. When Reset is low, the oscillator counts through the binary stages. The outputs remain low until the count reaches their stage, then oscillate high and low during their periods.
The 4060’s oscillator period is 2.2 Ã R13 Ã C6 or 2.2 Ã 402K Ã 0.22 Âµf = 0.195 seconds (f = 5.1 Hz). R12 should be 3 to 10 Ã R13. Oscillator may vary Â± 10% due to manufacture, VD , or component deviations.
When OUT-13 returns low after 13 binary ripple steps, OUT-14 goes high to turn off the load by turning on T3: 0.195 seconds Ã 213 = 1594 seconds = 26.6 minutes.
The training circuit
T5 drives the LED of the IL4208 optocoupler, which turns on its triac to supply the power triac door. The saturated T5 drives the opto-LED at 5.2 mA (IFT (MIN) = 1 mA) via R10 and VF of 1.16V. When the main triac is driving, its VMT2 – VMT1 is 1.1 V. The optocoupler triac has a V in the on stateT 1.7 V, plus V of T635GT 1.3V = 3.0V drop so that no gate current flows through the IL420 triac when the power triac is turned on.
When the power triac current drops below the ISOCKET threshold value of 12 mA, 57Âµsec before zero crossing with an estimated ILOAD (PIC) 556 mA, the triac switches (real ISOCKET and meLATCH are partial functions of IPORTAL â for example, both decrease with a higher gate current and the specifications in the datasheet are imprecise). With a phase angle of 38 Â° (assumed power factor 0.79), VT the journey through the two triacs jumps to -102V. This will lead mePORTAL at 50 mA (iGT = 2-35 mA; IDG = 4A) via 2KÎ© R14 and triac IL4208 for switching on the power triac tTO from 5 to 10 Âµs.
Note that with a resistive load, where voltage and current are in phase, the 2KÎ© resistor will impose a 25 Â° offset before VT supplies the gate drive after switching off the triac. This reduces the average charge power achieved to around 90%.
The T635-T is an 800V, 6-A triac. It has a dV / dt of 6 to 10,000 V / Î¼sec and does not require a damper with normal inductive loads (the triac of the IL4208 is also without a damper). to meT (RMS) = 0.4A, about the top end of the average bathroom exhaust fan, it dissipates 0.4W. It can dissipate 2W at 2.1A (a 250W load), enough for a light bulb 150W too, but not an electric heater, without heat sink.
A damping circuit with a 220Î© R15 resistor and 0.18Âµf C7 capacitor, not for the usual dV / dt protection of the triac which the T635 does not need, improves the ignition of the triac. The triac switches to -ISOCKET and does not turn back on to stay on until the charging current reaches ILATCH of +15 mA approximately 120 Âµsec later. Without the damper, the triac will turn on and off about 8 times every half cycle before fully turning on, producing unwanted RFIs.
When the triac turns off, the damping capacitor charges through the 220Î© resistor to about 24V. It will then discharge when the triac is powered up, initially at 104 mA, adding to the load current, which at this stage is zero. Its discharge is sufficient to keep the total current of the triac greater than ILATCH for more than 120 Âµsec, eliminating oscillations.
The damper will draw about 8mA(RMS) , 2% of normal load when the fan is off. The damping capacity has no effect on the power factor.
The circuit has a transformerless capacitive power supply. Average alternating current = C (dv / dt) = 4VPEAK (f) (C) through a capacitor, which acts as a current source. The 0.47 Âµf / 330 VAC X-1 Self-Healing Metallized Film Safety Power Capacitor provides over 19mA of current. The circuit consumes 15.1mA when turned on and 7.4mA when turned off. The excess current is drained through the Zener diode. A 1-A fuse is added for short circuit protection in the event of a capacitor failure, and a 22 MÎ© bleed resistor around the capacitor is included for shock prevention.
A 33Î© / 2W current limiting resistor limits the inrush surge current to 5.2A for approximately 16Âµsec. The six components that see this inrush current, the supply capacitor, the limit resistor, the fuse, the rectifier bridge, the Zener and the filter capacitor, can handle the overvoltage of 5.2 A. 820 Î¼f filtering has a ripple factor of approximately 0.6%. The 0.1Âµf C5 additional filters VD to 4060. A 400 A varistor protects against spikes in the mains supply.
Connecting to the mains may seem trivial, but it is not. Most of the triac driver circuit examples simply show that the power magically appears to the left, as if being supplied by the tooth fairy.
The circuit requires direct connections to both the hot and neutral mains â neither the line nor the neutral can connect through the load . This requires access to the mains at the wall switch box. If the mains access is at the ceiling light, it will work if: (1) the neutral is connected to the load and the heater bypasses the load, which is the standard house wiring protocol, and (2) the code is violated by using the green ground wire for the circuit neutral. This brings an insignificant 19mA to the mains ground, but is a code violation nonetheless. With an unlikely GFCI in the main fan circuit, this use of the ground wire could cause a false trip.
Figure 2 This is the layout of the PCB for the circuit.
figure 3 Here is the finished board for this design.
The switch is a 16mm (9/16 â³) PV6 series PB switch with LED backlight from E-Switch. Any momentary PB switch (ON) will do. The circular blue LED is driven at 7.5mA by its VF of 2.68 V and the drop resistance of 1.2 K (R8). PV6 switches have other LED colors.
The circuit mounts in the wall switch box instead of the normal toggle switch. I used a BUD utility box, CU-18425 (3.56 â³ Ã 2.03 â³ Ã 1.65 â³ – a perfect fit in a wall box), with a double switch plate from Kyle. The PCB is 2.58 â³ Ã 1.8 â³. Figures 2 and 3 are pictures of the PCB layout and the finished board. Wire connections are 16-18 gauge stranded wire running from the pads to the mains; 18-22 gauge wires from the pads to the PB switch, to its LED and for jumper R10 to IL4208.