azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

12V fan without additional power supply - summary

Sun May 20, 2018 3:22 pm

Hello,

After reading a number of articles, I think I have finally got my head around this subject however as I have pretty much no knowledge about the electronic, I would really appreciate if someone could give me a little bit of reassurance/confirm my thinking is correct.

I have followed steps from this article https://hackernoon.com/how-to-control-a ... 13b6e7f92c and managed to successfully run 5V fan of the GPIO pins with a fairly good effectiveness but at the cost of not acceptable noise level.

I search for a quiter fans/type of fans and discovered hydro dynamic bearing system used in fan design. however I could not find a 5V version of the fan I hope will deliver noise level improvement - this is the 12V model which I eventually purchased http://gelidsolutions.com/thermal-solut ... -silent-4/ - I couldn't find any nice small (40mmx40mm fans with PWM so I decided to sacrifice ability to control fan speed, lets hope its silent enough). After reading more about powering 12V fans from the 5V GPIO pin it turned out that I need DC-DC 5V to 12V booster, I got one on eBay at a sensible price (https://www.ebay.co.uk/itm/XL6009-LED-D ... e-for-Ras/. However that particular set up requires NPN transistor that supports at least 300mA, like a 2N2222A https://www.centralsemi.com/get_documen ... 2N2221.PDF. I got at home S8050 https://www.fairchildsemi.com/datasheets/SS/SS8050.pdf and they look similar spec wise (at least for me :)). And here are the questions which I can't find an answer without deeping into understanding basic of electronic.
  • Can I use S8050 instead of 2N2222A?
  • Since I will not be using PWM, do I still need 1K resistor and diode?
  • am I right in thinking that DC-DC booster should be connected between the transistor and the fan? or does it have to be between GPIO and transistor?
  • Would it be easy enough to prepare a hardware set up which will be universal and work with my current fan without PWM but If I ever change the fan to something with PWM and to get PWM, it would be as easy replacing fan and perhaps connecting one extra wire?
Thank you,
Kind regards,
Tom.

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Sun May 20, 2018 7:43 pm

Trying to boost 5v to 12v is futile. You will draw a very large current for no benefit (12v fans at 12v are very noisy)
You can run most 12v fans directly off 5v. For a Pi, this is more than adequate unless you are really trying hard to melt it. In many cases, a fan isn't even necessary.

Also, with that 2N2222 transistor, you can convert a regular fan into a PWM controlled fan with a small amount of work.
User experiencing technical difficulties.

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Sun May 20, 2018 9:57 pm

Thanks for coming back to me, I have indeed tried to run this 12V fan on 5V but without my help with a finger it won't start spinning.
If you think that it may become noisy at 12V, do you think that setting voltage at 8-10V would be an option?

Thanks.

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Sun May 20, 2018 10:58 pm

Ah you've got a fan that doesn't play nice.

I'd consider 9volts, but you'll want a decent power supply feeding the Pi.
Put the negative terminal of the boost module to a ground pin and the positive to one of the 5v pins.
A transistor is only necessary if you want to turn the fan on and off separate to the Pi
User experiencing technical difficulties.

PhatFil
Posts: 235
Joined: Thu Apr 13, 2017 3:55 pm

Re: 12V fan without additional power supply - summary

Mon May 21, 2018 2:59 am

Imperf3kt wrote:
Sun May 20, 2018 10:58 pm
Ah you've got a fan that doesn't play nice.

I'd consider 9volts, but you'll want a decent power supply feeding the Pi.
Put the negative terminal of the boost module to a ground pin and the positive to one of the 5v pins.
A transistor is only necessary if you want to turn the fan on and off separate to the Pi
Im sure you are not suggesting connecting a 9v psu to the gnd and +5v pins of a pi??

i think you will want to use a NPN transistor (darlington?) that can handle the load the fan will draw to switch the +9v or +12v to the fan,
https://learn.sparkfun.com/tutorials/tr ... i-switches and the gnd of the pi and fan psu can and should be connected.

further circuitry such as an opto isolator between the pis 3.3v gpio pin and the transistor may be prudent

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Mon May 21, 2018 4:52 am

