element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino As PC Fan Controller
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 16 replies
  • Subscribers 394 subscribers
  • Views 3247 views
  • Users 0 members are here
Related

Arduino As PC Fan Controller

nicolaoscon96
nicolaoscon96 over 7 years ago

Hello there,

 

It's been a while to write here and I came back with a question. I want to build a fan controller for my desktop pc and I wanted to build it with an Arduino (Just add some modes like gaming for full speed, office use for lower rpm and less noise)>>Where I will be able to control by sending a  number for example 1 for gaming mode 2 for office<<. I found some online and they are really cheap but I wanted to experiment with that. So I wanted to ask is this possible? Can I control (4 fans) with an Arduino and get feedback from them about the RPM and the voltage if it possible(have it connected with USB on my computer and read the output in Arduino IDE)? The fans that am using are 3 pins (black-red-yellow).

 

Thanks

nicolaoscon96

  • Sign in to reply
  • Cancel

Top Replies

  • koudelad
    koudelad over 7 years ago +7
    Hello, Honestly, the 8-bit microcontroller in Arduino won't have enough resources to do that. It only has 2 8-bit counters and one 16 bit counters. If you want to monitor 4 fans independently, you need…
  • shabaz
    shabaz over 7 years ago +6
    Hi Nicolas, If you want to do it accurately, as David says, you'll need different hardware. According to the link here: How PC Fans Work the three-wire fan uses it's third wire to provide speed feedback…
  • shabaz
    shabaz over 7 years ago in reply to gdstew +4
    Getting RPM feedback actually isn't the end goal. Why not sometimes actually try to understand the requirement, and form a more complete answer that helps the user? Just an opinion I've formed over the…
