sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

PWM driven fan according to temperature

Wed Aug 05, 2015 2:41 pm

I don't know this is the right place to post this,if not you can change to other section.

I am a total noob to raspberry Pi and Raspbian Os.Hence I need ur help.
I got my Raspberry pi2 recently with heatsink,fan etc.And I don't know how to connect the fan (i know raspberry pi don't need fan but I got it with my pi).
The spec of fan is 5 volt 0.12A.
My question is how I connect the fan working under PWM according to Temperature.I searched the forum and got confused with many topics for connecting fan via pwm.
which is the best one .
Help me as I am a noob

User avatar
DougieLawson
Posts: 38467
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 3:32 pm

To drive your 100% useless fan from a GPIO you're going to need a MOSFET controller circuit.

BTW, don't bother with the heatsinks they're 100% useless too.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 4:01 pm

can u point me to a the best circuit in forum.

and is there any coding required to work.

scotty101
Posts: 3934
Joined: Fri Jun 08, 2012 6:03 pm

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 4:11 pm

You do not need a fan. You do not need a heat sink.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
joan
Posts: 14843
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 4:16 pm

There is more than one type of fan. They are not all controlled in the same way,

User avatar
rpdom
Posts: 16725
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 5:09 pm

Connect one wire from the fan to pin 6 on the Pi. Connect the other wire to Pin 39. If there is a third wire connect it to pin 25.

That will make sure the fan does not start as long as your Pi is not overheating.

:D
[edit for clarification]
This is not a serious suggestion. The fan will never turn on with these connections. Pins 6, 25 and 39 are all 0V Ground pins and no voltage will flow at any time.
Last edited by rpdom on Sat Aug 08, 2015 6:04 am, edited 1 time in total.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 5:18 pm

rpdom wrote:Connect one wire from the fan to pin 6 on the Pi. Connect the other wire to Pin 39. If there is a third wire connect it to pin 25.

That will make sure the fan does not start as long as your Pi is not overheating.

:D
:lol: :lol: :lol: :lol:
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 5:24 pm

is this a circus? some jokers roaming here saying jokes and laughing at their own.

:shock:

User avatar
rpdom
Posts: 16725
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 5:28 pm

