Controlling general purpose solenoids
-
I need to control a simple low current solenoid on/off, without PWM control with a Duet 3 Mini 5+.
I have connected it to OUT_5, and configured OUT_5 using
M950 P5 C"solenoid"
And attempted to switch it on/off using
M42 P5 S1
and
M42 P5 S0
But the solenoid does not energise. I can confirm 24V (my VIN voltage) is present on OUT5+, and that the solenoid works when powered with 24V on the bench, so it must just be something to do with my configuration.
Hope somebody can help, many thanks.
-
@jwilo I think he meant:
M950 P5 C"out5"
-
@jwilo said in Controlling general purpose solenoids:
M950 P5 C"solenoid"
'solenoid' isn't a valid pin name.
TryM950 P5 C"solenoid"
.Try
M950 P5 C"out5"
.
See https://docs.duet3d.com/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-or-gpioservo-pinIan
-
@droftarts Thanks Ian, not sure I understand your reply. The bit I don't understand, if "solenoid" is not a valid pin name, why does your example use it too?
I've read the docs for M950, but must not be wrapping my head around it.
-
@jwilo I think he meant:
M950 P5 C"out5"
-
@dc42 Perfect! Thank you, that's the key I was missing. I thought the P value referred to which output you're using, and the name was a name you wanted to assign to the pin.
I see now that P refers to the output you're creating, i.e. P1 is some solenoid, P2 might be a light etc, and the name is the name of the pin you want to map it to, great - all working now, thanks!
-
-
-
@jwilo said in Controlling general purpose solenoids:
if "solenoid" is not a valid pin name, why does your example use it too?
Sorry! Copy/paste failure on my phone!
Ian
-
@droftarts No problem, thank you!
-