Rc Servo For Extruder Switch
-
Hello.
I just installed a Duet 2 wifi 1.04 firmware 2.05 on a dual extruder printer (Raise3D Pro2)
The printer uses a rc servo to lift / lower the nozzles.I found and read this description: https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins
I supply the servo 5v via a buck converter.
I would like to use the PWM pin on fan2.I send M106 P2 I-1 to disable fan2.
With M106 P2 it replys: Fan disabled.The pwm pin in fan2 is now be called 22 right?
When I send M280 P22 S90 the servo should move to center-ish position, but nothing happens?
What am I missing?
Thanks Krunder
-
@krunder said in Rc Servo For Extruder Switch:
The pwm pin in fan2 is now be called 22 right?
I'm not actually positive about that, but I think so. 20 = fan0, 21= fan1, 22 = fan2.
Might I suggest switching to RRF3? It's far easier to define and use pins.
M950 S0 C"fan2" ; create servo 0 on fan2 pin
M280 P0 S90 ; control servo 0@krunder said in Rc Servo For Extruder Switch:
I would like to use the PWM pin on fan2.
Which pin are you using from Fan2? PWM is switched on the negative side.
-
Yes, I use the negative pin.
I stayed with RRF2 because it has worked well for me - I will take a look at RRF3 and see if it makes a difference.
Thanks Krunder
-
@krunder Do you have a pullup resistor from the servo signal pin to the servo positive power pin?
Since the fan negative is a MOSFET to ground, it doesn't actually produce a signal that switches from 0Volts to 5Volts without an external pullup resistor.
I think anything anywhere in the 4-20 kilo Ohms would work.
-
I tried 4,7K and 10K - Not working.
I will try again tomorrow at work and see what happens. -
@krunder OK, do you have the negative output of the buck converter connected to the negative of the Duet?
(Just in case it's an isolated buck converter. But I doubt it. I'm really just guessing now since you're doing everything right as far as I can tell.)
-
Any details on the servo? Photo? Photo of the wiring? Maybe we can spot something.
-
Sorted
I got it working. The pullup resistor did half the job. The other part was to reverse the signal with M280 P22 S90 I1
Being a RC pilots for many years, a reversed servo signal means that the servo moves in the other direction. This is not the case here - where I expect it reverses the pause with the output.
Here is a small sketch to help others with the same problemThanks for the help.
Krunder