sabareeshchambayil wrote:is this a circus? some jokers roaming here saying jokes and laughing at their own.
We are saying that you could build a circuit and write software that would turn on the fan if the Pi got too hot - but as the Pi will never get too hot it is a total waste of time, money and effort. Sorry :(

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 5:32 pm

I know that but I enjoy doing somethin interesting that's why I ask you guys
and
these are the posts I found

viewtopic.php?t=53233&p=469890

viewtopic.php?t=84641&p=598856

viewtopic.php?t=30347&p=660183

imgur.com/a/lF6qg

m.instructables.com/id/Automated-cooling-fan-for-Pi/?ALLSTEPS

MarkTF
Posts: 314
Joined: Tue Mar 03, 2015 4:59 pm

Re: PWM driven fan according to temperature

Wed Aug 05, 2015 6:28 pm

Of those, the "instructables" link probably has the greatest chance of working, doing no damage to your Pi, and leaving you with parts that may eventually be re-purposed to do something more useful.

paulv
Posts: 562
Joined: Tue Jan 15, 2013 12:10 pm
Location: Netherlands

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 6:35 am

Just for the sake of learning how to use pwm to control a fan, look at the schematic and Python code in this old post: viewtopic.php?f=35&t=62438&p=463458

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 9:06 am

paulv wrote:Just for the sake of learning how to use pwm to control a fan, look at the schematic and Python code in this old post: viewtopic.php?f=35&t=62438&p=463458

What I am supposed to do with the Python or C++ coding in many of the posts as I don't know anything about python or c++?

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 10:14 am

sabareeshchambayil wrote:
paulv wrote:Just for the sake of learning how to use pwm to control a fan, look at the schematic and Python code in this old post: viewtopic.php?f=35&t=62438&p=463458

What I am supposed to do with the Python or C++ coding in many of the posts as I don't know anything about python or c++?

the code to pwm drive a fan according to temperature

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 10:21 am

sabareeshchambayil wrote:
paulv wrote:Just for the sake of learning how to use pwm to control a fan, look at the schematic and Python code in this old post: viewtopic.php?f=35&t=62438&p=463458

What I am supposed to do with the Python or C++ coding in many of the posts as I don't know anything about python or c++?
Just run the code. It will work even if you don't understand it.

Or look at code and figure out how it works, then you will know everything about driving your fan with PWM (and you can use that knowledge for other things in the future).

Heater
Posts: 15361
Joined: Tue Jul 17, 2012 3:02 pm

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 10:48 am

sabareeshchambayil,
What I am supposed to do with the Python or C++ coding in many of the posts as I don't know anything about python or c++?
When you say you don't know anything about Python or C++ I am going to assume that not only do you not know how to write programs in Python or C++ but you generally don't know how to write programs in any language. Further that you have no idea how to take C++ source code and compile it into a runnable program. Or perhaps even how to run a Python program from the command line.

Basically I assume you know nothing.

Your first task then is to learn something about programming. How to write simple programs and get them to run.

I suggest that you start with the Python language. It is a lot easier to use and learn for beginners than C++. C++ is a big and complex language with many features that can be quite baffling to a beginner.

I suggest you search around for some beginners tutorial on Python. I'm sure there are many around the net. Perhaps even on RaspberryPi.org. Or I like this one: http://learnpythonthehardway.org/

Have fun.
Memory in C++ is a leaky abstraction .

User avatar
experix
Posts: 204
Joined: Mon Nov 10, 2014 7:39 pm
Location: Coquille OR
Contact: Website

Re: PWM driven fan according to temperature

Thu Aug 06, 2015 2:30 pm

I got my Raspberry pi2 recently with heatsink,fan etc
Are you saying you got some sort of kit that includes the heatsink and fan? Who is selling that and why?

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Fri Aug 07, 2015 8:24 am

experix wrote:
I got my Raspberry pi2 recently with heatsink,fan etc
Are you saying you got some sort of kit that includes the heatsink and fan? Who is selling that and why?

Yes it's from aliexpress

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: PWM driven fan according to temperature

Fri Aug 07, 2015 8:58 am

Anything for profit!!
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2291
Joined: Thu Jul 11, 2013 2:37 pm

Re: PWM driven fan according to temperature

Fri Aug 07, 2015 8:32 pm

rpdom wrote:Connect one wire from the fan to pin 6 on the Pi. Connect the other wire to Pin 39. If there is a third wire connect it to pin 25.

That will make sure the fan does not start as long as your Pi is not overheating.

:D
Please refrain from bait-posting. The forums are for assisting users with their questions regarding care and feeding of their Raspberry Pi, not encouraging them to destroy it through asinine posts such as yours.
Rockets are loud.
https://astro-pi.org

User avatar
rpdom
Posts: 16725
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: PWM driven fan according to temperature

Fri Aug 07, 2015 8:37 pm

jdb wrote:
rpdom wrote:Connect one wire from the fan to pin 6 on the Pi. Connect the other wire to Pin 39. If there is a third wire connect it to pin 25.

That will make sure the fan does not start as long as your Pi is not overheating.

:D
Please refrain from bait-posting. The forums are for assisting users with their questions regarding care and feeding of their Raspberry Pi, not encouraging them to destroy it through asinine posts such as yours.
Sorry :(

It was not intended that way. The pins I specified are all ground pins and will cause no damage. I wouldn't want anyone to damage their Pi at all.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2291
Joined: Thu Jul 11, 2013 2:37 pm

Re: PWM driven fan according to temperature

Fri Aug 07, 2015 10:33 pm

rpdom wrote: Please refrain from bait-posting. The forums are for assisting users with their questions regarding care and feeding of their Raspberry Pi, not encouraging them to destroy it through asinine posts such as yours.
Sorry :(

It was not intended that way. The pins I specified are all ground pins and will cause no damage. I wouldn't want anyone to damage their Pi at all.
You and I know that. However, new users may interpret your instructions (or misinterpret them) in any number of ways which will cause their Pi to cease to function.
Rockets are loud.
https://astro-pi.org

User avatar
rpdom
Posts: 16725
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: PWM driven fan according to temperature

Sat Aug 08, 2015 6:05 am

jdb wrote:You and I know that. However, new users may interpret your instructions (or misinterpret them) in any number of ways which will cause their Pi to cease to function.
Original post edited for clarification.

sabareeshchambayil
Posts: 26
Joined: Wed Aug 05, 2015 1:59 pm
Location: Kerala
Contact: Yahoo Messenger

Re: PWM driven fan according to temperature

Sat Aug 08, 2015 8:27 am

rpdom wrote:Connect one wire from the fan to pin 6 on the Pi. Connect the other wire to Pin 39. If there is a third wire connect it to pin 25.

That will make sure the fan does not start as long as your Pi is not overheating.

:D
[edit for clarification]
This is not a serious suggestion. The fan will never turn on with these connections. Pins 6, 25 and 39 are all 0V Ground pins and no voltage will flow at any time.

A pi user should be helping to others not to mislead them.

Anyway thanks for correcting ur mistake

User avatar
joan
Posts: 14843
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: PWM driven fan according to temperature

Sat Aug 08, 2015 8:34 am

sabareeshchambayil wrote: ...
A pi user should be helping to others not to mislead them.
...
Nobody mislead you. In my opinion you have shown no interest in trying to learn and that is intensely irritating to some of us.

Return to “General discussion”