PicoBorg ChilledPi set and forget temp control

I have tested both chilledpi scripts for a while in console and graphical desktop and they do work great but they aren't automated :( I ran out of brain power to alter chilledpi2.py and I can't understand how the fan & sensor parameter works. The sequence especially. What I need is:
1) I want run two 5 volt fans in push-pull.
2) Both on-off by temperature.
3) Loop until device is powered down / rebooted and start again.
Can sonemone help me undestand how to alter the code (below lines 59) ?
I have managed to get it work mostly unmodified and launch during rpi boot sequence by putting entry to /etc/rc.local :
# Automated SoC cooling script
sudo python /opt/fancontrol/chilledpi2.py &

Edit: cleaned

Images: 
piborg's picture

It sounds like you want to modify the settings for the fans on lines 45 to 48.

To only run two fans you will want to remove the two lines from the lFans which correspond to the outputs you do not care about.

To make the fans run at the same time you can give them the same off and on temperatures.

If you run the script normally it should print out what the temperature readings from the processor are currently.

The on temperature should be the temperature you want the processor to be held at, we have found the setting the off temperature two degrees below this works well.

For example if we want only drive outputs 1 and 2 to be used and to hold a processor temperature of 25 degrees:

# Setup for individual fans, units for high / low are post multiplier
#           [drive,     sensor name,        low level 'off',    high level 'on'],
lFans = [
            [DRIVE_1,   'Processor',        23.0,               25.0],
            [DRIVE_2,   'Processor',        23.0,               25.0],
        ]

Thank you for reply =)
I changed lines 45-48 to dual fans with same temperature (33.0-35.0).
Like in your picture. But, I would like to run 2 fans in parallel.
See my 1st picture. I'm aiming for this result:
Processor: *high level*
ON ON OFF OFF
-------------------------
2 fans go on exactly likewise until
-------------------------
Processor: *low level*
OFF OFF OFF OFF

Screen capture shows how it currently work.

Images: 
piborg's picture

It should not be turning fan1 off until the temperature hits 33...

Do you have any other scripts running which control GPIO pins?

Could you share the whole script as it currently looks?

Only lirc on gpio 23&24 and spi kernel module loaded.
PicoBorg and LedBorg installed on default pin assingments.

So embarrasing.
I tried my script with clean Noobs Rasbian SD card and fans work as they should.
Only thing left is to dig that gpio=4 bugger on my broken SD system :D
Lirc doesn't conflict. I suspect Raspberry Control is to blame.
Lesson learned: always troubleshoot with clean OS before posting on forums.
Topic closed and thanks for the help. Sorry for taking your time.

piborg's picture

Problems like these are always difficult to find, good thinking to try with a clean install.

So the pin we are having trouble with: http://pi.gadgetoid.com/pinout/pin7_gpio4
This pin has additional functionality, namely GPCLK0.
It may be something else has set it to run as GPCLK0, or something else may just be using it as GPIO.

The default rpc.conf for Raspberry Control does talk about exporting GPIO 7 to 25, this would cover all of the pins except drive #1.

Subscribe to Comments for "PicoBorg ChilledPi set and forget temp control"