FanDuino v2.0 !
I am currently reworking the fan controller project a different way. I dropped the Arduino Mega and the touch screen. The controller has been replaced with a much more powerful Arduino Due and the display with a simple 2x16 LCD. The Due allows as many IRQ inputs as needed, and the higher clock frequency gives a far better accuracy for RPM measurements. It also allows a better control of PWM outputs : just two #define have to be modified in a header in order to get exactly 25KHz : no need to tweak prescalers or other tricky things.
The controller will fit in a modded CD reader case. There will be a "motherboard", a 2x16 or 2x20 display, some buttons and a rotary encoder. Most of the parameters will be entered with a Windows app.
The perfect case : an old CD reader, easy to take apart. It is a very common model, still avalaible : Cyber Drive 240D, picked in my junk.
The idea : a "motherboard", designed as a custom breakout board.
The actual controller, on my homebrew poor man's ELVIS (National Instruments ELVIS is an amazing but extremely expensive breadboard) : Arduino Due + USB module + Bluetooth module. The Arduino Due has two USB ports, but using an external one makes it easier to customize, for example to get an explicit "FanDuino xxx" in the Windows Device Manager. I test with the front push pull only. No need to connect all fans and pump.
The Windows app is a tray application. It displays information about CPU, GPUs, fan speeds, temperatures. Unfortunately, there is no mean to change GPUs fans behaviour and turn PWM out into a "temp sensor". Using NVAPI, I found that fan controllers are GPU enbeded, and the "end user" NVAPI offers no useful fan function for this project. Maybe the "Non Disclosure" (NDA) version does, but I am sure I will never have access to.
One can read some information with the "end user" version : temps, but not power % (it is stupidely reserved to registered developpers. Why ??????? Intel API return this information for i7 and others).
The fan control is the most useful feature. I coded Arduino routines for automatic calibration. The controller can determine start, max, and stall PWM duty cycle and speeds, ramping and coasting durations, and records the response curves. It communicates with the Windows software.
Each and every PWM channel has its own custom control curve, and there is a general cooling slider. It works the same that Afterbuner/PrecisionX, with control nodes. This tab gives a quick view of the fan custom curves : red = fan inactive, magenta to blue gradient : between stall and start speed (need special control), green gradient = normal. The yellow vertical line shows the main control, relative to the custom curves.
Curves can be displayed clicking the ListView control. Two tabs : control curve and fan response. Here, how I want to control push pulls. On my rig, push pull adds little cooling but lots of noise. So, I want to run the second fan group of the push pull only near the end of control curve : the second fan group will run only when main slider is set from 80% to 100%. I also want the fans not start all together : this rad will start getting air when slider is > 20%. And I dont want the fans to receive a PWM signal of more than 80% (see below for explanations)
The fan response curve is plotted, and helps to noise optimization. On this curve, one can see control hysteresis (stall vs start). This curve also shows what happens when PWM duty cycle is more than 80% : speed stays nearly the same all the way, and is unstable. The curve does not show the consequence, but blieve me : an unstable fan produces lots of noise. So it must not to be run at more than 75-80% : it will produce only produce noise, not air.
Coding is not that easy, as I have many C++ classes to be compiled under two environments : Visual C++ and Arduino (probably GCC). Communications through USB and Blutooth are also difficult : I found no suitable libraries, so I have to do my own. And I have no emulator/debugger for Arduino : trial and error is the only way. It is really time consuming.
I also began to trace smartmontools sources with the debugger in order to understand how to access SMART information (for temps) through Intel ICHR. Sources are not commented, and very hard to read... There is absolutely no information on the web.
post edited by schmorblatz - 2014/12/10 17:52:44