Of course not!
The Pi wants 5-5.25v

I was suggesting setting the boost module OP has, to 9v to power the fan, and to draw its power from the Pi's 5v rail and ground.
User experiencing technical difficulties.

User avatar
Z80 Refugee
Posts: 357
Joined: Sun Feb 09, 2014 1:53 pm

Re: 12V fan without additional power supply - summary

Mon May 21, 2018 8:07 am

azgooon wrote:
Sun May 20, 2018 3:22 pm
Hello,

After reading a number of articles, I think I have finally got my head around this subject however as I have pretty much no knowledge about the electronic, I would really appreciate if someone could give me a little bit of reassurance/confirm my thinking is correct.

I have followed steps from this article https://hackernoon.com/how-to-control-a ... 13b6e7f92c and managed to successfully run 5V fan of the GPIO pins with a fairly good effectiveness but at the cost of not acceptable noise level.

I search for a quiter fans/type of fans and discovered hydro dynamic bearing system used in fan design. however I could not find a 5V version of the fan I hope will deliver noise level improvement - this is the 12V model which I eventually purchased http://gelidsolutions.com/thermal-solut ... -silent-4/ - I couldn't find any nice small (40mmx40mm fans with PWM so I decided to sacrifice ability to control fan speed, lets hope its silent enough). After reading more about powering 12V fans from the 5V GPIO pin it turned out that I need DC-DC 5V to 12V booster, I got one on eBay at a sensible price (https://www.ebay.co.uk/itm/XL6009-LED-D ... e-for-Ras/. However that particular set up requires NPN transistor that supports at least 300mA, like a 2N2222A https://www.centralsemi.com/get_documen ... 2N2221.PDF. I got at home S8050 https://www.fairchildsemi.com/datasheets/SS/SS8050.pdf and they look similar spec wise (at least for me :)). And here are the questions which I can't find an answer without deeping into understanding basic of electronic.
  • Can I use S8050 instead of 2N2222A?
  • Since I will not be using PWM, do I still need 1K resistor and diode?
  • am I right in thinking that DC-DC booster should be connected between the transistor and the fan? or does it have to be between GPIO and transistor?
  • Would it be easy enough to prepare a hardware set up which will be universal and work with my current fan without PWM but If I ever change the fan to something with PWM and to get PWM, it would be as easy replacing fan and perhaps connecting one extra wire?
Thank you,
Kind regards,
Tom.
There are a few misconceptions here.

DC fans: Most fans can be operated PWM. This is the standard means for their speed (and therefore noise) to be regulated according to cooling demand. If noise is not a problem, you just operate a fan at full whack and get maximum cooling. When noise is a problem, you operate the fan thermostatically (ie regulate the fan according to the measured temperature of the item to be kept cool) by either turning it on and off, or running it from a supply that is modulated so that it averages at an intermediate voltage.

Some fans have a third wire: that is a speed sensor feedback signal. You don't need that. The fan you have can be operated PWM. You would probably have found that a 5V fan would have been quiet enough if you slowed it down (by PWM).

DC booster: Neat unit. To run the 12V fan from it, all you need to do is wire the 5V from the RPi to the booster, adjust the booster to give 12V out, and wire the fan to the booster output. I see no problem with that, the current requirement won't be ridiculous. You will be able to adjust the fan speed manually, simply by turning down the booster's output voltage.

PWM: Regardless, you can still operate the 12V fan PWM by RPi control if you want. 5V to booster, 12V from booster to fan, fan to transistor collector terminal, transistor emitter to 0V, PWM GPIO output signal via resistor to transistor base terminal.

Either of the transistors you have mentioned should work, but may get a bit hot. I would prefer a TO126 (package type) Darlington transistor such as BD679A https://www.ebay.co.uk/itm/BD679A-Trans ... Sw7z1Z6dFH (Darlingtons have high current gain and therefore won't struggle to drive the load from the current available out of a GPIO output). The TO126 package will be better at dissipating heat, and can easily have a heat sink fitted if further cooling is needed.

More info here, see "Hardware Interfacing": viewtopic.php?f=34&t=207597

A picture is worth a thousand words, so:

85109063-42C1-4C36-A23B-E3FDF776C744.jpeg
85109063-42C1-4C36-A23B-E3FDF776C744.jpeg (252.71 KiB) Viewed 1004 times

You need to check that the booster module has its 0V input terminal directly connected to its 0V output terminal for this circuit to work. The 1kohm resistor is to limit the current from the GPIO output pin, and the 10kohm resistor is to ensure the transistor turns off properly if the GPIO pin happens to be configured as an input (not necessary for BD679A).
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Tue May 22, 2018 11:44 pm

Hi and sorry for my late replay - beauty of the weekdays :)
Thanks again to all involved, in particular thank you for details explanation accompanied by the picture.
The whole concept is very promising and I think the only parts I am missing are 2 resistors 1K and 10K. I completely forgot about a few darlington transistors TIP122 which I have and I hope I can use as an alternative? Please correct me if I am wrong but these transistors have got built in functionality which will work as a flywheel diode? if this is the case, additional part working as a "security guard" won't be needed?

It looks like the XL6009 booster has its 0V input terminal directly connected to its 0V output terminal, please see result from the google search.
Image
Just to be clear, in the configuration from the picture, am I going to end up using 3 out of 4 on board connectors?

It happened that while studying dozens of articles I have came across RPM reading in RPI and when I managed to get my fan into motion, I started to see readings from the "3rd wire" - a little bonus in my mind :)

If I get ressistors by the weekend, I will do my best to assemble it all and if I will successful I definitely post the results if anyone will be looking to replicate at home.

Kind regards,
Tom

User avatar
Z80 Refugee
Posts: 357
Joined: Sun Feb 09, 2014 1:53 pm

Re: 12V fan without additional power supply - summary

Wed May 23, 2018 8:06 am

azgooon wrote:
Tue May 22, 2018 11:44 pm
I completely forgot about a few darlington transistors TIP122 which I have and I hope I can use as an alternative? Please correct me if I am wrong but these transistors have got built in functionality which will work as a flywheel diode? if this is the case, additional part working as a "security guard" won't be needed?
Yes, TIP122 will be fine. I forgot to add a flywheel diode in my concept sketch, but there is one built into the TIP122.
azgooon wrote:
Tue May 22, 2018 11:44 pm
I think the only parts I am missing are 2 resistors 1K and 10K.
There is a base drain resistor already built into the TIP122 so you don't need the resistor I have labelled as "10k". The 1k base series resistor is not critical, and could be anything between about 470R and 4k7 (too high and there won't be enough drive, too low and you will be demanding too much current from the GPIO output).
azgooon wrote:
Tue May 22, 2018 11:44 pm
It looks like the XL6009 booster has its 0V input terminal directly connected to its 0V output terminal, please see result from the google search.
Image
Just to be clear, in the configuration from the picture, am I going to end up using 3 out of 4 on board connectors?
Yes, that looks OK.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Wed May 23, 2018 10:25 pm

Hi,

Thanks for confirming. I got both resistors on order but they are silly money so nothing to worry about.
I hope that maybe I will get other bits and pieces tomorrow, if not it should be Friday.
Either way I will report back :)

Thanks.

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 1:07 pm

Hi,

As I mentioned last time, finally I got my new fan installed and its really quiet. I can also control RPM from the RPI however in my case, fan start to spin at 60-70% not like suggested in this article http://www.instructables.com/id/PWM-Reg ... e-for-Ras/ at 20%.
This doesn't cause any issues as I can easily reduce voltage on the booster and now triggering at the full blast isn't bad at all. Additionally I've equipped my pi with some passive cooling so my initial problem is now remote.

Image Image Image

I have however noticed that something (I cannot tell if this is an actual fan, booster or transistor) is making hardly noticeable ticking sound and to make it even stranger, this sound can be heard even if PWM is set to so low value that its not sufficient to put it in motion.

Any idea, what this can be?
Thanks,
Tom,

User avatar
Z80 Refugee
Posts: 357
Joined: Sun Feb 09, 2014 1:53 pm

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 5:03 pm

If you can't tell where it's coming from, don't worry about it.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 7:12 pm

either way, thank you a lot for giving me enough guide to complete this little project successfully - appreciated.

Regards

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 9:14 pm

The ticking could be the fan turning on and off. I have seen this behaviour when using certain python scripts to generate a PWM signal - some do it analog, some do it digital.

On a side note, could you perhaps perform an experiment for me? I'm curious to know how many amps the setup uses.

If possible, could you place a multimeter in series with the 5v line going to the booster and set it to read current?
I would really appreciate if this is possible.
User experiencing technical difficulties.

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 10:20 pm

You could be right that this is actually down the PWM - at some point I will try to find an alternative ways of sending control signal and will update this post if I will have any luck.

In ref to the measuring, I did try to check it just minute ago but when I touched input with multimeter probe, it reset my pi with a weird noise.
I am useless with electric so perhaps my settings on the multimeter are incorrect? That's what I have set:

Image

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Mon May 28, 2018 11:51 pm

Thats fine, if you are unfamiliar with how to do it I would not expect you to go to any trouble.

I have similar equipment at home that I can test with.

I can't see your image (viewing on a mobile phone) but typically you set the multimeter to the DC Amp meter at a value higher than you expect. A fan is less than 1A, so 2 should do.

With the probes in the ammeter plugs, one wire goes to the 5v coming from the Pi, the other goes to the 5v in on the boost module, essentially replacing the wire connecting 5v to the boost converter. All other wiring would remain unchanged.

A quick google may explain it better (more accurate) than I can.
User experiencing technical difficulties.

User avatar
Z80 Refugee
Posts: 357
Joined: Sun Feb 09, 2014 1:53 pm

Re: 12V fan without additional power supply - summary

Tue May 29, 2018 7:49 am

azgooon wrote:
Mon May 28, 2018 10:20 pm
I am useless with electric so perhaps my settings on the multimeter are incorrect?
They are!

Here's what you have been asked to do:

82F1EE2D-4131-4639-83AC-C4B1BE84ED34.jpeg
82F1EE2D-4131-4639-83AC-C4B1BE84ED34.jpeg (188.97 KiB) Viewed 746 times

The meter you have showed us has three probe connections. The bottom connection is for the -ve probe. The middle connection is for the +ve probe, for all meter ranges except the 10A range. The top connection is for the 10A range only, and is always connected to the -ve socket via a 0.01 ohm resistor.

The connections shown in your picture will only provide a meter reading with the dial set to the "10A" range. This is not a bad thing, because the 10A range uses the least series resistance to obtain a reading (the meter calculates current by measuring the voltage across a known resistance in the current path) - as long as the expected current is large enough to register on the meter at that range.

In this case it should be, so what you have to do is wire the meter as I have illustrated, using the connections as per your photo, but turn the meter dial to the 10A range.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Wed May 30, 2018 12:43 pm

Hi,

Thanks for the explanation given, I have got the measurements with settings on the multimeter being 10A.
It is 0.42/0.43A. I hope it helps.

Image Image

BTW, this is with the fun turned on at the full power, if the fan is off, the reading is only 0.03A

Regards,
Tom.

User avatar
Imperf3kt
Posts: 1017
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: 12V fan without additional power supply - summary

Wed May 30, 2018 2:21 pm

Thanks for taking the measurements.

~0.4A is a rather large amount of current (I can run my Pi3B off about 0.55A with the processor at 100% load)
Typically, a 12v fan should be ~0.15A so boosting the 5v to the required 12v appears to almost triple the current needed. still within the capacity the Pi can handle, but you certainly don't want to plug in two of them.
User experiencing technical difficulties.

azgooon
Posts: 9
Joined: Sun May 20, 2018 2:41 pm

Re: 12V fan without additional power supply - summary

Thu May 31, 2018 12:37 am

No problem at all.

I equipped my Pi with passive cooling as well which delivers quite impressive results hence I am not looking to get another fan :)
Either way good to know and thanks for highlighting this for the wider audience.

Once again appreciated your engagement guys!

Regards

Return to “Add-ons”

Who is online

Users browsing this forum: No registered users and 2 guests