How do I control multiple 12V fans? (which components do I need?)

1,325 views
Skip to first unread message

shawly

unread,
Mar 24, 2015, 9:34:06 AM3/24/15
to pi...@googlegroups.com
Hi there,

I want to control up to 6 fans separately with my Raspberry. For that I wanted to implement a webapp with Spring MVC and Pi4J which allows me to control each fan separately.
I also wanted extend the functions with some thermal sensors to control every fan automatically but that will be done later, first I need to get the manual controls working.

Since this is my first time doing something with the GPIO pins on my RPi, I wanted to know which parts do I need to accomplish this project, apart from the obvious RPi, fans, cables and a pinboard.
I wanted to use six Enermax T.B. Silence 3-pin fans, which consume 0.9W at 12V input, or should I get 4-pin PWM fans??
Since the fans will never run at the same time and at maximum speed a 12W power supply would be enough am I right?

Apart from the power supply, what else do I have to buy?
Probably a capacitor? Do I need resistors?
Can I use this http://www.adafruit.com/products/2327? I don't know if this would even work with fans (since they aren't really pwm fans) and Pi4J..
If I'd use the servo hat I probably wouldn't need a pinboard and the resistors right?

Can someone also tell me how I have to hook this thing up if I can't use the Adafruit Servo HAT?

I'm sorry for asking, but I never did something like this and also couldn't find any other tutorials except the one for the servo hat which usees the Adafruit python library,
but I would like to use Pi4J since I'm not really familiar with python and creating webapps with python.

shawly

unread,
Mar 25, 2015, 11:36:45 AM3/25/15
to pi...@googlegroups.com
/push

Robert Savage

unread,
Mar 26, 2015, 10:16:56 AM3/26/15
to pi...@googlegroups.com
Do you care about variable speed control of the fans or just ON/OFF control?
Simple ON/OFF would be pretty simple using some relays and GPIO pins. 

shawly

unread,
Mar 26, 2015, 10:21:46 AM3/26/15
to pi...@googlegroups.com
Yeah I wanted to control the speed of the fans.
But considering using low rpm fans which won't create too much noise, on/off would really be enough I think.
How would I do that? Could you tell me which components I'd need and how I connect them?

Robert Savage

unread,
Mar 26, 2015, 10:51:21 AM3/26/15
to pi...@googlegroups.com
Fundamentally, you need some other circuit to actually control the power to the fans.  The RPi itself cannot provide enough power directly via it's GPIO pins.
The simplest approach is to use a Relay board.  You will use the GPIO pins to control the relays.  The GPIO pins is set to either HI (+3.3VDC) or LO (0VDC) which acts as a control signal to the relay board.  The relay board will then switch the power ON/OFF to the device you want to control, in this case fans.

Here are a few examples of 12 VDC powered relay board:

You need a single relay per fan.

You would not power the Relay board with the Raspberry Pi, but rather potentially the same power supply you are using to power your 12 VDC fans.  

Personally, I tend to only buy relay boards that can be configured as ACTIVE-HI and ACTIVE-LOW.  This feature provides greater flexibility for your projects and compatibility with the Pi.  

The relays will make a clicking noise when switching ON/OFF.  If you are looking for a completely silent solution we may have to look at a solid state relay or transistor solution.

PS, I'm no hardware expert, so if any other readers have input, please chime in :-)

Thanks, Robert










shawly

unread,
Mar 26, 2015, 10:58:25 AM3/26/15
to pi...@googlegroups.com
Great, thank you!
I have no problem with the clicking noise, since my 433mhz plugs and my master/slave plugbar also make clicking noises when switching on and off.

For powering the fans etc. I wanted to use a 12V and 2A powersupply like this: http://www.ebay.com/itm/AC-85-245V-To-DC-12V-2A-3A-5A-6A-8A-10A-Power-Supply-Adapter-For-Led-Light-Strip-/380984174673?pt=LH_DefaultDomain_0&var=&hash=item58b46d2851
Six of the fans I'm planning to use consume about a total of 1W at 12V input voltage, so that psu should be enough am I right?

shawly

unread,
Mar 26, 2015, 10:59:41 AM3/26/15
to pi...@googlegroups.com
I mean 1 watts per fan!

Robert Savage

unread,
Mar 26, 2015, 11:24:57 AM3/26/15
to pi...@googlegroups.com

watts = amps × volts

watts = 2A × 12V = 24W (TOTAL POWER BUDGET)

6 fans X 1W each = 6W 

6 relays X .45W each = 2.7W (relay coil consumption taken from here: http://www.ebay.com/itm/10pcs-12-VDC-SONGLE-Power-Relay-SRD-12VDC-SL-C-Type-/270790418296)


Some power will be consumed by the relay board's LEDs, OptoCouplers, and transistors but with 15W still available after the relay coils and fan -- you should have plenty of overhead! 


Reply all
Reply to author
Forward
0 new messages