Parents
  • shabaz
    shabaz over 7 years ago

    Hi Nicolas,

     

    If you want to do it accurately, as David says, you'll need different hardware. According to the link here: How PC Fans Work the three-wire fan uses it's third wire to provide speed feedback (tacho). For something that could perhaps work with the Arduino, you could build a circuit to convert the tacho output into a voltage, and read it via the ADC. A 555 would do it (google '555 monostable' and append an RC integrator to it). But it is effort that may not be needed, if you don't care about the precise speed, and just want to have a slow fan, or a fast fan. It would likely be cheaper and easier to buy the fan controller. Also, I'm not sure it is good to play with fan speeds because I think usually the PC will do that, to keep itself cool, and also to power off if the fan fails.

     

    Anyway if you really do want to control the speed yourself, as mentioned the 4-pin option is easiest, otherwise you could use a MOSFET to chop the power (i.e. use PWM library on the Arduino) to the red and black wires on the 3-wire fan. For an example circuit (there are many ways to do it, this is just one example), see here:

    image

    The recommended part is IRLD120PBFIRLD120PBF.

    • Cancel
    • Vote Up +6 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 7 years ago in reply to shabaz

    Tach outputs on fans are open collector transistor pulse outputs (usually one or two pulses per revolution). The only

      circuit they need is a pull up resistor (I used 4.7K on a 6 input fan monitor I built using a AT89c51) to +5V.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 7 years ago in reply to gdstew

    Yeah, I think the issue is with the coding. Sure you can do it, but this is a beginner asking how to do this with Arduino - nothing is impossible to code, even video output with an Arduino! but it's not pretty with the limited resources on the Arduino.

    And furthermore, technically it's not even needed, to meet the actual goal in the question "add some modes like gaming for full speed, office use for lower rpm and less noise". Context is everything.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 7 years ago in reply to shabaz

    "Yeah, I think the issue is with the coding."

     

    The original post is clearly hardware oriented and does not ask about the coding to do it. Your response is also hardware oriented with no mention at all about an issue with coding.

     

     

    "And furthermore, technically it's not even needed, to meet the actual goal in the question "add some modes like gaming for full speed, office use for lower rpm and less noise". Context is everything."

     

    From the original post:

    "Can I control (4 fans) with an Arduino and get feedback from them about the RPM and the voltage if it possible(have it connected with USB on my computer and read the output in Arduino IDE)?

     

    I directly responded to your reply about "extra circuitry needed to provide speed feedback (tacho)" so context was fully observed.

     

     

    As you mention a commercial fan controller is by far the easiest but I do not know if any of them offer a way to do the gaming/office mode selection Nicolas asks about. It would seem like something

    obvious to add to a standard fan controller.

     

     

    "Also, I'm not sure it is good to play with fan speeds because I think usually the PC will do that, to keep itself cool, and also to power off if the fan fails."

     

    As far as I know the only situation normally used to power down a PC is when the CPU overheats which relies on the CPU temperature sensor. Fan failure usually generates an audio alarm via the

    PC speaker and usually displays a fan failure message during boot unless fan monitoring is turned off in BIOS.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 7 years ago in reply to gdstew

    Getting RPM feedback actually isn't the end goal. Why not sometimes actually try to understand the requirement, and form a more complete answer that helps the user? Just an opinion I've formed over the years seeing your replies.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 7 years ago in reply to shabaz

    "Getting RPM feedback actually isn't the end goal"

     

    I never said it was, but it was clearly listed as something that he wanted to do (if possible, and it is) and you spent

    a full paragraph of your response on it. I replied to that response from you simply to point out what the tach output

    actually was and what kind of external circuit was needed to sense it. And for some inexplicable reason you have a

    problem with that.

     

     

    "Why not sometimes actually try to understand the requirement, and form a more complete answer that helps the user?

    Just an opinion I've formed over the years seeing your replies."

     

    Despite your "opinion" otherwise I had no problem understanding the requirements and I'm sure the description of the

    motor tach output did indeed help the user, please notice 4 of 4 people found it useful. Somehow I don't think you

    did. I will withhold any opinions I've formed over the years from your responses (especially to me, see first paragraph

    above) as I don't really see how it is any more relevant than yours is to this discussion.

     

    P.S. the circuit you gave to control the fan motor will not work very well. For many years now PC fans have used

    brushless motors with their own internal motor controller ICs and rapidly turning the voltage to the motor controller

    on and off as would happen with the circuit you gave is in general not a good idea and will almost certainly cause

    the fan motor to "rattle". This was a common complaint with some early commercial fan controllers. If you want

    to PWM a fan that does not have a PWM input you need to integrate the output of the transistor circuit to produce

    a variable the voltage to the motor. This has a limited range as most fan motors will not run below around 5V and

    they may require the full 12V to start. Still it would probably be good enough to fit the requirement given.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 7 years ago in reply to gdstew

    What's with the quote-marks around "opinion" : ) I didn't ask you for your formed opinion, nor to withhold it. Open up and release it if you like. It's your choice.

    Here's mine: Gary, you've always had issues. Not just with me, but others who have sadly left over the years too.

     

    Just an example - it's clear what your opinion is/was of your peers here - this was one of your very first interactions on the forum with your peers or inmates at the asylum as you termed them:

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • shabaz
    shabaz over 7 years ago in reply to gdstew

    What's with the quote-marks around "opinion" : ) I didn't ask you for your formed opinion, nor to withhold it. Open up and release it if you like. It's your choice.

    Here's mine: Gary, you've always had issues. Not just with me, but others who have sadly left over the years too.

     

    Just an example - it's clear what your opinion is/was of your peers here - this was one of your very first interactions on the forum with your peers or inmates at the asylum as you termed them:

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • gdstew
    gdstew over 7 years ago in reply to shabaz

    "What's with the quote-marks around "opinion""

     

    It is an "opinion" that few in this discussion shared, at least about the topic under discussion and in other ones as well. Not surprised that you would

    "miss" that even after I explicitly pointed it out to you.

     

     

    "I didn't ask you for your formed opinion, nor to withhold it."

     

    I didn't ask for yours either and I don't see how it was helpful to anybody in this post, not sure why you do. As I already stated I don't really think my

    opinion of you is helpful here either.

     

     

    Speaking of issues:

     

    Why don't you stick to the topic at hand and actually answer the question about why you think an accurate description on the tach output of a fan

    and what was required to interface to it was not helpful to somebody who wanted to use it? As to integrating the tach output these are fairly short

    pulses spaced relatively far apart so it would take a while to settle to a fairly accurate reading and of course some method of calibrating the voltage

    to RPM conversion would also be required. David had already described the micocontroller hardware needed to use a pulse tach output (a 16 bit

    counter with capture) and that the Arduino did not have enough counters to do everything required in the original post. It requires no external

    circuitry other than a pull up resistor, is fairly easy to implement in software (I know, I've done it in 8051 assembly), and doesn't require calibration.

     

     

    P.S. Thanks for taking my responses completely out of context to the discussion that was ongoing at the time on that particular forum as I noted

    in one of those responses. There were more than one or two "crazies" on there at the time and I was not the only one to say so. I would also like

    to note that a few of those "crazies" managed to get themselves banned from this web site, and I didn't.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 7 years ago in reply to gdstew

    It is clear how you felt about your peers at the time, and that's just one documented example.

    You might call them 'crazies', I'd say it says more about you that you're willing to write off people like that.

    Just an opinion (and not a particularly high one of you as a result).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to gdstew

    that a few of those "crazies" managed to get themselves banned from this web site, and I didn't.

    Actually there has only ever been one banning from element14 and it wasn't for that behaviour.

     

     

     

    All this petty arguing is not helping the OP.

     

    So can I suggest you start another discussion, where you can both discuss it.

     

     

    Thanks

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube