Push-button bathroom fan switch

Push-button bathroom fan switch

Push-button bathroom fan switch design supports timed operation.

This design switches a 120VAC load, and includes several much-needed details on the power supply, a timed automatic shut off, connections to the mains, and other minor changes.

Actuating a momentary (ON) push-button switch latches a bathroom exhaust fan (or other load) on or off. Push the switch and T2, a BS170 NFET, is latched on and the fan turns on; push it again and T2 is latched off and the fan shuts off; leave the fan operating and it automatically shuts off after 27 minutes.

The node designated as A in Figure 1 is the key junction. When A is low at start up all transistors and the fan are off, the Reset input on the 4060 binary counter is high, so that it is inactive, and all its outputs are low. 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 on, the 4060 Reset is driven to a low, i.e. active/enabled state, and the fan is on. In this state, the current load for the switch is 15 mA, plus 4mA through the zener.


Figure 1 Here’s the circuit design for a latched on/off or timed bathroom fan.

When the momentary push-button (PB) switch is closed, 12V from C3 is applied at A, causing T2 to turn on. This state grounds the Reset bus, turns on PFET T4 by putting Vgs(on) on its gate through the R6 and R7 voltage divider, turns on the PNP T5, which drives the optoisolator to turn on the power triac, and starts the 4060 timer by pulling its Reset pin low. T4 applies VD across R5 and R6, which puts 10V at A, keeping T2 latched on, and switches T1 on draining C3’s charge through R2 and leaving 0V at the open PB switch ready for the shut off switch button push.

A manual push-button shut off can be done a couple of seconds after the switch is switched on, or vice versa. If the momentary PB switch is now closed, 0V is applied at A shutting everything off. The switch can be held for 2 seconds without affecting the operation. R1, R2, R6, and C3 form an RC time delay circuit that protects against switch bounce.

OUT-14 of the 4060 goes high after 27 minutes and turns on T3, which applies 0V at A. This shuts off T2, which turns off T1, T4, T5, the optoisolator, the triac, and the fan, and applies VD to 4060’s Reset, stopping its oscillator and making OUT-14 low, which switches T3 back off.

After T2 switches off it takes between a few hundred nanoseconds to a couple of microseconds for T4 to turn off and latch ground on A. However, it takes only 70 to 150 nanoseconds for the 4060’s Reset to go high, propagate through the chip, and turn T3 back off. To ensure the Reset does not go high until after A is latched low by T4, a large 1.25-second R-C delay (R11 and C4) is inserted to hold the reset below VH/L of 6V until then.


The CD4060BE is a 14-stage binary counter with oscillator, fabricated in standard CMOS logic. When Reset is low the oscillator counts though the binary stages. The outputs remain low until the count reaches their stage and then oscillate high and low for their periods.

The period of 4060’s oscillator 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. The oscillator can vary ±10% due to manufacturing, VD , or component variances.

When OUT-13 returns low after 13 binary ripple stages, OUT-14 goes high to turn off the load by switching T3 on: 0.195 seconds × 213 = 1594 seconds = 26.6 minutes.

The drive circuit

T5 drives the IL4208 optocoupler’s LED, which turns on its triac to energize the power triac’s gate. Saturated T5 drives the opto-LED at 5.2 mA (IFT(MIN) = 1 mA) through R10 and VF of 1.16V. When the main triac conducts, its VMT2 – VMT1 is 1.1V. The optocoupler’s triac has an on-state VT of 1.7V, plus T635’s VGT of 1.3V = 3.0V drop so no gate current flows through the IL420 triac while the power triac is on.

When the power triac current falls below the IHOLD threshold value of 12 mA, 57µsec before zero crossing with an estimated ILOAD (PEAK) of 556 mA, the triac commutes off (actual IHOLD and ILATCH are partial functions of IGATE ─ for instance, both decrease with higher gate current and datasheet specs are imprecise). With a phase angle of 38° (assumed power factor of 0.79), VT at commute off across both triacs jumps to −102V. This will drive IGATE at 50 mA (IGT = 2-35 mA; IGM = 4A) through the 2KΩ R14 and the IL4208 triac for the power triac turn on tON of 5 to 10 µsec.

