Introduction: Transform Basic Bathroom Fan to Advanced

Picture of Transform Basic Bathroom Fan to Advanced

This is my first instructable !!

After i moving with my girlfriend in our new rent house, our new bathroom was equipped of an fan evacuator with a PIR sensor to evacuate humidity, every time we power ON the light of the bathroom, the FAN power 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)

Please, excuse my poor English.

Step 1: What Inside This Silent Fan ;p

Picture of What Inside This Silent Fan ;p

+ No transformator => Problem: i cannot extract safe 5V out of the box.

+ No Relay => my Electronic education is not enough to drive a FAN.

... It is a good work from the manufacturer !

Step 2: Add Switch With Snubber Filter

Picture of Add Switch With Snubber Filter

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)

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.

Step 3: Add 5V Power Supply

Picture of Add 5V Power Supply

Recover old LG Cell Phone charger to used as a power supply (230V => 5V 0.5A)

Step 4: Remaining Space

Picture of Remaining Space

Take measures of remaining space where the PCB will be placed.

Step 5: Cut Useless Brace

Picture of Cut Useless Brace

Cut useless brace to win a little bit more spaces.

Step 6: Schematic Μc/Sensor

Picture of Schematic Μc/Sensor

I chossen the Atmega 328p because I had several at home ^^

AM2302: The hygrometer/temperature sensor (1-wire bus)

Step 7: Led Driver

Picture of Led Driver

NPN Transistors working in saturation mode drived by µc.

Step 8: Door Detection

Picture of Door Detection

Infrared Proximity Sensor was built with an TCRT5000 and a LM324, the LM324 is aop used as an 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 of how much IR is received.

Step 9: Lets Go to Disign the PCB

Picture of Lets Go to Disign the PCB

I design the PCB with Fritzing and take into acount the space available in the box.

Step 10: Test and Reshape the PCB

Picture of Test and Reshape the PCB

I reshape the PCB to avoid useful brace.

Step 11: Let's Go to Solder Components

Picture of Let's Go to Solder Components

While i welding components, i realize that i forget to place Quartz ! ... i improvise by welding one Quartz above the µc.

After welding all components, i test with 5V power supply, every time i test a new PCB i hold my breath before power ON power supply ... poiouff, this time, all work fine for first shot.

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"

Step 12: Test FAN Drived by Μc + Try Close Housing

Picture of Test FAN Drived by Μc + Try Close Housing

Temporary the LED go out.

Step 13: Mount the Proximity Sensor Near the Door

Picture of Mount the Proximity Sensor Near the Door

I do hole on the ceiling for passing the wires.

Step 14: Final Test

Picture of Final Test

After calibrated the poximity sensor (set the potentiometer to detect the door)

I recovered the PIR cap to protect the LED from moisture.

while i take my shower, i remark that the sensor take a long wihle before detect moisture > 75% ... may be i must move the AM2302 near the hole where come the power.

Comments

alcurb (author)2015-04-09

It's a fun solution for those who love prototyping circuits. Your issue with the humidity sensor could be addressed by cutting a large enough hole on the fan case to expose the humidity sensor to the ambient air. There is a reason why the sensor has many holes. I bet that would improve the response time greatly.

That said, I find that an alternate solution would be to mount the motor on soft rubber washers or shocks. It's to reduce the transfer of noise to the case.

That however doesn't address the fan coming on the whole time the light is on because one switch controls both light and fan. A solution I had explored is to buy one of those remote control switches (transmitter) that look like a wall switch and stick it next to the the light switch. If the receiver end doesn't fit inside the fan case, the receiver assembly can be taken out of it's own enclosure and placed inside the fan case. It's a neat solution and the receiver doesn't care about inductive or resistive loads because the receiver has a mechanical relay. I tried to implement that idea on my exhaust fan, but the enclosure for the fan is very tight around the fan itself, way too small to fit anything else in there, and it's in an old rental apartment.

neo_xnitro (author)alcurb2015-04-10

Yes, you are right, but i prefer move the sensor near the existing hole (high above) to avoid as much as possible moisture inside the fan case.

The Lightning Stalker (author)2015-04-09

The LED flashing at night would drive me nuts.

You would only see it if you lived in the bathroom :D

Or if you ever walked past it or tried to use it. :p

studleylee (author)2015-04-10

Well done :-) I like white noise when in the bathroom.

BFB53 (author)2015-04-09

I am curious why not just put a switch on the ac line next to light switch to allow it to be turned on and off independent of light seems like a lot of work not mention cost when a single double switch would have done the job would not have even had to install a new handy box just wire. or even a remote ir switch. Oh well very neat job and well laid out. Just feel its over kill.

neo_xnitro (author)BFB532015-04-10

$1.90 2 Channel Relay Module With optocoupler

$1.03 TCRT5000 Reflective Photoelectric Switch Infrared

$0.99 Ultra-Bright 4 pin RGB Diffused Common Anode LED

$0.99 NPN Transistor TO-92 2N2222

$1.08 LM324N

$3.40 AM2302 Digital Temperature And Humidity Sensor

$1.75 ATMEGA328P

x resistors

x capacitors

x PCB

x wires

... the FAN belongs to the owner

Total: 11.14 $

tovey (author)BFB532015-04-09

There's this thing called building codes.

In some locals, the light and fan must be connected to the same switch.

SunnyC1 (author)2015-04-09

Enjoyed this instructa --> thanks.

oz5es (author)2015-04-09

I hope You're not welding it, rather than soldering, hi. ;-)

Nice work, I will save it for later.

mikeely (author)2015-04-09

Very cool instructable! Way above my abilities but it's something that I would enjoy having and now I have an idea how to do it. Well done!

interzoneboy (author)2015-04-09

This is exactly the sort of project I love to see on here... Hacking an everyday thing that everyone has and uses, and making an ordinary thing awesome. Great work! Thank you for sharing.

frankie2234. (author)2015-04-09

If you buy Panasonic, there brand is extremely quiet. You can't hear it running while your next to it.

rivertennisdog (author)2015-04-09

Very important to have a fan with some noise if you ever have guests; I don't want to hear what's going on in there, and most people don't want to be heard. Some fans even offer a noise option.

ignoresliced (author)2015-04-08

supper

tomatoskins (author)2015-04-06

This is awesome! I love simplifying my life with things like this.

bigpig (author)tomatoskins2015-04-08

lol

neo_xnitro (author)2015-04-07

Hi everyone, Thanks for your comments ;)

gada888 (author)2015-04-06

thanks,i gained a lot from your awesome ible.

vonronge (author)2015-04-06

Nice! Great little project to show what engineering is.

RoboPandaPDX (author)2015-04-06

Great project and documentation! Love the led status light.

About This Instructable

55,058views

340favorites

License:

More by neo_xnitro:Ikea Worklight (Portable)Hack digital radio, replace the volume controlstack ICSP breadboard adapter
Add instructable to: