Clipping Servo Range on Duet 3
-
I'm modifying my printer to use air pump cooling. A servo will be used to control the pressure of the air flow.
I have a simple 9g RC servo plugged into the servo port on my Duet 3, with it configured as follows:
; Fans for print cooling
M950 F0 C"0.out9"
M106 P0 C"PrintCool"When I try to adjust the servo angle using the fan slider in DWC, the servo only moves between the values of 20 and 55. Through these 35 points, the servo moves approximately its entire range.
Is there a way I can clip the range to 20-55? So that at "0" the output is 20, and at "100" the output is 55?Thanks for any assistance!
-
@KevinMar not without modifying DWC to send a different M106 Sxx number for a different range, depending on your familiarity with web development this may or may not be simple to od. I think there is a potential argument to make the fan slider %s configurable in DWC though for a more general use case where fans only operate with PWM within a limited range. @chrishamm can you add this to the DWC wishlist please.
-
@KevinMar said in Clipping Servo Range on Duet 3:
I'm modifying my printer to use air pump cooling. A servo will be used to control the pressure of the air flow.
I have a simple 9g RC servo plugged into the servo port on my Duet 3, with it configured as follows:
; Fans for print cooling
M950 F0 C"0.out9"
M106 P0 C"PrintCool"When I try to adjust the servo angle using the fan slider in DWC, the servo only moves between the values of 20 and 55. Through these 35 points, the servo moves approximately its entire range.
Is there a way I can clip the range to 20-55? So that at "0" the output is 20, and at "100" the output is 55?Thanks for any assistance!
Servos are normally driven using the M280 command, not as fans. If you want to drive a servo as if it is a fan, you will need to adjust the PWM frequency using the Q parameter of the M950 command. Try values in the range 50 to 250Hz.
-
@T3P3Tony said in Clipping Servo Range on Duet 3:
@KevinMar not without modifying DWC to send a different M106 Sxx number for a different range, depending on your familiarity with web development this may or may not be simple to od. I think there is a potential argument to make the fan slider %s configurable in DWC though for a more general use case where fans only operate with PWM within a limited range. @chrishamm can you add this to the DWC wishlist please.
Sorry I wasn't clear about this, but I was only using DWC for testing. I am more concerned with how it would run during a print using normal fan commands.
-
@KevinMar said in Clipping Servo Range on Duet 3:
Sorry I wasn't clear about this, but I was only using DWC for testing. I am more concerned with how it would run during a print using normal fan commands.
Servos and fans are completely different devices. M106 controls fans, M280 controls servos.
-
@dc42 I've been talking to Kevin in another forum.
This servo is ultimately going to physically control a fan, so he wants it to be PWM 'speed controlled' like a fan, where that PWM is really setting the position of a servo.
What is the best way to go about that? We started by defining it very much like a fan, and then trying to adjust the PWM so that it worked for a 1000-2000us hobby servo. We are partway there...
-
Have you tried adjusting the PWM frequency?
-
Currently playing with Q values in M950
-
I have tried values between 50 and 900, and none of them give me linear control from 0 to 100. Interestingly, though, as the numbers got higher (towards 700-900) the control became much more fine, although the range of motion decreased
-
With Q600 I get motion between 45 and 100, although the servo range of motion is only about 60 degrees. This is good enough for me. With this setup I make 45% my "open valve (low pressure)" and 100% my "closed valve (high pressure)"