CNC question


I'm thinking (not too seriously yet) about building my own CNC router system. I'd control it from my notebook computer, and I'd like to program the control software myself. Are the servo motors each controlled with independent analog control circuitry, or can I get a feedback signal from each motor and use a self-programmed algorithm to control them simultaneously? If so, anybody know if I can use a simple PID control loop? Also, what control input do I supply to the motor, an analog voltage proportional to the desired velocity, a voltage proportional to the desired end position, a pulse-width-modulated signal?
Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Generally, there are three parts, the controller, the servo amplifier and the servo motor. The analog signal genereated by the contoller would be sent to the servo amplifier which then amplifies (duh!) the signal to drive the motor directly. Feedback can be taken from the motor (or ballscrew directly) using an encoder back to the controller.
Frank
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Josh (in snipped-for-privacy@g14g2000cwa.googlegroups.com) said:
| I'm thinking (not too seriously yet) about building my own CNC | router system. I'd control it from my notebook computer, and I'd | like to program the control software myself. Are the servo motors | each controlled with independent analog control circuitry, or can I | get a feedback signal from each motor and use a self-programmed | algorithm to control them simultaneously? If so, anybody know if I | can use a simple PID control loop? Also, what control input do I | supply to the motor, an analog voltage proportional to the desired | velocity, a voltage proportional to the desired end position, a | pulse-width-modulated signal?
I did a quick metacrawler search and one of the first entries found was a Seattle Robotics Society web page (http://www.seattlerobotics.org/guide/servos.html ) that answers the question: "What's a servo?" I think you'll find it helpful.
-- Morris Dovey DeSoto Solar DeSoto, Iowa USA http://www.iedu.com/DeSoto
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

This sounds more like it belongs in the sci.electronics.* hierarchy... You may want to post it there.
Puckdropper
--
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In my opinion your brief question might take several volumes to answer but I'll comment briefly on some of the key points.
Typically the controller PC has a special card with digital outputs for each axis W, X. Y. Z. And feedback loops associated with each Axis. This connects to an interface to take the PC signal level voltages and make them proportional voltages (+ and -) to feed the servos. The servos draw much more current than the common PC can provide, hence the interface.
Shop Bot has some entry level equipment that might be a good place for you to start.
Don Dando

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I figured as much. I already have an interface with more than enough channels of digital-analog and analog-digital conversion. I can build the amplifier stage myself; that's a pretty simple circuit.
I think my best bet may be to just get myself a motor and start playing.
Thanks, Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I think my questions in the OP were too specific. Sorry. I'll do some more research.
I guess something that would be helpful is a website or some input from somebody who builds these for a hobby. I'd be doing this mostly for the challenge and enjoyment of designing, building, and programming the thing. Anyone with enough money can buy a WXYZ stage, some motors and control boards, a computer interface, and some software. With more money still, one can buy a really nice turnkey CNC router. I'd rather approach it more from the hobbyist point of view. Do people always buy motors specifically for CNC or are there junkyard "goldmines" where I could bastardize a motor off something else? Like a cruise control servo for example - I highly doubt that would work, but is there some other ubiquitous source commonly found in junkyards or used appliances or whatever?
I just remembered that I have a neighbor who builds battle robots. I guess I should talk to him.
Thanks for your inputs.
Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Josh (in snipped-for-privacy@o13g2000cwo.googlegroups.com) said:
| I think my questions in the OP were too specific. Sorry. I'll do | some more research. | | I guess something that would be helpful is a website or some input | from somebody who builds these for a hobby. I'd be doing this | mostly for the challenge and enjoyment of designing, building, and | programming the thing. Anyone with enough money can buy a WXYZ | stage, some motors and control boards, a computer interface, and | some software. With more money still, one can buy a really nice | turnkey CNC router. I'd rather approach it more from the hobbyist | point of view. Do people always buy motors specifically for CNC or | are there junkyard "goldmines" where I could bastardize a motor off | something else? Like a cruise control servo for example - I highly | doubt that would work, but is there some other ubiquitous source | commonly found in junkyards or used appliances or whatever?
While you were posting I was soldering up a 4-axis stepper control/driver board for use in a PC-controlled CNC joinery machine. A quick search indicates that there's no shortage of available info, and your O/P didn't give much to go on with regard to your experience with servos, control systems, or machine design.
I bought four new 200 oz-in 1.8 degree step motors because I didn't want to deal with motor problems and because I need identical performance from at least two of the motors (the ones that move the gantry along the x-axis).
I bought a four-axis driver PCB because I couldn't make one for less than the price I paid; and because my interest isn't really in circuit design and PCB fabrication. The board allows me to operate these steppers in modes ranging from full-step (which will provide a step size of 1/2400" on all axes) down to 1/16-step (which would produce a step size so much smaller than the tolerances of the mechanicals as to be a waste of processing time.)
Writing the software is turning out to be an "interesting" exercise, since it's not enough to simply drive the steppers from point-to-point at constant speed. Every movement needs to take into account the friction and mass component of each axis as well as changes in direction to avoid problems of lost steps (which won't be a problem with servos) and overshoot. With servos, you trade off my problem of lost steps at the beginning of a move for undershoot problems at the end of the move.
I'm building my own linear bearings and using 3/8"-12 Acme threaded rod with shop-built delrin followers for mechanical drive. Most of the machine body will be constructed of baltic birch ply.
The machine will be approximately 24"x16"x14" with a 12" x 12" x 4" workspace - subject, of course, to revision at any time.
Sorry I can't be much more help with servos.
-- Morris Dovey DeSoto Solar DeSoto, Iowa USA http://www.iedu.com/DeSoto
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Morris Dovey wrote:

Good point. My Ph.D. work focused on RF electromagnets, but I've taken undergrad and graduate courses in control systems and linear systems theory. However, I never took a robotics course. I do have a fair bit of experience with design and construction of various instrumentation. I've done plenty of computerized data acquisition and programming thereof.

It may be the same for me. If I can control the motors directly with my data acquisition card and some simple amplifiers I may be able to implement almost everything in software. That would definitely be cheaper (considering that I already have the card).

I had thought about using stepper motors for ease of use factor, but my hesitation involves lost steps, as you mention. Do the motors provide any sort of feedback that they've missed a step?
As I understand, analog servo controllers use proportional control and are, therefore, subject to undershoot near the end of a move. That's why I was thinking PID. I'd just have to make sure the derivative term was big enough to avoid overshoot. PID's so simple to implement in analog, I'm surprised the default controllers don't use it.

That's really similar to what I was thinking, with overall dimensions varying accordingly, of course.
By the way, I don't have my mind made up 100% for servos versus steppers. You chose steppers. In your opinion, is that a better way to go overall, or did you decide based on price/availability.
Thanks, Morris.
Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Josh (in snipped-for-privacy@o13g2000cwo.googlegroups.com) said:
| Morris Dovey wrote: || || Writing the software is turning out to be an "interesting" || exercise, since it's not enough to simply drive the steppers from || point-to-point at constant speed. Every movement needs to take || into account the friction and mass component of each axis as well || as changes in direction to avoid problems of lost steps (which || won't be a problem with servos) and overshoot. With servos, you || trade off my problem of lost steps at the beginning of a move for || undershoot problems at the end of the move. | | I had thought about using stepper motors for ease of use factor, | but my hesitation involves lost steps, as you mention. Do the | motors provide any sort of feedback that they've missed a step?
It's possible to buy steppers with integral encoders and it would seem reasonable to expect that encoders can be added to motors that lack them. I chose simple steppers without encoders for economy - and because the larger CNC machine in my shop functions quite well without the benefit of feedback. (You're invited to use the link in my sig and take a photo tour of my shop - there are a number of photos of the ShopBot in the project area.)
I don't plan to operate these anywhere near the "edge of the envelope" where missed steps are likely to pose a loss-of-position problem. I'm putting limit switches on all axes and plan to force a re-zero if one of the switches is closed during operation.
| As I understand, analog servo controllers use proportional control | and are, therefore, subject to undershoot near the end of a move. | That's why I was thinking PID. I'd just have to make sure the | derivative term was big enough to avoid overshoot. PID's so simple | to implement in analog, I'm surprised the default controllers don't | use it.
AFAICT, there don't seem to be any low-cost solutions for the full spectrum of possible problems. In this design iteration, I'm much more concerned about reliability and accuracy than I am about speed - which is where most of the pitfalls seem to lie.
| By the way, I don't have my mind made up 100% for servos versus | steppers. You chose steppers. In your opinion, is that a better | way to go overall, or did you decide based on price/availability.
There were a number of reasons. AFAICT, both approaches are workable and can readily provide everything that's needed for even the pickiest of woodworkers.
The machine I'm building is an already-sold manufacturing prototype and the customer would like to have it in his hands by the end of the month - so I'm trying to keep to a fairly crisp schedule. Since I have more experience with steppers, I decided to stick with them until I had a better handle on where any gremlins might be lurking. It also helps relieve some of my schedule pressures.
Still, there are inexpensive PIC processors with on-board PWM controllers that look like they might be fun to play with...
I'd suggesting building with whatever you're comfortable - you can always use that experience to incorporate improvements, experiment with other technologies, etc.
-- Morris Dovey DeSoto Solar DeSoto, Iowa USA http://www.iedu.com/DeSoto
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Josh wrote:

