584,865 active members*
4,913 visitors online*
Register for free
Login
Results 1 to 16 of 16
  1. #1
    Join Date
    Mar 2015
    Posts
    13

    Question Controlling relays or solenoids?

    Hi,
    I'm so new to CNC that I don't even know what question to ask... I've been reading for a few days but haven't been able to find what I'm looking for.
    I'm a hobby level guy looking to build a robotic machine to automate a process, putting parts into a box divided into cells.
    I've been looking at some CNC kits on eBay that come with motors, drivers, power supplies, and a breakout board. These look like what I want along with Mach3 software. The only thing is I'd like to control several relays/solenoids between and during stepper motor motion. I think this would be done VIA the breakout board, but the ones that come in the kits only seem to have one relay (spindle) output.
    Please advise if I'm even on the right track wanting to use Mach3? Is it capable of the relay control? I have built dedicated circuits in the past but would rather use off the shelf products if possible.

    Thanks

    Neo

  2. #2
    Join Date
    Jun 2004
    Posts
    511

    Re: Controlling relays or solenoids?

    Maybe a PLC to run the relays? Cheap and power full these days.

  3. #3
    Join Date
    Mar 2015
    Posts
    13

    Re: Controlling relays or solenoids?

    Quote Originally Posted by ifixcnc View Post
    Maybe a PLC to run the relays? Cheap and power full these days.
    How would the PLCs interface with Mach3 for timing? I know what they are but haven't worked with them.

  4. #4
    Join Date
    Jun 2004
    Posts
    511

    Re: Controlling relays or solenoids?

    I only have worked on industrial applications, so I have not seen Mach3. A conditional output would be all that would be needed for timing.

  5. #5
    Join Date
    Feb 2009
    Posts
    6028

    Re: Controlling relays or solenoids?

    Mach 3 may not be what you want for this. Project sounds simple, i would look in to using a PLC or even an arduino. You will end up writing your own scrips in mach to time M codes anyways. You could probably even adapt a Ramps board with an arduino mega with the step driver boards. These are used for 3D printers and have multiple outputs for other controls. They even use G-code if you use the Marlin firmware. I think you could get the arduino,Ramps,stepsticks, and power supply for less than 75.00.

  6. #6
    Join Date
    Dec 2003
    Posts
    24216

    Re: Controlling relays or solenoids?

    There is something called a Smart Relay which is a simpler compact form of PLC, they also have a display for simple operator input, the stepper drive signal may be a bit of a problem though, if you were into it a Picmicro or one of the Arduino type systems should work.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    Jan 2007
    Posts
    599

    Re: Controlling relays or solenoids?

    This does not sound like something you'd want to do with mach3, you could if you really wanted to. I would look at controlling the whole thing with plc, You can get plc's with pulse outputs.

  8. #8
    Join Date
    Aug 2009
    Posts
    655

    Re: Controlling relays or solenoids?

    The people that make Blackfoot cnc kits have a pick and place machine. Maybe you can glean so information there.
    In case anyone is wondering, I'm the twin of the other gfacer on cnczone...

  9. #9
    Join Date
    Mar 2015
    Posts
    13

    Re: Controlling relays or solenoids?

    I was looking to Mach3 because I was thinking of using the same hardware (steppers, drivers, PS, etc) to run on a few different machines to perform different tasks. Move the hardware to a new chassis load G-code and go. Problem with PLCs is I/Os may need to be rewired to move from machine chassis to machine chassis... just more fiddling.
    Arduinos and PICs are fully capable but very proprietary. The custom unit is only useful to me and not transferable due to lack of support. I think PLCs are going to be the answer, but I hate spending $$$ for the PLCs when I have several PIC16xxx's sitting in my parts box that only cost ~$3.00 and can do the job. It's a personal battle with myself. The PLCs make sense for what I want to do... I think.
    I see a journey into an unexplored technology in my future.

    Thank for everyone's input.

  10. #10
    Join Date
    Feb 2009
    Posts
    6028

    Re: Controlling relays or solenoids?

    Sounds like a lot of headache for a 12.00 arduino, if your looking for cheap. PLCs are down to ~150.00 from automation direct.

  11. #11
    Join Date
    Oct 2007
    Posts
    29

    Re: Controlling relays or solenoids?

    ------------------------------------
    Alan

  12. #12
    Join Date
    May 2014
    Posts
    182

    Re: Controlling relays or solenoids?

    You're looking to have relay control synchronized with movements or other actions?

    Is it coordinated motion that you're trying to do; things like perfectly circular movements requiring two or more synchronized axes is what I'm talking about. Or are you going to points in space, and dropping components off based off of other triggers (repeatable points)?

    If you don't need coordinated motion, then a PLC is probably your best option. If you need coordinated motion, then you will need a motion controller to synchronize the axes.

    At my work we use a 2 axis pick and place X-Y robot stage. We use Schneider Mdrive Plus2 stepper motors in the machine communicating over RS422. An ASCII command line is sent to the robot where to move (pulling location information from an xml file), this command line contains all the motion parameters: distance to move, acceleration, velocity etc. The integrated controllers in the motors handle the rest of the motion routines - converting distance to steps, looking at I/O from sensors, checking movement with encoders etc. Since the axes are not synchronized, once one axis has moved, the other is allowed (or controlled) to move.

    The above requires a software front end at some point, while a PLC could achieve this without this front end as well as dealing with event based relay switching etc.

    I'm not sure if mach3 can handle I/O coordinated with movements... but since it has I/O capability, I don't see why it couldn't - afterall, this is how the limit switches stop the machine or axis. There are other ways to solve this problem and still use mach3 though. If your stepper or motion drivers are capable, you can program I/O and routines from them, while driving them with the pulse train from mach3.

  13. #13
    Join Date
    Mar 2015
    Posts
    13

    Re: Controlling relays or solenoids?

    Quote Originally Posted by UA_Iron View Post
    You're looking to have relay control synchronized with movements or other actions?

    Is it coordinated motion that you're trying to do; things like perfectly circular movements requiring two or more synchronized axes is what I'm talking about. Or are you going to points in space, and dropping components off based off of other triggers (repeatable points)?

    If you don't need coordinated motion, then a PLC is probably your best option. If you need coordinated motion, then you will need a motion controller to synchronize the axes.

    At my work we use a 2 axis pick and place X-Y robot stage. We use Schneider Mdrive Plus2 stepper motors in the machine communicating over RS422. An ASCII command line is sent to the robot where to move (pulling location information from an xml file), this command line contains all the motion parameters: distance to move, acceleration, velocity etc. The integrated controllers in the motors handle the rest of the motion routines - converting distance to steps, looking at I/O from sensors, checking movement with encoders etc. Since the axes are not synchronized, once one axis has moved, the other is allowed (or controlled) to move.

    The above requires a software front end at some point, while a PLC could achieve this without this front end as well as dealing with event based relay switching etc.

    I'm not sure if mach3 can handle I/O coordinated with movements... but since it has I/O capability, I don't see why it couldn't - afterall, this is how the limit switches stop the machine or axis. There are other ways to solve this problem and still use mach3 though. If your stepper or motion drivers are capable, you can program I/O and routines from them, while driving them with the pulse train from mach3.
    A bit of both actually. I'm looking to have two axes move a part in space and bring it to a two axes CNC router (spiral saw). The spiral saw will cut a circular hole. The part will rotate to another side (by another stepper) and the saw will cut another hole. Rinse and repeat 4 to 6 times. The part will then be places in a stack and the machine will get the next part from a stack. The parts are picked up by vacuum (the need for the solenoids) checked at another station for double or triple stack (stuck together when picked) using an apposing vacuum source (another solenoid) then brought to the spiral saw... etc, etc.

    I think the hardest part of the whole process is if there is a double (two or more stuck together) when the pick occurs. It would require jumping to a sub routine to deal with the error before proceeding with the cutting and placing process.

    Five axes in all, plus three vacuum solenoids and a spindle. May need a blower too to deal with the debris.

    I see breakout boards like this on eBay, as an example, that have plenty of outputs which, if I'm not mistaken, can be controlled with M-code. I've also read some things that mention the G-code can do conditional routines. I've never written a line of G-code in my life but I think since I'm only moving to about 16 points in space and cutting a single hole over and over, it shouldn't be to bad.

    I don't know anything (much) about PLCs. I just have a feeling that CNC (Mach3) works better (easier?) with stepper motors and PLCs work best with analog and digital IF - THEN - ELSE logic sort of things. I may be very wrong. PLCs definitely seem to be more expensive to set up 5 axes stepper control, but the conditional issues would be much easier.

    Neo

  14. #14
    Join Date
    May 2014
    Posts
    182

    Re: Controlling relays or solenoids?

    Quote Originally Posted by Neosec View Post
    A bit of both actually. I'm looking to have two axes move a part in space and bring it to a two axes CNC router (spiral saw). The spiral saw will cut a circular hole. The part will rotate to another side (by another stepper) and the saw will cut another hole. Rinse and repeat 4 to 6 times. The part will then be places in a stack and the machine will get the next part from a stack. The parts are picked up by vacuum (the need for the solenoids) checked at another station for double or triple stack (stuck together when picked) using an apposing vacuum source (another solenoid) then brought to the spiral saw... etc, etc.
    You may be able to use both, you'll just need certain triggers to trigger the next process to happen. A sensor switching high or low is always a good point.

    Instead of an opposing vacuum source to check for double or triple stack, could you just use a pneumatic cylinder to knock them off? I prefer pressure over vacuum, especially in a dusty environment - you'll never need to service to suction cups with a pneumatic cylinder.

    They make integrated relay boards for Mach3 breakout boards
    CNC4PC

    Quote Originally Posted by Neosec View Post
    I think the hardest part of the whole process is if there is a double (two or more stuck together) when the pick occurs. It would require jumping to a sub routine to deal with the error before proceeding with the cutting and placing process.
    Punch them all out of the way with a pneumatic cylinder over some kind of slide leading to a bin!


    Quote Originally Posted by Neosec View Post
    Five axes in all, plus three vacuum solenoids and a spindle. May need a blower too to deal with the debris.

    I see breakout boards like this on eBay, as an example, that have plenty of outputs which, if I'm not mistaken, can be controlled with M-code. I've also read some things that mention the G-code can do conditional routines. I've never written a line of G-code in my life but I think since I'm only moving to about 16 points in space and cutting a single hole over and over, it shouldn't be to bad.
    I would not buy any USB based breakout board besides a smoothstepper. A lot of the stuff on ebay is crap too, buy good boards that people can vouch for on the forums, it's not worth the headache to save a few bucks and buy the ebay stuff.

    A USB or ethernet smoothstepper allows you to connect multiple breakout boards so you have a ton of I/O capability.

  15. #15
    Join Date
    Mar 2015
    Posts
    13

    Re: Controlling relays or solenoids?

    Just an update...
    I bought a PLC from Velocio; an ACE11. I also bought a 3-axis stepper kit off eBay and the plc controls them well enough. I also bought some linear rails, timing belt and pulleys. I'll have to upgrade to a more powerful PLC because the ACE11 will only drive one stepper at a time. I was told that a coming firmware upgrade will allow three at a time in the higher models. I ended up with Velocio because the programming software if free and pretty simple. I'll still download Mach 3 and play with it some, maybe use it in conjunction with the PLC(s) if I get into cutting machines.

    Thanks for everyone's input!

  16. #16
    Join Date
    May 2014
    Posts
    97

    Re: Controlling relays or solenoids?

    I have been looking at the Velocio product line as well as the Click from AD; please update us when you get the project running.

Similar Threads

  1. Replies: 1
    Last Post: 10-26-2011, 01:26 AM
  2. Setting up solenoids
    By dfurlano in forum Gecko Drives
    Replies: 6
    Last Post: 02-17-2011, 11:48 PM
  3. Latching Solenoids anyone?
    By Al_The_Man in forum CNC Machine Related Electronics
    Replies: 11
    Last Post: 11-01-2010, 01:35 AM
  4. Relays
    By 1ctoolfool in forum Haas Mills
    Replies: 4
    Last Post: 12-17-2008, 11:33 PM
  5. Solenoids
    By Lennart in forum Mechanical Calculations/Engineering Design
    Replies: 3
    Last Post: 03-05-2005, 10:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •