1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. We want to wish everyone a healthy, happy New Year, full of joy and success. God bless you, and thank you for supporting The Hobby-Machinist.

    Dismiss Notice

Basic CNC

Discussion in 'CNC IN THE HOME SHOP' started by Bill Gruby, Oct 7, 2012.

  1. thebaconbits

    thebaconbits United States Active Member Active Member

    Likes Received:
    0
    Trophy Points:
    6
    City:
    Lutz
    State:
    Florida
    This is great basic cnc info and very useful. Thanks
     
  2. Bill Gruby

    Bill Gruby United States Global Moderator Staff Member H-M Supporter-Premium

    Likes Received:
    1,436
    Trophy Points:
    113
    City:
    Bristol
    State:
    Connecticut
    What should you know before the computer and machinery?

    "Billy G"
     
  3. jumps4

    jumps4 Global Moderator Staff Member Active Member

    Likes Received:
    177
    Trophy Points:
    63
    City:
    New Port Richey
    State:
    Florida
    I'm not understanding what your guestion means bill?
    steve
     
  4. Bill Gruby

    Bill Gruby United States Global Moderator Staff Member H-M Supporter-Premium

    Likes Received:
    1,436
    Trophy Points:
    113
    City:
    Bristol
    State:
    Connecticut
    OK let's see if I can do this.

    #1 -- You need to know the computer
    #2 -- You need to know what the machine is and what each component does.

    These we have discussed. What I am asking is -- is there any basic things we should be capable of doing leading up to those two?

    "Billy G" :bitingnails:
     
  5. jumps4

    jumps4 Global Moderator Staff Member Active Member

    Likes Received:
    177
    Trophy Points:
    63
    City:
    New Port Richey
    State:
    Florida
    the first thing that came to mind for me is the Cartesian coordinate system (i googled the spelling lol )
    it is the key to understanding the layout, drafting and machining of any part.
    steve
     
  6. 7HC

    7HC Active User Active Member

    Likes Received:
    5
    Trophy Points:
    38
    City:
    Tampa
    State:
    Florida
    Make #3 -- You need to know how to think logically in three dimensions.
    It's a great help in working out the order of the steps needed to machine something; cnc or manually.


    M
     
  7. David Kirtley

    David Kirtley United States Active User Active Member

    Likes Received:
    9
    Trophy Points:
    38
    City:
    McAllen
    State:
    Texas
    You need to be able to know some of the vocabulary for what is going on with the computer hardware stuff.

    Opto-isolation (Optical Isolation)

    The circuits of the CNC are physically isolated from the computer electrical circuitry to keep the CNC voltage from possibly going through the computer. A good thing. Usually you cannot see this going on. There is an LED light inside a chip on one side and a light detector on the other side. Much like signal lights to keep one circuit from touching the other.

    Break Out Board

    The communication lines are all bundled in one cable from the computer. It has to be distributed to the different components. This is where that happens. Some systems have the controls for the motors built in to this and other have them as separate boards that connect to it.

    Open Loop Control

    The instructions for a move are given to a motor but no feedback to make sure that the move was made

    Closed Loop Control

    The move is verified as well as the command given. Usually done on servo controlled systems.

    Stepper Motor

    A motor that moves one increment when the pulse of electricity goes through it. Very powerful but moves slower and looses power as it speeds up.

    Servo Motor

    A regular motor that also has an way to tell what movement is made. It can move back and forth and the software tells what position it is in. (Usually used in closed loop systems) Generally more power when moving fast but not as much when moving slow.

    Micro stepping

    The two poles of the stepper motor have a balancing power on both to position the stepper between positions.

    Serial port

    The computer port with two lines, a transmit and receive that communicate much like the old telegraph systems. Usually with a 9 pin connector unless you are using a *really* old computer where it will be 25 pins. On the computer side, it will look just like a parallel port but it will be a male connector instead of a female connector. (Male connectors have pins, female have sockets for pins) Some of the older CNC systems used this mainly to hook a terminal up to see things on the computer built into the CNC machine. Not present on the most modern computers in favor of USB (Universal Serial Bus) In desktop systems, you can add additional expansion boards to a computer if it doesn't have one.

    Parallel Port

    The computer port that will send data over 17 pins at once. Previously, this was used for connecting printers to the computer. It would send data on 8 lines at a time and the rest were used for control. This is what most CNC systems use to connect to the computer. Not advisable to use for a laptop as the laptop has circuitry in it to cut part of the power to the port to save electricty. This is a 25 pin connector (yeah, there are a bunch of ground wires there too.) Many of the newest computers don't have one any more and printers mostly use USB now. You can get an expansion board to add one to a desktop computer if yours doesn't have one built in.

    USB Port

    The USB port is more like the old serial port but it sends information much faster. It has 4 wires - transmit, receive, power, and ground. There are several versions which are mainly involving the speed that it uses. Most computers now have USB 2.0 (version 2) and some of the newest ones have version 3.0. There are 3 main connector styles A, B, and Miniature. A is flat, B is square(ish) and the mini is flat but a lot smaller. Most of the new cell phones use the mini for hooking to a computer and to charge the batteries. Many CNC systems also use a USB cable to provide low voltage (5V) to run some of the electronics on the controls. There are some hobbyist systems moving to USB since the other ports are going away. They will have another microprocessor on separate boards to handle the timing and control. The latest trend is adding the ability to do this over a network connection instead of USB.

    General Purpose Operating System and Real Time Operating Systems

    Usually you have no control over this. Windows is a General Purpose Operating System. When you run your computer, lots of programs are running at the same time. When the system is busy, it will let the instructions pile up in line and get to them when it can. Normally, this is ok but when you are trying to control stuff with millisecond precision, it can cause problems. If you are using LinuxCNC (used to be named EMC2) to run your computer, it has what are called Real Time extensions built into the main part of the system. A Real Time Operating System doesn't let the instructions pile up. It gives some priority and tells the other stuff to go away and try later when it is not busy. This allows more accurate timing. The high end CNC systems will have their own computer built in with a Real Time Operating System built in.

    Pulse Train

    The signals to communicate to the motors for each move are like an old fashioned telegraph line. These are like turning a light switch off and on really fast to signal each move. This is the rate of how fast those signals can be and still be read.

    Debounce

    Turn a light switch on really slowly. There will be a point where it is almost making contact and the light will flicker really fast as the spark jumps the gap. This can happen with switches in the system too like the limit switches at the end of motion stops and emergency stop buttons. The computer will have a procedure to watch those little spikes of power to wait and make sure that the little spikes when the switch is turned on or off are not interpreted as separate off and on signals.


    Well, that is enough to get you started. If you want to know more about something, speak up.
     
  8. blacksmith

    blacksmith United States Iron Registered Member

    Likes Received:
    0
    Trophy Points:
    1
    City:
    Augusta
    State:
    Kansas
    I would like to add a few and a slight correction:

    Motion Controller

    These are similar to a breakout board. However they typically are "smart cards". That means they "intercept" the signals from the PC and allow a very nice thing to happen. The PC no longer has to maintain a steady pulse train for the stepper driver or servo amplifier. The motion controller takes over that function. The PC can get up to perhaps 100,000 pulses at best out of the parallel port. Motion controllers can get up to 10 million in the same amount of time. They use a dedicated clock circuit to produce the pulse train. Computer CPU work load is no longer an issue. Here are a couple of examples. For Mach3, the Smoothstepper. For LinuxCNC, the Mesa series of "Anything I/O boards". The Mesa 5i25 is an economical solution for LinuxCNC users. Motion controllers are very useful for both stepper motor solutions and servo motor solutions. The motion controller offers distinct advantages for each system. Fast speeds are not the only consideration. 100,000 pulses per second is faster than most CNC systems need. It's the smoothness of the pulse train that is very desirable here. Don't buy a motion controller just because it is the fastest. You probably won't use the extra speed. The added I/O for limit switches, home switches, etc. and the smoothness of the pulses for your machine are much more important parameters when considering a motion controller.

    Stepper Motor

    A motor that moves one increment when the pulse of electricity goes through it. Very powerful but loses torque as it speeds up. The stepper motor draws the same current at low speeds as it does at rest. They are designed to run very hot. Some driver cards reduce the "resting" current to help the motor run a little cooler when it is stopped. It then switches to full current when stepping.

    Holding Torque

    The torque that a stepper motor can produce when not receiving pulses. This is directly tied to it's ability to hold a load at a given position. Turning off the "current reduction" in a driver circuit may help to increase this load holding capability. Most CNC applications work best with current reduction enabled. Some stepper drivers do not allow it to be turned off.
     
  9. blacksmith

    blacksmith United States Iron Registered Member

    Likes Received:
    0
    Trophy Points:
    1
    City:
    Augusta
    State:
    Kansas
    Hi Billy,

    #1 - Choosing Software / OS: For a beginner (which I am!) , you have two options in my opinion. Others may disagree.


    • [*=1]Mach 3 - Runs under Windows, has a large following. Windows is not a real time operating system. The developer of Mach uses a "plugin" that allows the PC to produce a very good pulse train. Not perfect, but very good and very usable. Most users are very satisfied.
      [*=1]LinuxCNC - Runs under Linux / Ubuntu. Very good user support forum, answers are typically fast and accurate. LinuxCNC uses a special OS implementation called "RTAI". That means it is optimized to provide a smooth pulse train from the parallel port. Experienced LinuxCNC users report that it is more powerful and can control literally any motion platform. I agree, but for a beginner this is a moot point. We are interested in routers, mills, and lathes for the most part.
      [*=1]Either option is viable. LinuxCNC takes more head scratching at first because you have to find your way around Ubuntu. If you don't mind this extra learning curve and like to figure things out LinuxCNC works very well. This was my choice. Linux has come a long way. The user interface is similar to Windows, but is "simpler". Instructions for installation are very good. Most people use the "LiveCD" method.
      [*=1]Be aware that both have a huge fan base.


    #2 - For beginners, I think a stepper motor based system is better. For the small machines that us home shop folks make, they are more than adequate and easier to implement.


    • Budget is always a consideration. If you can, buy an off the shelf solution. I chose CNCFusion for my SX3 build. There are many others.
    • CNCFusion kits work well with Automation Technologies Inc (used to be Keling) stepper systems.
    • The suppliers mentioned above were my choices. They have worked well for me. That does not mean they are the only choice, there are a lot of suppliers out there.
    • Many people do the whole conversion them selves by making all the parts and buying the ones they can't make like ballscrews. This can be more difficult because you have "size" everything yourself.
    • In any case, I would search the web and see what others have done with you particular machine and use solutions that are successful.

    To answer your question more directly, my path was to start reading information in the various forums such as this one and ask questions.

    What do you want make? This determines the style of machine. As another poster wrote:

    • [*=1]Large gantry type router for wood work and some light aluminum machining.
      [*=1]Benchtop mill for aluminum and light steel machining.
      [*=1]Lathe
      [*=1]Be aware that the CNC mill can be setup to make any part that you can make on a lathe that does not require a tail stock. See this video: http://www.youtube.com/watch?v=_2w8cYXt5_o

    I'm not sure I answered your question Billy.

    How did I do?

    Regards,

    Matt
     
  10. David Kirtley

    David Kirtley United States Active User Active Member

    Likes Received:
    9
    Trophy Points:
    38
    City:
    McAllen
    State:
    Texas
    Hey Matt, those Mesa Anything I/O boards look pretty cool. I was not familiar with them. I especially like the ethernet version 7I80DB Ethernet Anything I/O card. Looks like it would be especially nice for controlling multiple machines or something with more sophisticated things like tool changers. Do you happen to know if they require the real time extensions?
     
  11. DMS

    DMS United States Active User Active Member

    Likes Received:
    16
    Trophy Points:
    38
    City:
    Santa Clara
    State:
    California
    Double check compatibility first. I don't think the Ethernet versions of the Mesa board are supported by LinuxCNC.
     
  12. blacksmith

    blacksmith United States Iron Registered Member

    Likes Received:
    0
    Trophy Points:
    1
    City:
    Augusta
    State:
    Kansas
    Hi David,

    Sorry, I can't answer your question.

    The folks at Mesa have been pleasant to deal with.

    Give them a call.

    REgards,

    Matt
     
  13. jeffm

    jeffm Active Member Active Member

    Likes Received:
    0
    Trophy Points:
    6
    City:
    Richmond
    State:
    Missouri
    I'm way late here, but I wasn't a member yet when this thread was born.
    This is a good description, I think, but I still can't quite see it. Can anybody point me at a link to a diagram or video?
    Thanks,
    Jeff
     
  14. DMS

    DMS United States Active User Active Member

    Likes Received:
    16
    Trophy Points:
    38
    City:
    Santa Clara
    State:
    California
    Here is a video on ball screw operation

    [video=youtube_share;kl6qNn9-nkk]http://youtu.be/kl6qNn9-nkk[/video]

    Here is a video on linear slides

    [video=youtube_share;rq4Pis6Zhf4]http://youtu.be/rq4Pis6Zhf4[/video]
     
  15. David Kirtley

    David Kirtley United States Active User Active Member

    Likes Received:
    9
    Trophy Points:
    38
    City:
    McAllen
    State:
    Texas
    Jeff,

    It is just ball bearings vs two items sliding against each other. The ball bearings reduce friction.

    Ball screws are basically a way to reduce the force needed to turn a high pitch screw. This goes back to the problem with steppers. They have a lot of torque when moving slowly but less when moving fast. A regular screw has a lot of mechanical advantage You don't need a big motor to turn it. The down side is that you have to turn it many times to get a lot of movement which can mean that the motor is turning fast enough that it loses torque (and other problems). To counteract this you can increase the pitch of the screw which makes it move more for each revolution. Let's use a 1/2 in screw as an example. A standard 1/2 in acme screw has a pitch of 10. That means that you can turn it 10 times to move one inch along the thread. Then you can have a multi-start screw. A 2 start screw will turn 5 times to move one inch. The motor only has to turn half as fast to get the same movement. The problem is that it also has 1/2 the mechanical advantage. They also have 5 start screws. They have 1/5 the mechanical advantage. With less mechanical advantage, the friction of the threads in the nut are a larger part of the force needed to move the screw. To overcome this friction, they put ball bearings between the threads in the nut and the threads in the screw. They also put a pre-load on the ball bearings to reduce the backlash.
     
  16. plm

    plm Iron Registered Member

    Likes Received:
    0
    Trophy Points:
    1
    City:
    Orlando
    State:
    Florida
    First off, this thread is a great learning tool, especially for a beginner. I commend all of you who have contributed your time to help others. Now, my question: As I understand it, the basic procedure to get from an idea to a machined part is as follows. Design the part using some form of CAD. Upload that drawing to the Mach or other program which converts the design into G-Code and then sends that information to the controller which in turn, controls the motors and thus the machine. Is this about right or am I missing something? Assuming that I have this basic concept correct and I then correct in saying that without CAD you're up the creek without a paddle? In other words there is no other way around the need for CAD?

    Thanks to all

    Patrick
     
  17. Hawkeye

    Hawkeye Canada Active User H-M Supporter-Premium

    Likes Received:
    281
    Trophy Points:
    83
    City:
    Kelowna
    State:
    British Columbia
    Patrick,

    You're really close. That's what I thought when I started down the CNC road. From Cad, you need to go through a second program which generates the G-code, then feed the G-code into Mach3, which tells the breakout board (controller) what to send to the stepper motors.

    Some of us are using D2NC (Design to numerical control) software as the second step. It doesn't do everything (there's a list of shapes in CAD that it won't do directly, like ellipses), but is a good starting point for us beginners. There are some work-arounds you can make up, such as making up an ellipse out of sections of arcs, which it can handle.

    D2NC can let you make up the shapes you want directly, without a CAD program. They have a shape library that you can draw from, and once you get used to G-code, there are some simple shapes you can write in from that knowledge.
     
  18. JohnAspinall

    JohnAspinall Active User Active Member

    Likes Received:
    0
    Trophy Points:
    16
    City:
    Lexington
    State:
    Massachusetts
    Real close, but just as a different perspective, here how I think about this.

    There's an information flow; it starts in your head, and ends up with motors moving. You've mentioned some assorted players along the information flow (e.g. CAD program, Mach,...) but it's just as important to know what form the information takes along the way. A simple version might be:

    1. A CAD program turns keystrokes and mouse clicks into a description of shape (e.g. dxf file, AutoCAD file).
    2. A CAM program turns a description of shape into a description of tool path (nearly always some flavor of G-Code).
    3. A G-Code interpreter (e.g. Mach) turns a description of tool path into motor motions (e.g. coordinated steps for stepper motors, position commands for servos,...).

    That's the main highway. There are assorted shortcuts and detours. For example, if the shape is really really simple, you might know the best (or only) toolpath in your head. You could skip 1 and 2, and write the G-Code yourself, if you're so inclined. Sometimes people will take the G-Code written by a CAM program, and "tweak" it by hand. Hawkeye mentions D2NC which (my perspective) is roughly a CAM program filling slot number 2 above, but designed to take shape input directly from the human, instead of from a CAD program.

    Just my perspective, but: shape >> toolpath >> motor motion is central for me.
     
  19. plm

    plm Iron Registered Member

    Likes Received:
    0
    Trophy Points:
    1
    City:
    Orlando
    State:
    Florida
    Hawkeye and John

    Thanks for the description of the process. I believe I have a pretty firm grasp of the process now. I hope this thread continues as there is a host of information here for the person new to CNC.

    Patrick
     
  20. jumps4

    jumps4 Global Moderator Staff Member Active Member

    Likes Received:
    177
    Trophy Points:
    63
    City:
    New Port Richey
    State:
    Florida
    I use d2nc to convert dxf files into g-code it is faster than using d2nc to draw. d2nc is really easy to use the import and convert functions and does a lot of really nice functions like tabs.
    steve
     
  21. Tony Wells

    Tony Wells United States Vice President Staff Member Administrator

    Likes Received:
    19,041
    Trophy Points:
    113
    Location:
    Tyler, Texas
    City:
    Tyler
    State:
    Texas
    One thing not mentioned (unless I missed it....sorry if so) is what I know as a Post Processor. Short form: Post. Not the same as P.O.S.T. for all the PC nuts here. Is is a simple translation program that must be custom tailored to each machine control type. Some controls don't read every M and G code the same, or some not all the same set. So, if you have a certain control, say, a Fanuc 0T (oldie, I know), you have to run your code AFTER (hence the term post...) writing it, whether manually, or with some CAM assistance, to actually "fit" the control on the machine you want to run the program on. You can have the same basic source program, and multiple post processors make it compatible with any control you have. Some of this will not apply to home-brew CNC, but factory but controls require this treatment.
     
  22. LoboCNC

    LoboCNC United States Iron Registered Member

    Likes Received:
    1
    Trophy Points:
    3
    City:
    Bellingham
    State:
    Washington
    Re: Basic CNC - a compilation of info.

    I've been looking over this thread and it contains a lot of useful information but it is kind of scattered around. I'm putting together a (hopefully) coherent description of a lot of CNC basics on my web site at:

    lobocnc.com/chapter1.html

    I currently have brief chapters on motor basics and types of motors and am planning chapters on motor controller electronics basics for the different types of motor controllers, and a final set of chapters on software (G-code interpreters/machine controllers, CAD, CAM).

    I'm trying to keep it succinct and tailored to CNC applications. Before I get too far into it, I'd love to have people take a look and give feedback (more detail, less detail, less boring, etc.). Hopefully you'll find it useful.

    Thanks, Jeff
     
  23. DMS

    DMS United States Active User Active Member

    Likes Received:
    16
    Trophy Points:
    38
    City:
    Santa Clara
    State:
    California
    @Tony Wells: For AlibreCAM (the only package I have any real experience with), you get a ton of post files, including one for LinuxCNC (though, it's labeled Sherline, because Sherline uses LinuxCNC), and one for Mach3. I'm assuming other CAM packages are similar.

    @LoboCNC: I didn't look through everything, but it looks like you have gotten a good start.
     
  24. Syaminab

    Syaminab Active User Active Member

    Likes Received:
    2
    Trophy Points:
    18
    City:
    Monterrey
    Re: Basic CNC - a compilation of info.

    I think your machine is great, If is possible for you to set it in the Market for a fair price accesible for students, you will detonate a enthusiasm for more hobbiest and people to get into machinning. Great Job.
     
  25. dustooff

    dustooff Australia Active Member Active Member

    Likes Received:
    0
    Trophy Points:
    6
    City:
    Toowoomba
    Hi all,
    I've come to this thread late, but here are some more sources of info that kept me on track for my build.

    http://lcamtuf.coredump.cx/gcnc/ the Guerilla guide to CNC machining.


    Alan Marconett KM6VV http://www hobbitengineering com (has new website, prob to avoid being linked to middlearth.)
    http://www.marconettengineering.com/
    View attachment CNCforHobbyists.pdf 5000 ft view roadmap. He doesn't seem to have it on his new website.


    http://visualsizer.com/tag/stepper-motors/ this guy wrote the book on stepper motors.

    regards
    Andrew Burchill
     
  26. awander

    awander United States Active User Active Member

    Likes Received:
    13
    Trophy Points:
    18
    City:
    Upper Black Eddy
    I'm coming in late here, but I see a few slight misstatements in the explanation of why a stepper motor is different from a regular DC motor.

    The misstatements are that steppers take in a pulse of power and move one step.

    That is only true if you consider the stepper motor drive to be a part of the motor.

    The drive is what takes the input pulse(or step) and converts it to what the motor actually needs-which is more complicated. It consists of applying/removing power to/from the proper windings to actually move the motor, and when the move is finished, keeping the power applied properly to hold the motor in place. If you just "pulse" the power to the motor, it may move, but it will not stay in position after the pulse is finished.
     
  27. dave2176

    dave2176 United States Active User Active Member

    Likes Received:
    149
    Trophy Points:
    43
    City:
    Bountiful
    State:
    Utah
    What about limit or home switches. What are their restrictions? My mill came with limit switches on x and z. Can they be used? If I need to buy new ones what am I looking for?



    Thanks,

    Dave
     
  28. DMS

    DMS United States Active User Active Member

    Likes Received:
    16
    Trophy Points:
    38
    City:
    Santa Clara
    State:
    California
    What are you using as a controller? What about interface hardware? These will both effect what you can do with the switches. For LinuxCNC, all you need is some spare inputs. Then you attach the sensors to the inputs and configure the software.

    Keep in mind that home and limit sensors are used for 2 different things. Home switches allow you to locate your position relative to the machine after a power up. Limit switches are a safeguard to keep you from moving an axis too far (and possibly doing damage).

    If you can tell us more about your setup, we can provide more guidance.
     
  29. dave2176

    dave2176 United States Active User Active Member

    Likes Received:
    149
    Trophy Points:
    43
    City:
    Bountiful
    State:
    Utah
    Thanks DMS,
    I have a C10 parallel controller, 2 640 oz steppers with 5056D drivers from Automation Technologies for X and Y and a 1805 oz stepper with 11080 driver. The computer is an older 2.1GHz that dual boots between LinuxCNC and Windows XP with Mach 3. I'm leaning towards Mach because I like what I'm reading about Mach 4 and would like to move to USB or Ethernet as budget permits.

    I guess the question really is, what am I missing to get this G0755 off the ground?

    Thanks,
    Dave
     
  30. DMS

    DMS United States Active User Active Member

    Likes Received:
    16
    Trophy Points:
    38
    City:
    Santa Clara
    State:
    California
    I started with the C10 and Linux CNC. Ran for about a year like that before I upgraded to some controller cards from Mesa.

    The main issue with the C10 is that you are really limited on inputs (5 inputs if you use the configurable pins as output, which is what you have to do for a 3 axis machine). To give each sensor it's own input, you would need 9 (2 limit sensors and a home switch for each axis). What I did (and what you will have to do) is to run multiple sensors into the same input. I think I gave each home switch it's own input, and then all of the limit switches went into the last input. It works fine, but when you hit a limit, it is not that clear as to which one you hit, and you have to hunt around a bit.

    As far as getting the machine running, I would worry about your motors first. Get things moving first, then set up your switches. Limit switches are great, but they can be a pain when bringing things up, as things may suddenly stop on you making you think something broke, when in reality, the software just faulted out.

    One last thing, make sure that you wire your switches up so that they are fail safe. This means that if the wires leading to the switches is damaged, or if they are totally disconnected, the machine should not run. If you do not do this, then the switches won't really do anything other than giving you a false sense of security (meaning they won't save your bacon when it counts).
     

Share This Page