{"id":166,"date":"2019-02-24T20:30:26","date_gmt":"2019-02-24T20:30:26","guid":{"rendered":"http:\/\/pi.peernix.com\/?p=166"},"modified":"2019-02-24T20:30:26","modified_gmt":"2019-02-24T20:30:26","slug":"arduino-pc-fan-control-and-rpm-reading","status":"publish","type":"post","link":"http:\/\/peernix.com\/?p=166","title":{"rendered":"Arduino PC Fan control and RPM reading"},"content":{"rendered":"\n<p> This article is on the final revision of the Arduino Fan control board \u201cCoolRunnings\u201d. I\u2019ve written about the first two revisions, from the board that I etched myself, to the first one from a board house, which still contained a <a rel=\"noreferrer noopener\" aria-label=\"boost converter (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Boost_converter\" target=\"_blank\">boost converter<\/a>. After that one, I designed one to be powered with a barrel jack, so as to supply 12v to the fans directly, no boost converter involved. That was version 3, and I was pretty satisfied with it, but needless to say, there were some small bugs, and some design issues that I wanted changed, so I\u2019ll be covering CoolRunnings version 3.1 in this article, as it is based on the most recent hardware revision of the control board.<\/p>\n\n\n\n<p>Here, I\u2019ll attempt to go over the changes that occurred between hardware version 2 and 3.1. Version 3 saw the biggest changes, mainly moving from the use of a boost converter to power the fans from USB power solely, to using a barrel jack and a 9-12v supply voltage. USB simply wasn\u2019t able to cut it in terms of power delivery. Reading of the <a rel=\"noreferrer noopener\" aria-label=\"hall effect sensors (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Hall_effect_sensor\" target=\"_blank\">hall effect sensors<\/a> was optimized, testing was done with multiple types of fans, and a configuration that worked best for the largest variety of fans was achieved.<\/p>\n\n\n\n<a href=\"https:\/\/ibb.co\/TMB4g2X\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/Xbjxy2P\/small-2019-02-24-13-38-14.png\" alt=\"small-2019-02-24-13-38-14\" border=\"0\"><\/a>\n\n\n\n<p>USB was still present, responsible for serial communication to the board. The USB jack type moved from USB type B, to mini USB, finally to the very common and miniature micro USB. Due to the issue of having to hardcode one wire bus sensor IDs, and the difficulty of trying to program the identification of the sensors on the fly, dual <a rel=\"noreferrer noopener\" aria-label=\"One Wire Buses (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/1-Wire\" target=\"_blank\">One Wire Buses<\/a> were added. Now, temperature sensors can be hot-swapped instantly, without modification of the code.  These changes and a few more dealing with changing part footprints are what let to version 3.1.<\/p>\n\n\n\n<p> Many changes in software have also occurred. Optimizations, and changes related to dual One Wire Bus were made. The <a rel=\"noreferrer noopener\" aria-label=\"EEPROM (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/EEPROM\" target=\"_blank\">EEPROM<\/a> was made use of, to hold on to changes in user set values. Different settings for fan control power were created. In addition to the old three speed settings, a continuously variable fan power function was created, to make fan power more linear over temperature differential.  The software project was also put on <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Github (opens in a new tab)\">Github<\/a>, so additional changes, which are too many to name can be found, if desired.<\/p>\n\n\n\n<a href=\"https:\/\/ibb.co\/tsFD2sB\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/bbMQ0qR\/small2018-04-17-21-26-37-1.jpg\" alt=\"small2018-04-17-21-26-37-1\" border=\"0\"><\/a>\n\n\n\n<p>Overall, I am currently satisfied with version 3.1, and have no plans for a future revision. Although, there are a few areas where I\u2019d be interested in experimenting with different designs ideas. One area is the use of <a rel=\"noreferrer noopener\" aria-label=\"MOSFETS (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/MOSFET\" target=\"_blank\">MOSFETS<\/a> instead of <a rel=\"noreferrer noopener\" aria-label=\"BJTs (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Bipolar_junction_transistor\" target=\"_blank\">BJTs<\/a>, but because there is no huge gain from this, it\u2019s on the back-burner, I\u2019d also like to experiment a bit more with fan RPM reading, as some fans read perfectly well, and others not at all. This is due to the difference in how some fans hall effect sensors are configured, but perhaps a more suitable configuration could be created to allow a greater variety of fans to be read. To make the temperature sensors less prone to polarity misalignment by users, I\u2019d also like to look into the use of <a rel=\"noreferrer noopener\" aria-label=\"keyed plug (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Electrical_connector#Keying\" target=\"_blank\">keyed plug<\/a> types, but this not being a commercial product at this time, this is also a very minor issue. Currently, the fan <a rel=\"noreferrer noopener\" aria-label=\"PWM (opens in a new tab)\" href=\"https:\/\/www.arduino.cc\/en\/tutorial\/PWM\" target=\"_blank\">PWM<\/a> runs at 30Hz, which is pretty low. This however doesn\u2019t seem to create any issues, and was selected as to produce no PWM noise in the fan, which was quite evident at the default four hundred something hertz. I also experimented with running the PWM at 60KHz, however, the current configuration of the power transistors doesn&#8217;t work well with PWM at that frequency, but with some experimentation, perhaps this could be changed, and any audible PWM noise would not be present, well.. at least for humans.  <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/acbaruth\/CoolRunnings\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Project Source Code (opens in a new tab)\">Project Source Code<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is on the final revision of the Arduino Fan control board \u201cCoolRunnings\u201d. I\u2019ve written about the first two revisions, from the board that I etched myself, to the first one from a board house, which still contained a boost converter. After that one, I designed one to be powered with a barrel jack,<\/p>\n<div class=\"more-link\"><a href=\"http:\/\/peernix.com\/?p=166\">Read More<\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[10,29,51,58,59,71],"class_list":["entry","author-datz","post-166","post","type-post","status-publish","format-standard","category-computerwelt","category-electronics","tag-arduino","tag-fan-controller","tag-pwm","tag-serial","tag-serial-interface","tag-usb-arduino"],"_links":{"self":[{"href":"http:\/\/peernix.com\/index.php?rest_route=\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/peernix.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/peernix.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/peernix.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/peernix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":0,"href":"http:\/\/peernix.com\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"http:\/\/peernix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/peernix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/peernix.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}