Welcome to Our Community

Some features disabled for guests. Register Today.

Using a solenoid on an arduino cnc shield and gcode

Discussion in 'DrawBots' 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

    Joined:
    Aug 6, 2013
    Messages:
    784
    Likes Received:
    362
    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

    Joined:
    Aug 6, 2013
    Messages:
    784
    Likes Received:
    362
    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

  • About Us

    The OpenBuilds Team is dedicated helping you to Dream it - Build it - Share it! Collaborate on our forums and be sure to visit the Part Store for all your Maker needs.


    [email protected]

  • Like us on Facebook

  • Support Open Source FairShare Program!

    OpenBuilds FairShare Give Back Program provides resources to Open Source projects, developers and schools around the world. Invest in your future by helping others develop their future.

    Donate to Open Source