Maker Pro

Fanrunon - delayed turn-off for bathroom extractor fan

A turn-off delay timer module for use with an AC mains load such as a fan or a light

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
KrisBlueNZ submitted a new Showcase Item:

Fanrunon - delayed turn-off for bathroom extractor fan

My 'Fanrunon' project is a turn-off delay timer module for use with an AC mains load such as a fan or a light. The rated maximum current is 2.5A RMS. It uses a triac for switching, and a Microchip PIC12F675 microcontroller.

At this time, I have not built up the hardware, and I have only partly tested the firmware using the Microchip MPLAB X emulator. The design and/or the code may change once I have built and tested the circuit and the code.

The module fits inside the cavity behind the wall switch, and receives its power from the fan current itself. Because of this design feature, and unlike many commercial turn-off delay timers, this design doesn’t require a Neutral wire in the switch cavity.

Fanrunon uses the mains frequency as its timing source, and supports 50 and 60 Hz mains frequencies. The run-on time can be selected by switching the wall switch ON and OFF a certain number of times. The wall switch must be a changeover type (SPDT aka SPCO) so the circuit can detect its position.

Since the Fanrunon module doesn’t connect across the mains (it doesn’t use a Neutral connection), it gets its operating power by slightly dropping the voltage available to the load.

IMG

Circuit description:

Turning ON the wall switch completes the electrical circuit from mains Phase, through the Fanrunon circuit (CN1 pins 1 and 2), through the wall switch, through the fan, and back to mains Neutral, and this powers up the Fanrunon circuit. D1~4 form a bridge rectifier that ensures that the voltage across the series diode string D5~9 always has the right polarity — positive at the top. The diode string conducts the load current and limits the voltage across it to around 5V (depending on load current). On every half-cycle of the mains waveform, current flows through D1~4 and produces this voltage drop across the diode string.

This 5V supply rail passes through fusible resistor R2 to D10, a 5.1V zener diode. This arrangement ensures that if excess current flows through the D5~9 string (due to a short-circuited fan or a wiring error), D5~9 may be damaged but R2 will very quickly go open-circuit, while D10 protects the microcontroller from losing its smoke. C2 smooths the DC rail so it remains active around zero-crossings of the mains voltage, when there is insufficient voltage available at the bridge rectifier input. This provides a 5V DC (approximately) supply to the microcontroller.

U1 is a Microchip PIC12F675-I/P microcontroller in an 8-pin DIP package. CN2...

Read more about this showcase item here...
 
Last edited by a moderator:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Funny you should post this, as I am in the process of remodeling my bathroom, adding an exhaust fan, an infrared heat lamp for use after stepping out of the shower, and an overhead light inside the shower. I already have a switched pendant light over the toilet and six 60 W incandescent "Hollywood style" lamps flanking the medicine cabinet, and six convenience outlets connected to a GFI circuit-breaker wired up and working. I installed a two-gang box for the fan and shower lamps, but haven't decided which of two switches turns on the fan, infrared lamp, and shower lamp. Your circuit will be an easy add-on to control the exhaust fan, but I think I may need a mechanical timer switch if I add the 250 W infrared heat lamp to the circuit with the fan. Or maybe I could replace the two-gang box with a three-gang box, add another switch for the infrared heat lamp and use two of your Fanrunon circuits.

BTW, the resistor R2 and the capacitor C2 are identified on the schematic as R1 and C1 respectively.
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
goto $ ; Croak - go gaga - loop forever

LOL

Don't forget to include:

fetch current time
if time == 0300
then goto $ //loop forever at 3AM :p
else return 0;
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
Well, if we are going to post commercial made items, then I would go with: Leviton
I have used other products made by them and have always found them to be of great quality. They even make mechanical versions still in case you are concerned with high humidity levels in the washroom.
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I installed a two-gang box for the fan and shower lamps, but haven't decided which of two switches turns on the fan, infrared lamp, and shower lamp. Your circuit will be an easy add-on to control the exhaust fan
The reason for that design is that there's no Neutral available. If Neutral is available, there are lots of off-the-shelf solutions that would probably be better.
BTW, the resistor R2 and the capacitor C2 are identified on the schematic as R1 and C1 respectively.
Thanks for the correction! I'll check through the text for anything else.
 
Top