Pressured air cooling controlled with servo and ball valve
-
https://forum.duet3d.com/topic/18110/thermostatic-servo-control
I haven't actually got this beyond prototype - it will be ventilating my enclosure in due course, but at the moment my 'enclosure' doesn't have any panels on the side, so doesn't need any ventilation.
-
Instead of trying to control the servo with a fan command why now use the actual servo control command?
https://duet3d.dozuki.com/Wiki/Gcode#Section_M280_Set_servo_position
Your M950 would use S instead of F to define a servo pin, and then your M280 command would target that pin number.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M950_Create_heater_fan_or_GPIO_servo_pin
-
@achrn this is a very interesting approach and great idea in general. But as far as I understood, the use of a daemon.g is not yet available for the Duet3+SBC.
What i basically need is a way of mapping the fan value to the servo position.
For example M106 P0 S0.5 corresponds to M280 P0 S45 -> When the fan is set to 50% the valve is opened half way.@Phaedrux The servo is supposed to adjust the airflow according to the M106 fan command in the G-Code. I Am using Simplify 3D as a slicer, which would give me the option to replace the M106 command with an M280 for servo control. But the problem is that the fan command uses either a percentage value or a PWM range of 0-255.
Also, it would be nice to adjust the valve position over the web interface.Cheers Max
-
@MaxGyver said in Pressured air cooling controlled with servo and ball valve:
@achrn this is a very interesting approach and great idea in general. But as far as I understood, the use of a daemon.g is not yet available for the Duet3+SBC.
What i basically need is a way of mapping the fan value to the servo position.
For example M106 P0 S0.5 corresponds to M280 P0 S45 -> When the fan is set to 50% the valve is opened half way.It works on my Duet3 6HC with attached Pi4, DSF Version: 3.1.1, Firmware: RepRapFirmware for Duet 3 MB6HC 3.1., on io7.
I don't really understand the explanation you're giving (it's not clear to me if you are wanting it specifically to react to a fan rather than to a temperature) but below one temperature the servo is in one position, and above another temperature it's in a differnt position, and it moves linearly from one to the other. Is that not what you're trying to achieve?
-
sounds like he wants to control servo position based on fan speed. what about hooking servo up to a external control ,like what came with the berd air, controled by the pwm fan pins you could use a bec to feed the controler for the servo voltage
just a thought -
@chainbreaker2012 said in Pressured air cooling controlled with servo and ball valve:
what about hooking servo up to a external control
If it needs to be controlled from a fan signal rather than from a temperature sensor, that's what I'd do:
A (very) low pass filter to convert the PWM to an analogue level, then have an arduino-ish read the analogue periodically and generate a servo-friendly PWM. That was actually my initial plan for the servo control I'm doing. However, that's largely because everything I'd need for that is in my bits boxes already, it's not necesarily an elegant solution.
My other initial plan was to try and read the fan PWM directly and skip the analogue stage, which seems to me slightly more elegant and slightly more fraught.
-
ok understandable, I am doing something similar but I am coming off a compressed air line from outside and using a pressure transducer to regulate pressure to the hotend, and print cooling. I am just waiting on the transducers to come in.
-
@chainbreaker2012
Exactly, I would like to control the servo position based on fan speed.Since this already kind of works without any additional electronics on the Duet, it is rather a software issue. My problem is, that the fan S parameter (0-255) does not correspond to the servo angle. The servo can be controlled with an S parameter between 44 and 141 which correspond roughly to 20-80% fan speed.
Therefore, I need to adjust the given S parameter of the fan output, so that at 0% fan speed the given S parameter is for example at S 44 (0° Servo angle) and at 100% fan speed it is at S 144 (180° Servo angle).
Cheers Max
-
@MaxGyver can you not use the L and X commands of M106 to do that?
Lnnn Set the minimum fan speed (0 to 255 or 0.0 to 1.0) when a non-zero fan speed is requested. Xnnn Set the maximum fan speed (0 to 255 or 0.0 to 1.0) when a non-zero fan speed is requested. (supported in RRF >= 2.02)
-
@ dc42 maybe an option could be added to the M106 command, similar to the R value in M453
Rbbbor Raaa:bbb RPM values that are achieved at zero PWM and at maximum RPM. Used to convert the S parameter in M3 and M4 commands to a PWM value.
-
@jay_s_uk said in Pressured air cooling controlled with servo and ball valve:
@ dc42 maybe an option could be added to the M106 command, similar to the R value in M453
Rbbbor Raaa:bbb RPM values that are achieved at zero PWM and at maximum RPM. Used to convert the S parameter in M3 and M4 commands to a PWM value.
Yes, this would solve my problem.
Cheers
Max -
As an alternative to my Ball Valve+RC Servo design, I have ordered a PWM capable proportional control valve. The advantage of the Proportional valve is that it is basically plug & play and has less moving parts. But just like the servo, it has a specific PWM range from 300-400 Hz for 0-100% flow. So my Problem remains the same...
@dc42 would it be possible to add an R value to the M106/M950 command to control the PWM frequencies that are achieved at zero PWM and at maximum RPM similar to the R value in M453?
Cheers
Max -
The data sheet at https://www.burkert.com/en/Media/plm/DTS/DS/DS2863-Standard-EU-EN.pdf doesn't seem to match your decription.
That just refers to PWM and the figure on page 8 shows a pretty linear repsonse from about 0.1 to about 0.9 input - probably more linear than any fan, so I don't believe you do have the problem you think you do - surely you just use this as a 24V fan, with a 400Hz PWM? You could put 0.1 low limit on it so it opens immediately you have any non-zero demand.
I do note that I don't understand the X axis scale on that graph, because it's a 24V 420mA coil. Also I'm assuming that response to PWM will be similar to the response to whatever that scale is indicating.
Where are you seeing something that suggets you need to vary PWM frequency? M950 already lets you specify teh frequnecy and then the standard fan control will vary duty.
-
Thank you for your feedback. I think you are partly correct.
I have tried setting different PWM frequencies in the M915 command. The valve behavior does not change much. Although on higher frequencies (Q>4000) the valve stopped whining, so I am going to stick to those.
This is my recent Fan/Valve config:
M950 F1 C"1.out1" Q-1 M106 P1 S0 H-1
I have good control over the airflow with a fan speed from 78% (valve closed) to roughly 90% (valve fully open).
Cheers
Max -
@MaxGyver said in Pressured air cooling controlled with servo and ball valve:
78% (valve closed) to roughly 90% (valve fully open).
Look at the M106 L and X parameters to set the min and max range to match your usable range. That should scale the S parameter to make S0 to S255 within your usable range.
-
I have already tried this. The L and X factor of M106 will not scale the range but rather set the minimum and maximum fan speed.
With this configuration the valve will stay in the same slightly open position at a fans peed of 5-80%. So I still only have real control over the flow from 80-90% fan speed.
M106 P1 S0 H-1 L200 X255
Cheers
Max -
@MaxGyver My mistake.
-
@MaxGyver said in Pressured air cooling controlled with servo and ball valve:
Although on higher frequencies (Q>4000) the valve stopped whining, so I am going to stick to those.
This will for sure change the valve response characteristics. Perhaps this is why the valv response is not as stated in spec.
400Hz is the way to go.
-
@BoA The valve response characteristics do not change with the PWM-Setting. I have the same response with 300, 400 or higher Hz. Only with high Hz the valve is noiseless.
Cheers
Max -
@MaxGyver how is this valve working out for you? I'm looking at a similar setup but using a compressed air source instead of an aquarium pump.
Have you put a flowmeter after your solenoid to determine how much air you are delivering and able to control the airflow?