Help required, want to switch a 12v fan.

Jarubell

Senior Member
1st, my experience is low.

I want to switch a 12v .2A computer fan with a PicAxe, I just need direction regarding what component would I look at to switch the power to the 12 volt fan?

Jarubell
 

bluejets

Senior Member
Small relay ...low coil current............ or standard relay with transistor switch...........or just a logic level mosfet

(on lunchbreak...no time to draw circuits)
 

Jarubell

Senior Member
Thank you, I'm now looking at a 5v relay on a local suppliers page that looks like it switches at 100mW, I thinking that would work.

Thanks again, no drawings necessary.
 

westaust55

Moderator
The relay with a 100mW 5V coil is drawing 20 mA and maybe more as inrush during contact closing until the relay armature closes the air gap.

I would consider using a transistor between the PICAXE and relay to protect the PICAXE chip. Even a simple BC549 rated at Ic - 200mA will suffice.
A base resistor of say 4.7 kOhm and don't forget the free wheeling diode across the relay coil.
See PICAXE manual 3 page 8 for a circuit and where/how the diode is connected:
http://www.picaxe.com/docs/picaxe_manual3.pdf
 

Jarubell

Senior Member
westaust55

Perfect, that's the route I'll be taking. Since my last reply, I noticed that the one the supplier carries requires ~40mA which was making me look at the drawing you instructed. Seen it before, makes more sense now. Thanks for the warning of the coil's draw being more than the 20mA for a moment, I would most likely had tried to power it through my PICAXE chip.

Off to read about "Back EMF"

Thank you,
Jarubell
 

hippy

Technical Support
Staff member
I want to switch a 12v .2A computer fan with a PicAxe
What type of fan is it that you are switching ? If it has a two-pin connector it only requires power to be switched on and off, if a three-pin connector it may also/or require PWM control.
 

Jarubell

Senior Member
I was going to look for a variable speed fan but this 2 wire one just happen to find it's way to me.

Thanks for the tip Hippy.
 

Goeytex

Senior Member
You can make the fan variable speed by driving it with a "PWM" signal. The speed can be controlled by a POT to an ADC input. Some fans do quite well with PWM. Some may not. Some can be noisy at certain frequencies with an audible hum. The key is to find a frequency that operates the fan quietly.
 

westaust55

Moderator
If you wish to consider operating a fan at other than full speed I would suggest that you do not bother with the relay and drive the fan directly with a transistor - still having the free wheeling diode but now across the fan motor terminals.
Then as others have suggested you can use the PICAXE PWM functions.
 

Jarubell

Senior Member
Thanks westaust55, the plan is to run the fan at full speed.

In the past when I played with PICAXEs I just have been using an old cell phone charger or a 5V regulator with batteries. This time I need 12 volts for the fan and I figured I would use my regulator, not with the caps I now see in the manual, off the same power supply. It took me a while to figure out that my issues was with my power, or at least I think so. I now have the 12V supplying just the fan and another power supply for the PICAXE. I have no clue why this happened and am left wondering by not using the capacitors, like the in manual 1, pg26, all would be well.

Jarubell
 
Top