Welcome to Our Community

Some features disabled for guests. Register Today.

Using a solenoid on an arduino cnc shield and gcode

Discussion in 'DrawBot' started by seanenroute, Aug 22, 2017.

  1. seanenroute

    Builder

    Joined:
    Oct 11, 2016
    Messages:
    3
    Likes Received:
    0
    Hi, I've been tinkering with a cnc pen plotter. I'm able to run a servo for the z axis but would like to switch it out with a small solenoid. Does anyone have an idea on how to wire it to the cnc shield and then control it with gcode?
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,219
    Likes Received:
    1,813
    wire it to the Coolant Enable pin and control it with
    M8 to turn it on (equiv to Z down)
    M9 to turn it off (equiv to Z up)
     
    crispin likes this.
  3. seanenroute

    Builder

    Joined:
    Oct 11, 2016
    Messages:
    3
    Likes Received:
    0
    I'll try that. Any ideas on how I should wire it for power? I have a bunch of small 12 volt solenoids I'll use.
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,219
    Likes Received:
    1,813
    you will need a relay or MOSFET. the pin turns the relay on and off, and the relay switches the 12v for the solenoid.
    do not omit a snubber diode! keep the 12v wires away from the signal wires to the arduino.
     
    crispin likes this.
  5. seanenroute

    Builder

    Joined:
    Oct 11, 2016
    Messages:
    3
    Likes Received:
    0
    Excellent, thank you
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice