Transform Basic Bathroom Fan to Advanced
by neo_xnitro in Circuits > Electronics
56759 Views, 339 Favorites, 0 Comments
Transform Basic Bathroom Fan to Advanced
![DSC_0217.JPG](/proxy/?url=https://content.instructables.com/F1Z/VCX5/I85QO8TA/F1ZVCX5I85QO8TA.jpg&filename=DSC_0217.JPG)
![DSC_0152.JPG](/proxy/?url=https://content.instructables.com/FW0/FZQA/I85QPOQP/FW0FZQAI85QPOQP.jpg&filename=DSC_0152.JPG)
This is my first instructable !!
After i moving with my girlfriend into our new rent house, our new bathroom is equipped of a fan evacuator with a PIR sensor to evacuate humidity, every time we switched ON the light of the bathroom, the FAN switch ON and made a lot of noise !!
I like every time my girlfirend goes to bathroom at night ...
Requirements:
FAN would be power ON if the humidity is higher than 75%
OR
The door is closed (go for a dump)
What Inside This Silent Fan ?
![DSC_0074.JPG](/proxy/?url=https://content.instructables.com/FY1/5IAV/I85QO8TK/FY15IAVI85QO8TK.jpg&filename=DSC_0074.JPG)
+ No transformator => Problem: i cannot extract safe 5V out of the box.
+ No Relay.
Add Switch With Snubber Filter
![DSC_0082.JPG](/proxy/?url=https://content.instructables.com/FV7/BF02/I85QO8VH/FV7BF02I85QO8VH.jpg&filename=DSC_0082.JPG)
I choosen to drive the FAN with dual relay with optocoupler input protection, the easy way to drive any thing from a µC
I'm very lucky that this dual relay go inside (i cut a litle bit the eges to fit it perfectly)
snubber filter :
Every time the relayes are cut off, one phenomenon is produced:
> µc reset alone.
The snubber filter (Capacitor in serial with Resistor) is wired in parallel with the FAN.
From Wiki:
Snubbers are frequently used in electrical systems with an inductive load where the sudden interruption of current flow leads to a sharp rise in voltage across the current switching device, in accordance with Faraday's law. This transient can be a source ofelectromagnetic interference (EMI) in other circuits.
Add 5V Power Supply
![DSC_0080.JPG](/proxy/?url=https://content.instructables.com/F73/JEC1/I85QO8UJ/F73JEC1I85QO8UJ.jpg&filename=DSC_0080.JPG)
I recovered an old LG Cell Phone charger to use as a power supply (230V => 5V 0.5A)
Remaining Space
![DSC_0083.JPG](/proxy/?url=https://content.instructables.com/FRF/IL7X/I85QO8VL/FRFIL7XI85QO8VL.jpg&filename=DSC_0083.JPG)
![DSC_0086.JPG](/proxy/?url=https://content.instructables.com/FC2/AKG4/I85QO8VU/FC2AKG4I85QO8VU.jpg&filename=DSC_0086.JPG)
![DSC_0087.JPG](/proxy/?url=https://content.instructables.com/FJP/R3JK/I85QO8VV/FJPR3JKI85QO8VV.jpg&filename=DSC_0087.JPG)
![DSC_0085.JPG](/proxy/?url=https://content.instructables.com/FVZ/EEY4/I85QO8VW/FVZEEY4I85QO8VW.jpg&filename=DSC_0085.JPG)
Take measures of remaining space where the PCB will be placed.
Cut Useless Brace
![DSC_0138.JPG](/proxy/?url=https://content.instructables.com/FXC/33CB/I85QO8Z8/FXC33CBI85QO8Z8.jpg&filename=DSC_0138.JPG)
I cutted useless brace to win a little bit more spaces.
Schematic Μc/Sensor
![sch_1.png](/proxy/?url=https://content.instructables.com/FDR/XPH4/I85QO8W9/FDRXPH4I85QO8W9.png&filename=sch_1.png)
I chose the Atmega 328p because I had several at home ^^
AM2302: The hygrometer/temperature sensor (1-wire bus)
LED Driver
![sch_led.png](/proxy/?url=https://content.instructables.com/FUQ/X7ZD/I85QOT4Q/FUQX7ZDI85QOT4Q.png&filename=sch_led.png)
NPN Transistors working in saturation mode drived by µc.
Door Detection
![sch_door.png](/proxy/?url=https://content.instructables.com/FZ3/49X9/I85QO8XM/FZ349X9I85QO8XM.png&filename=sch_door.png)
![DSC_0061.JPG](/proxy/?url=https://content.instructables.com/FT9/8RN6/I85QPNIX/FT98RN6I85QPNIX.jpg&filename=DSC_0061.JPG)
Infrared Proximity Sensor was built with an TCRT5000 and a LM324, the LM324 is aop used as a voltage comparator.
When the infrared light (from the IR LED) reflect a surface (bathroom door), the phototransistor leave the current to flow, The input 5 of LM324 is at +IRV and compare the voltage with the input 6 (bridge voltage divider), if the value is higher, the output 7 give 3.5V (5V - 1.5V).
N.B. IRV depend the amount of infrared light coming back to to IR receiver
Lets Go to Disign the PCB
![pcb.png](/proxy/?url=https://content.instructables.com/FBF/3P90/I85QO8XU/FBF3P90I85QO8XU.png&filename=pcb.png)
![DSC_0131.JPG](/proxy/?url=https://content.instructables.com/FSH/2L22/I85QO8XX/FSH2L22I85QO8XX.jpg&filename=DSC_0131.JPG)
![DSC_0137.JPG](/proxy/?url=https://content.instructables.com/FC1/E97Q/I85QO8Z5/FC1E97QI85QO8Z5.jpg&filename=DSC_0137.JPG)
![DSC_0143.JPG](/proxy/?url=https://content.instructables.com/FG9/LEP7/I85QO914/FG9LEP7I85QO914.jpg&filename=DSC_0143.JPG)
I designed the PCB with Fritzing and took into account the space available in the box.
Test and Reshape the PCB
![DSC_0140.JPG](/proxy/?url=https://content.instructables.com/FDI/KB4J/I85QO905/FDIKB4JI85QO905.jpg&filename=DSC_0140.JPG)
![DSC_0142.JPG](/proxy/?url=https://content.instructables.com/FHQ/LQV7/I85QO907/FHQLQV7I85QO907.jpg&filename=DSC_0142.JPG)
I reshape the PCB to avoid useful brace.
Let's Go to Solder Components
![DSC_0145.JPG](/proxy/?url=https://content.instructables.com/FTK/0UX7/I85QO916/FTK0UX7I85QO916.jpg&filename=DSC_0145.JPG)
![DSC_0147.JPG](/proxy/?url=https://content.instructables.com/FS2/395I/I85QO917/FS2395II85QO917.jpg&filename=DSC_0147.JPG)
When i soldered the components, I realized that I forgoten to place the Quartz ! ... I improvised by soldered it above the µc.
I test with 5V power supply, I held my breath before I switched it ON ... poiouff, this time, all work fine for first time.
RED light: No communication with hygrometer sensor.
GREEN light: humidity < 75%
BLUE light >= 75%
N.B. All light color are bliking to say me, "i'am alive"
Test FAN Drived by Μc + Close the Case
![DSC_0162.JPG](/proxy/?url=https://content.instructables.com/F4I/HQ28/I85QO93Z/F4IHQ28I85QO93Z.jpg&filename=DSC_0162.JPG)
![DSC_0151.JPG](/proxy/?url=https://content.instructables.com/FPZ/CQ1A/I85QO924/FPZCQ1AI85QO924.jpg&filename=DSC_0151.JPG)
![DSC_0156.JPG](/proxy/?url=https://content.instructables.com/FWT/ZD1Z/I85QO932/FWTZD1ZI85QO932.jpg&filename=DSC_0156.JPG)
![DSC_0167.JPG](/proxy/?url=https://content.instructables.com/FGY/RDBP/I85QO957/FGYRDBPI85QO957.jpg&filename=DSC_0167.JPG)
![DSC_0168.JPG](/proxy/?url=https://content.instructables.com/FUC/JSJ2/I85QO958/FUCJSJ2I85QO958.jpg&filename=DSC_0168.JPG)
![DSC_0166.JPG](/proxy/?url=https://content.instructables.com/F8I/MJ21/I85QO940/F8IMJ21I85QO940.jpg&filename=DSC_0166.JPG)
Everything seems fit perfectly
Mount the Proximity Sensor Near the Door
![DSC_0209.JPG](/proxy/?url=https://content.instructables.com/FIR/TFVI/I85QO965/FIRTFVII85QO965.jpg&filename=DSC_0209.JPG)
![DSC_0212.JPG](/proxy/?url=https://content.instructables.com/FGC/B12C/I85QO966/FGCB12CI85QO966.jpg&filename=DSC_0212.JPG)
![DSC_0220.JPG](/proxy/?url=https://content.instructables.com/FSL/8265/I85QO974/FSL8265I85QO974.jpg&filename=DSC_0220.JPG)
I made a hole on the ceiling for passing the wires.
Final Test
![DSC_0217.JPG](/proxy/?url=https://content.instructables.com/FJ5/DUQF/I85QO975/FJ5DUQFI85QO975.jpg&filename=DSC_0217.JPG)
![DSC_0218.JPG](/proxy/?url=https://content.instructables.com/FV4/J3XJ/I85QO982/FV4J3XJI85QO982.jpg&filename=DSC_0218.JPG)
![DSC_0231.JPG](/proxy/?url=https://content.instructables.com/FNG/L7OX/I85QP74L/FNGL7OXI85QP74L.jpg&filename=DSC_0231.JPG)
After calibrated the poximity sensor (set the potentiometer to detect the door presence)
While i took my shower, i noticed that the sensor takes a long time before it detect moisture > 75% ... may be i must move the AM2302 near the hole where come the power.