You'll want to hang out at cnczone http://www.cnczone.com/forums/vbgarage.php?do=list
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thank you! That's the kind of site I was looking for.
Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Ah ... here's the issue ... you are thinking of using servos, not Servo Motors.
Here's the issue ... Servos are typically limited rotation devices meant to move to and hold a position based upon a voltage input. Typically they are used (as you mentioned in another post) for cruise control operation. They are also used for radio controlled model control, and if you dig far enough, damper control for industrial and commercial HVAC systems. In all of these, you provide power and a position signal, and you get typically 90-180 movement. The feedback element is a potientiometer attached to the output shaft, and a simple comparator keeps the input voltage (the reference) and the feedback (the pot voltage) the same by moving the motor shaft. As I said, limited rotation, very limited torque, and probably not a good choice for a CNC router application.
A Servo Motor (with it's attendent controller/power supply) takes commands and translates them into movement. The typical Servo Motor is a 3-phase device with an attached shaft encoder that can provide a fairly accurate shaft position with many revolutions. The controller will typically be programmed for a fixed movement, such as a flying shear mechanism riding on a gantry atop a moving web of aluminum siding. The Servo Motor moves the shear mechanism along with the aluminum and cuts the typically 12-14 foot pieces to 1/64" continuous at a rate of 4-6 inches per second, then returns and catches up with where the next cut is to take place, and repeats. All Day Long.
These are not cheap, but are VERY good for fixed programmed tasks like this. Again, probably not the best solution to your job. One of the downsides (besides price) is the low torque at low speed inherent in most AC motors. Slow getting off the line and not all that good on sudden reversals (yes, I do know about those issues).
Probably your best bet is to look at stepper motors. Being a DC motor, the low speed torque is high (the torque drops off with higher shaft speed). They run on 12-72 volts (for typical steppers), and you can either purchase a stand-alone stepper and build your own electronics, or you can purchase the electronics designed for the motor (either as a stand-alone controller, or as an integral part of the motor).
Finding the right sized stepper motor on the surplus market is probably not going to be easy, or repeatable, but don't let me stop you. You really need to understand the system dynamics such as load mass, desired speed, acceleration and deacceleration requirements, hold-back (will you need to provide holding current?) current control, overhauling loads, and so on. Assuming you are using an acme screw, you can calculate your required moving torque from the load mass, the friction coefficient of your acme screw and associated guide rods and bearings, plus the required speed. If speed is not an issue, you can typically use a smaller motor or a faster screw ratio.
I've used a intelligent stepper motor, one with the drive and control electronics embedded within the motor. On the system I helped design and build, we have 14 stepper motors running off of three power supplies and one common RS-485 communications line. We issue movement directions from a host PC (Visual Basic application), but have preprogrammed the motors for their individual tasks ... our X1 and X2 axis motors, as an example, run much slower, since they're carrying the Y and Z axis stuff with them (more mass). We've been able to optimize movements based on actual loading (ours is a consistant load since we're moving test probes and cables, and the weight doesn't change), so simple absolute moves are sufficient for our needs. We've already taken into account the acceleration and deceleration requirements so we don't overshoot the target. We're seeing repeatable 1/1000" inch placement on a system that really could deal with 1/10".
These motors are not cheap either. Our 1061 inch/ounce (torque rating) motors are somewhere around $500.00 each, more if you include the 6 amp 72 volt power supply you'll need to run it. Since we only run one motor at a time we can get by with a 20 amp, 72 volt supply for two of the three systems, and a 24 volt 20 amp supply for the third (it's only carrying about 8 pounds).
If you want to build your own stepper controller, there are quite a number of reference designs around. You will find stepper IC chips are still manufactured and the documentation is pretty good. You won't be able to beat the off-the-shelf pricing by any means short of having a very well stocked shop however.
I think you need to understand what your expectations are first, and then look to see if there aren't commercially available components or systems available to fill that need. If you want to build it yourself, I'm all for it ... I'd rather be woodworking myself!
Regards,
Rick
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thank a million. Good info to have. It was a nomenclature issue; I was thinking servo motors but said servos. I'm glad to know the distinction.
My biggest technical unknown with stepper motors (and I mentioned it in another post) is that I'm not sure how you know if a motor has skipped a step under a high load condition. Unlike your application, my load will vary depending on what I'm cutting and the direction I'm going. Do you just size the motors big enough to avoid the issue?
Thanks. Josh
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Glass scales?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

