Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Pressured air cooling controlled with servo and ball valve

    Scheduled Pinned Locked Moved
    General Discussion
    11
    61
    3.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MaxGyverundefined
      MaxGyver
      last edited by

      Hey all,

      since I got my RC-Servo finally working (Thanks to @achrn)

      I would like to share a little project that i have been working on.
      I have been using pressured air from electric pumps instead of fans for hotend and part cooling à la Berd Air. I found that the motor Pumps are quite noisy, get very hot and do not last very long. Therefore, I switched to this pump It is less noisy and has more than enough airflow.

      I would like to add a ball valve that is opened and closed by an RC-Servo in order to control the airflow for the part cooling.
      This is my fan configuration:

      M950 F1 C"io4.out"       ; create fan 1 on pin out8 and set its frequency
      M106 P1 S0 H-1           ; set fan 1 value. Thermostatic control is turned off
      

      With this I can already somewhat control the fan over the web interface.
      The problem is that the M106 fan speed value (0 to 255 or 0.0 to 1.0) does not correspond to the needed servo values of 0 to 90 for an angle between 0° and 90°.

      For example the servo only responds when the fan control slider in the web interface is set between roughly 5% and 65%.

      Does someone have an idea how to work around this ?

      Cheers,
      Max

      1 Reply Last reply Reply Quote 0
      • achrnundefined
        achrn
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          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

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • MaxGyverundefined
            MaxGyver
            last edited by

            @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.

            Unbenannt.PNG

            Cheers Max

            achrnundefined 1 Reply Last reply Reply Quote 0
            • achrnundefined
              achrn @MaxGyver
              last edited by

              @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?

              1 Reply Last reply Reply Quote 0
              • chainbreaker2012undefined
                chainbreaker2012
                last edited by

                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

                achrnundefined 1 Reply Last reply Reply Quote 0
                • achrnundefined
                  achrn @chainbreaker2012
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • chainbreaker2012undefined
                    chainbreaker2012
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • MaxGyverundefined
                      MaxGyver
                      last edited by

                      @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

                      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                      • jay_s_ukundefined
                        jay_s_uk @MaxGyver
                        last edited by

                        @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)
                        

                        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                        dc42undefined 1 Reply Last reply Reply Quote 0
                        • jay_s_ukundefined
                          jay_s_uk
                          last edited by

                          @ 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.
                          

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          MaxGyverundefined 1 Reply Last reply Reply Quote 0
                          • MaxGyverundefined
                            MaxGyver @jay_s_uk
                            last edited by MaxGyver

                            @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

                            1 Reply Last reply Reply Quote 0
                            • MaxGyverundefined
                              MaxGyver
                              last edited by MaxGyver

                              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...

                              IMG_20201019_140004.jpg

                              @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

                              1 Reply Last reply Reply Quote 0
                              • achrnundefined
                                achrn
                                last edited by

                                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.

                                MaxGyverundefined 1 Reply Last reply Reply Quote 0
                                • MaxGyverundefined
                                  MaxGyver @achrn
                                  last edited by MaxGyver

                                  @achrn

                                  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

                                  Phaedruxundefined BoAundefined 2 Replies Last reply Reply Quote 0
                                  • Phaedruxundefined
                                    Phaedrux Moderator @MaxGyver
                                    last edited by

                                    @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.

                                    Z-Bot CoreXY Build | Thingiverse Profile

                                    MaxGyverundefined 1 Reply Last reply Reply Quote 0
                                    • MaxGyverundefined
                                      MaxGyver @Phaedrux
                                      last edited by

                                      @Phaedrux

                                      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

                                      Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                      • Phaedruxundefined
                                        Phaedrux Moderator @MaxGyver
                                        last edited by

                                        @MaxGyver My mistake.

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        1 Reply Last reply Reply Quote 0
                                        • BoAundefined
                                          BoA @MaxGyver
                                          last edited by BoA

                                          @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.

                                          MaxGyverundefined 1 Reply Last reply Reply Quote 0
                                          • MaxGyverundefined
                                            MaxGyver @BoA
                                            last edited by

                                            @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

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA