The argon hat has a config file which shows the temperature and fan speeds.
Dumb question:
If I want to change the values can I edit the file or do I have to run the config program which is on the desktop?
Is that file dynamically monitored?
I have just had a discussion with someone about the speed of the fan.
It was suggested that the fan is turned on at a temperature to a value that will only stop temperature increase. NOT decrease it.
If it increases beyond another value it increases a bit more, and soon to a level where you then turn the fan to 100%.
But ITMT, the fan doesn’t reduce the temperature.
Alas even at 8% speed, it cools the temperature to below the lowest value and so it stops.
Which is how I have/had it set anyway.
If it got above a temperature it turns on (Not to FULL) but the nominal speed cooled the device and then it gets below the lower temp’ and so the fan stops.
Well, that was a whole discussion I had with someone about how fans are supposed to be used.
(Say)
It is set to turn on at 50deg with 50% speed… example
This will knock the temperature below 50deg quickly.
Therefore: The fan will be turned off.
Soon after the temperature will get above 50deg and the fan will turn on again. (repeat)
This constant starting and stopping of the fan can be annoying.
It is suggested that the fan (at the first speed) stops things getting hotter than they are.
As CPU load increases the temperature goes up.
If this increase can’t be handled by the fan at the initial speed, and it gets to the next value, the fan speed is increased (slightly) to lower it back to the first range.
This way the fan is always running just the speed varies and so MAY be less annoying.
My question was more:
Is the file dynamically monitored or do I have to use the supplied program to edit it?
Hi Andrew
Don’t know anything much about this Argon hat so maybe a RPi Guru can help out here.
In defence of the designer of that system I would think (as he or she would have no idea of individual cases) that they would have to design for worst case. That is the device being cooled is being flogged to near maximum capacity and the fan would be running at some speed at all times.
In fact quite a while ago on this Forum it seemed like a sort of sport where there were some who appeared hell bent on destroying these RPis with overclocking etc to see how hot they would go before fizzling out. I think some even tried liquid cooling at some stage.
Cheers Bob
Argon make a few hats which include fans, I just wanted to check if this one was the particular fan you had in your setup?
This fan by default with no software installation will run at 50% speed indefinitely. Argon provide a one-line-installer script you can run which configures the fan and button to give them some basic functionality within Pi OS. If you haven’t already run it the one line installer is: curl https://download.argon40.com/argon1.sh | bash
If the installer is used the fan will be setup to run at 10% above 55°C, 55% above 60°C, and 100% above 65°C. The installer will also add some desktop shortcuts you can use to open some easy configuration.
The actual configuration that the installer is doing is handled by the Device Tree Overlay, so you’ll find some dtoverlay lines added in your Pi’s config.txt file. The device tree is setup as part of boot so edits here likely won’t take effect dynamically and you’ll need to reboot the Pi before changes are applied to the fan’s speed profile.
Since you can define a different fan threshold to each temperature setpoint you could try defining a profile with 10 or so points then run a 30 minute temperature stress test. By checking what temperature your Pi gets to during the test you should be able to correlate how each fan speed is performing pretty quickly.
Trent may have this HAT confused with the PoE/+ HATs. Those hats are controlled by dtoverlay (device tree overlay) commands, these ones are a bit more simple.
FWIW, desktop motherboard fan curves tend to be interpolated linear or exponential curves for this reason, it means the temperature will settle into a steady state if the load is constant, which sounds like what you want. e.g. something like this:
As for how to achieve this, I did some digging, and the “fan daemon” just calls the power button script:
Which commands the fan with I2C commands:
The key bit being what get_fanspeed() returns:
In essence, the code above will loop through each pair of temperature thresholds and fan speeds you set in the config, and if the current temperature is greater than a threshold, it sets it to that (overwriting a each lower value until the current temperature is no longer above the threshold in question). It returns a string casted to a float casted to an int, with no mapping, so my guess is that you can simply write a number from 1-100 with that bus.write command, and the fan will follow suit!
There are some extra processing steps I didn’t mention, like not driving the fans under 25% (they may not spin), and waiting 30s after turning the fan on to turn it off again (a crude form of dealing with hysteresis). You can choose to implement these or not depending on whether or not your testing reveals they are needed or not.
In other words, this is a simple python script that you can hijack to do your bidding. You could modify it to have proper analog control, where temperature values are smoothly mapped to fan values.