No, actually you oversize the motors so you don't come close. Then, you add a built-in encoder and you compare what the encoder just told you to what you just told the motor to do. Any delta and you've slipped. You need more than a little margin, because as you know, wood densities vary, as well as tool sharpness. Combine a tough wood with a dull bit and you're working things pretty hard.
External encoders aren't too expensive ($100.00 each) and can be adapted where you just can't fit an encoder in the motor; deriving useful information from that encoder will set you back just a bit more, but there are DSP processors with two-channel encoder input support (Freescale 56DSP50x series) that can speed that process. These same processors have 6-12 PWM outputs, 8-16 12-bit ADCs, as well as fault monitoring for up to 6 inputs (gee ... sounds like they had motor speed control in mind when they designed this series). There are commercially available boards with these processors integrated on them available (again at a reasonable cost ... $100-200 range).
It would be nice to monitor your router (spindle) current and use that to limit peak speed travel ... with a variable frequency drive controlling your spindle you have the option of taking an analog output that is controlled by the actual motor current. I know ... nice to have. BTW, motor current, when cutting a fixed material (say UHMW or HDPE) CAN indicate whether the tooling needs replaced, but that's overkill when you can look at the tool and feel the (lack of) sharpness. Not so handy when cutting pine and then oak and trying to draw a useful conclusion.
If you don't push the motor to its limits, you probably don't need an encoder ... monitor your motor current and ensure you stay below the full load current, and you should be ok. I'd run around 60-75% FLA and anything that causes current to increase beyond that would trigger slowing the travel speed down. In the end you have the same result, no skipped steps and maximum cutting speed for a given material.
Regards,
Rick
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Related Threads

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.