SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Frenzis
#159151
Hi everyone,

I'm building my first 220v device and I'ld like to have your advice.

I'm setting up a small device that based on the temperature is turning on and off a Fan.

the program is small and I'ld love to shrink it to a attiny, and drive a replay to turn on and off the fan.

would this relay https://www.sparkfun.com/products/100 or this kit https://www.sparkfun.com/products/11042 do the job?


I'm a self learner and still have many blind spots in my knowledge, so I appreciate all the help.

thanks for all the tips and help

Frenzis.
By MichaelN
#159221
That first relay isn’t suitable – as per the datasheet, it needs at least 9VDC to turn on (this is the “pickup voltage”). The 5VDC min rating is for the LOAD (5VDC @ 10mA). Perhaps counter-intuitively, switches and relays often have MINIMUM as well as maximum load ratings.

The second link would work fine, but depending on the size of the fan it could be overkill (a smaller relay would probably be fine).

EDIT: that big relay on the second link takes a lot of current (5V @ 200mA) to energise the coil, so take this into account if you do go this way.
By Blackfin
#159256
The first relay could be made to work, in theory, if you used a 2N3904 (e.g.) transistor to switch the coil current and had a 12V source to work with on the control board. Whether or not the relay itself is up to the task of conducting sufficient current for your fan/blower depends on the load presented by the fan: How big is it? What's the motor type?

One other thing bears mentioning: Be very careful when working with AC mains voltages. If you do a PCB for this make sure you observe all appropriate creepage and clearance distances between your mains circuit and your low-level DC logic power. Don't use a "perf", prototyping or bread-board for any design involving mains voltages.

Also observe clearance and creepage between mains and any mounting screws, accessible metal parts of the enclosure and so on.
By Frenzis
#159322
Blackfin wrote:The first relay could be made to work, in theory, if you used a 2N3904 (e.g.) transistor to switch the coil current and had a 12V source to work with on the control board. Whether or not the relay itself is up to the task of conducting sufficient current for your fan/blower depends on the load presented by the fan: How big is it? What's the motor type?

One other thing bears mentioning: Be very careful when working with AC mains voltages. If you do a PCB for this make sure you observe all appropriate creepage and clearance distances between your mains circuit and your low-level DC logic power. Don't use a "perf", prototyping or bread-board for any design involving mains voltages.

Also observe clearance and creepage between mains and any mounting screws, accessible metal parts of the enclosure and so on.
Thanks for the input, the fan is small, the kind you put on a desk.
I think I'm going to buy a relay board to make sure it's done correctly.

the idea is simple:

my sketch will be uploaded on an attiny. this one will receive input by the lm35dz for temperature.
it ill display it on a 7segment. when the temperature goes over the test, it ill trigger the relay to turn on the fan...

the relay has a 5V need to work, but the display needs less... so I was even thinking on operating one side of the circuit on 3v and use an opto-isolator to use the full 5v to trigger the relay.

I have access to 220v and 5v in the design I made... no 12V as the space is limited and most of my components are 5v.

does it make sense?
User avatar
By thebecwar
#159368
You could go this route instead:
http://www.powerswitchtail.com/Pages/PSTKKit.aspx

The relay will switch as low as 3v@3ma, so a tiny could easily fire the relay, plus the kit provides an enclosure for the high volt components, so you don't have to worry about it. 220vac hurts.

Standard Disclaimer: Wall voltage can be EXTREMELY dangerous, and you should treat it with care. Also, since the device is not UL/CE certified, you shouldn't leave it connected to power when the device is unsupervised for any length of time. (It may also be a good idea to make sure that the fire extinguisher in your work area/home are fully charged and the right type to extinguish an electrical fire. ABC dry chemical is the best option for a workshop extinguisher.)