Re-purposing a 3D printer board to control a solenoid valve with Mcode

Hello, I'm trying to re-purpose a 3D printer board (mks gen L v1.0) to trigger a 24V 0.75A solenoid valve. My idea was to connect the leads of the solenoid valve to the connector for the extruder or hot bed. This way, I can use the Mcode that sets the temperature to turn on the valve and then set the temperature back down to zero to turn it off. Or would it be best/easiest to add/edit custom/unused Mcodes?

Comments

  • Depends on what it is needed for. You could also use the laser driver instead, then moves with increasing E like produced by slicers would open it and shut down when moves stop. 

    Other controls are M42 and Fan. But that really depends on when you need it on/off so you can select the solution with right timing. M42 is executed when the line is parsed while head is moving asynchroneously driven by a buffer of moves. So if you need it in sync with moves use laser driver or fan in extruder mode.
  • Hello, I'm trying to re-purpose a 3D printer board (mks gen L v1.0) to trigger a 24V 0.75A solenoid valve. My idea was to connect the leads of the solenoid valve to the connector for the extruder or hot bed. This way, I can use the Mcode that sets the temperature to turn on the valve and then set the temperature back down to zero to turn it off. Or would it be best/easiest to add/edit custom/unused Mcodes?
    Did you manage? I guess you prnting with a media under pressure that you dont have to extrude, just open close?
    why not disconnect heater, put a monostable on the extruder stepper pin , or it with DIR to close the valve imediately when the extruder retract?

Sign In or Register to comment.