Temperature controlled always on fan
-
@Aurimas Just for clarification, you can't control a fan connected to "always on " headers.
But I guess, that's not what you wanted.A solution to your problem is a while loop in the daemon.g file:
Pseudo code:
while if tempsensor < thresholdtemp run fan at 20% else run fan at 100%
-
@o_lampe excuse me for my ignorance, but since I have not done this before could you please guide me a bit more?
Can you please point me in the right direction for meta commands?
like how do I define the tempsensor. I was looking for info and cannot find a page that would have all the variables defined.
also while demands for the expression. I assume that it should be something like: "while <print is running>"thanks
-
@o_lampe ok so I think I got some idea how it works.
just need a bit of huidance2 issues:
can't this to work
while get boards[0].state = "running"
what am doing wrong.as a test i got this, but the fan runs 100% all the time
white state.status = "idle"
if sensors.analog[4].lastReading<65
M106 P5 S0.2
else
M106 P5 S1the result is that P5 is 100% all the time
-
@Aurimas said in Temperature controlled always on fan:
@o_lampe ok so I think I got some idea how it works.
just need a bit of huidance2 issues:
can't this to work
while get boards[0].state = "running"
what am doing wrong.Which board are you running?
On my Duet 2, this is showing as "unknown" so I suspect it's not supported on all boards.
It may even only be for toolboards. @DC42 may confirmas a test i got this, but the fan runs 100% all the time
white state.status = "idle"
if sensors.analog[4].lastReading<65
M106 P5 S0.2
else
M106 P5 S1the result is that P5 is 100% all the time
Apart from the type on "while" , I'm not sure your indenting is correct for the else.
while state.status = "idle" if sensors.analog[4].lastReading<65 M106 P5 S0.2 else M106 P5 S1
Should work if in fact the board is in the idle state.
If you're doing this in daemon.g then it would be better to not enter such a closed loop
By default daemon.g runs every 10 seconds. If that is often enough for your purposes then simply do your check.if sensors.analog[4].lastReading<65 M106 P5 S0.2 else M106 P5 S1
If you want it to run more often the use a while loop, but make sure you add a G4 command so that control is returned to the main process regularly.
while true if sensors.analog[4].lastReading<65 M106 P5 S0.2 else M106 P5 S1 G4 S2
If you want to have it happen only when idle, or any other state then you can use that as well, but still use a delay in your loop.
-
@Aurimas said in Temperature controlled always on fan:
I want to have temperature controlled fan that is always at minimum 20% speed.
What's the reason for wanting 20% minimum speed, instead of Off when the temperature is low enough?
The solution proposed by @o_lampe looks good to me, in principle.
-
@dc42 I have a fan on the enclosure - I want it to suck the air out of enclosure and through the HEPA filter. that would create slight negative pressure in the enclosure.
then I want the fan to flip to full power if the enclosure gets over certain temp so that it cools down and prevents overheating. -
@OwenD thank you. I am just learning these things and the syntax is a bit of a mystery for me
like your statement: "while true" - where do i find this info? -
@Aurimas said in Temperature controlled always on fan:
@OwenD thank you. I am just learning these things and the syntax is a bit of a mystery for me
like your statement: "while true" - where do i find this info?Information on meta commands can be found here
while
creates a loop that is typically limited by a boolean expression
while iterations < 10
or as you hadwhile state.status = "idle"
while true
will always resolve to true in a similar way to usingwhile 1=1
would, so it creates an endless loop
When you do so, you have to ensure that you hand control back to the CPU (G4) or have a mechanism to break out or the machine will be unresponsive. -
@OwenD thank you
-
Hello everyone,
I think I have the same wish.
I would like to connect three 4 pin pwm fans to fan output 4.
It is an always running fan for my water cooling system.
That means it has to run when the nozzle is around 45C. This is already working. But the fans are too loud and too strong. I would therefore like to reduce the fan speed to 30%.
The fans are connected via a 3-way splitter and this is important for me to have some kind of redundancy if one is faling.
How can I achieve this? @dc42
Best Regards
Cai -
@CaiJonas you can connect multiple PWM fans to the same 4-pin output, provided you don't exceed the total current limit. The fans should all be of the same type so that they run at the same speed. Connect the positive, negative and PWM wires of all 3 fans to the corresponding pins on the Duet. I suggest you connect just one of the fan tacho wires to the tacho input on the Duet 4-pin connector.
You can use the X parameter in the M106 command to set the maximum PWM.