Note that with a resistive load, where voltage and current are in phase, the 2KΩ resistor will impose a 25° lag before VT energizes the gate drive after the triac commutes off. This reduces the average load power realized to about 90%.

The T635-T is a 800V, 6-A triac. It has a dV/dt of 6-10,000V/μsec and does not require a snubber with normal inductive loads (IL4208’s triac is also snubberless). At IT(RMS) = 0.4 A, about the high end of the average bathroom exhaust fan, it dissipates 0.4W. It can dissipate 2W at 2.1A (a 250W load), enough for a 150W bulb too, but not an electric heater, without a heat sink.

Snubber circuit

A snubber circuit with a 220Ω resistor R15 and a 0.18µf capacitor C7, not for the usual triac dV/dt protection which the T635 does not need, enhances the turn on of the triac. The triac commutes off at −IHOLD and does not turn back on to stay on until the load current reaches ILATCH of +15 mA or so about 120 µsec later. Without the snubber the triac will cycle on and off about 8 times every half cycle before turning on fully, producing unwanted RFI.

When the triac commutes off, the snubber capacitor will charge through the 220Ω resistor to about 24V. It will then discharge when the triac turns on, initially at 104 mA, adding to the load current, which at this point is nil. Its discharge is sufficient to keep the total triac current higher than ILATCH for more than 120 µsec, eliminating the oscillations.
The snubber will draw about 8 mA(RMS) , 2% of the normal load when the fan is off. The snubber capacitance has nil affect on power factor.


The circuit has a transformerless capacitive power supply. Average AC current = C(dv/dt) = 4VPEAK (f)(C) through a capacitor, which acts like a current source. The 0.47µf/330VAC, self-healing metalized film, X-1 safety rated feed capacitor delivers 19+ mA current. The circuit draws 15.1 mA when ON and 7.4 mA when OFF. The excess current is drained through the zener diode. A 1-A fuse is added for capacitor fail short fire protection, and a 22MΩ bleeder resistor around the capacitor is included for shock prevention.

A 33Ω/2W current limiting resistor limits the inrush surge current to 5.2A for about 16µsec. All six components that see this inrush current, the feed capacitor, limit resistor, fuse, bridge rectifier, zener, and filter capacitor, can handle the 5.2-A surge. The 820μf filter capacitor has about a 0.6% ripple factor. The 0.1µf C5 further filters VD to the 4060. A 400-A varistor protects against line power spikes.

Connecting the mains

Connecting to the mains might seem trivial, but it is not. Most example triac control circuits simply show the power supply appearing magically off to the left, as if provided by the tooth fairy.

The circuit requires direct connections to both the hot and the neutral mains ─ neither line nor neutral can connect through the load . This requires mains access at the wall switch box. If the mains access is at the ceiling fixture it will work if: (1) neutral is connected to the load and hot bypasses the load, which is standard house wiring protocol, and (2) the code is violated by using the green ground wire for the circuit’s neutral. This puts an insignificant 19 mA on the mains ground, but is nonetheless a code violation. With an unlikely GFCI in the fan’s circuit main, this use of the ground wire could cause false tripping.


Figure 2 This is the PCB layout for the circuit.


Figure 3 Here is the completed board for this design.

The switch is a 16mm (9/16″) PV6 series PB switch with an LED backlight from E-Switch. Any momentary (ON) PB switch will do. The circular blue LED is driven at 7.5 mA through its VF of 2.68V and the 1.2-K dropping resistor (R8). PV6 switches have other LED colors.

The circuit mounts in the switch wall box in lieu of the normal toggle switch. I used a BUD utility box, CU-18425 (3.56″×2.03″×1.65″ – a snug fit in a wall box), along with a dual switchplate from Kyle. The PCB is 2.58″×1.8″. Figures 2 and 3 are images of the PCB layout and the completed board. Wire connections are 16 to 18 gauge stranded wires from pads to the mains; 18-22 gauge wires from pads to the PB switch, its LED, and for the R10 to IL4208 jumper.

Author: admin

Leave a Reply