Grizzly G1006 Milling Machine CNC Conversion

More
22 Oct 2012 06:00 - 22 Oct 2012 15:05 #25580 by BruceLayne
Quick Question: Could someone recommend a method to use LinuxCNC to drive 3 axes of stepper motors with encoder feedback to close the loop instead of running the steppers in open loop mode, control the spindle speed of a VFD. and have a spindle encoder with index pulse? Preferably the quickest and cheapest method? :) I'm trying to start with an open loop stepper based system and eventually get all the bells and whistles, as described in too much detail below.

The Milling Machine: www.grizzly.com/products/2-HP-Mill-Drill/G1006



I started to CNC my little Grizzly G1006 benchtop milling machine soon after buying it, many years ago. I bought $900 worth of servo motors (way more expensive back then), but got busy and shelved the project. I'm now using those servo motors on the CNC retrofit of my Clausing 10"X24" lathe.

Part of the reason that I didn't do the CNC mill conversion earlier is because it seemed like such an exercise in turd polishing. I could add servo motors and ball screws, but it'd still be a cheap import mill. Don't get me wrong. That little milling machine has paid for itself five times over on the simple and occasional jobs I've done. It's probably paid for itself ten times over if I include all I've learned while using it.

Lately, I've been once again thinking it'd be nice to have a CNC milling machine, but the idea of selling the Grizzly milling machine and moving it out of my basement, and buying a Bridgeport style milling machine on Craig's List and moving it into my cramped basement was just too much to contemplate. Realistically, the Grizzly's ways are still in good shape and it'd be capable of doing pretty much everything I'd want it to do once I had it moving under CNC power and added ball screws to eliminate the horrendous backlash in the Acme screws. So I decided to see what I could do with stepper motors to do the job as easily and inexpensively as possible. Stepper motors have improved quite a bit lately.

My plan is to eat this CNC milling machine project a few small bites at a time.


STEP 1

1600 ounce inch stepper motors for all three axes. I just bought a $536 kit.

www.ebay.com/itm/170921724903

The kit includes the three stepper motors and the newer stepper drives that result in quieter stepper motor operation. It's still not as quiet as a brushless servo motor, but most of the harsh stepper noise is eliminated. The motion control kit also included the DC power supplies to power the drives, and an optically isolated breakout board for parallel port control. I plan on using LinuxCNC parallel port bit banging for this simple and hopefully quick project. I'd normally insist on optical isolation, but realistically, I paid $50 for the PC on Craig's List. Is that worth spending much money to protect? Besides, the motor drives are already optically isolated. I bought dual shaft motors, thinking ahead a bit for later stages in this incremental project. I should be able to make some motor mounts and have the CNC milling machine moving fairly soon, for about $600. At this point, it'll be limited to mostly point-to-point motion where the backlash isn't a problem.

As simple and cheap as the project is so far, it'd work well for one of the short run jobs I do, manufacturing parts that I sell. A few hours of manufacturing those parts would pay for the project so far. Automation is good. I'm looking forward to having LinuxCNC making my parts so I'm not turning the handles.


STEP 2

Add a three phase motor and VFD so I have PC control over the spindle speed. I hate moving belts to change the spindle speed. I found a great deal on a shiny new 1.5 HP Baldor motor on eBay for something like $45 delivered, so I bought it for the milling machine about a year ago, even though it wasn't an active project. I bought a $106 Chinese VFD for the milling machine soon after buying the same VFD for my CNC lathe project and liking it, thinking I'd have LinuxCNC generate an analog control voltage. Now that I'm trying to get by with a stock PC running LinuxCNC and no motion control boards, I don't have the analog velocity control signal. There is probably some simple and cheap hardware that will allow LinuxCNC to generate that analog control voltage. If not, I can buy essentially the same Chinese VFD with Modbus control via RS-485 and LinuxCNC can control it via the RS-232 serial port. This is rumored to work with the $250 GS2 VFD from Automation Direct, so it should work with the $117 Chinese VFD from eBay?

VFD: www.ebay.com/itm/300652886556

LinuxCNC Modbus Control Of A VFD: wiki.linuxcnc.org/cgi-bin/wiki.pl?VFD_Modbus


STEP 3

Add Chinese ball screws, at least for X and Y, to eliminate the backlash. I'll get a max speed upgrade too, by eliminating the friction of the Acme screws. Put CUI encoders on the ball screws. Then I can have a true CNC system with relatively low cost stepper motors but also have servo feedback of the motion to generate following error and close the loop on the stepper motors. That would allow me to push the feed rate a bit harder without worry over lost steps. I'm uncertain about the cheapest/easiest/best hardware to get the three encoder signals into LinuxCNC, and how to configure LinuxCNC for a stepper system with encoder feedback.


STEP 4

Add hand wheels on the back shafts of the motors so I can power down the stepper motors and use the milling machine as a manual milling machine with LinuxCNC providing a digital readout and spindle speed control. The digital readout is such a useful feature that I'm surprised more people aren't adding encoders (or glass scale linear encoders to bypass the backlash issues) and using LinuxCNC without any motors to make a low cost DRO.


STEP 5

Build an enclosure for the entire milling machine to contain chips and coolant, and make it into a poor man's vertical machining center.

I have a few ideas about how I might make a poor man's tool changer by giving up some of the X table motion that I generally don't use, but that's probably back into the realm of too much turd polishing.

I know a lot of people have already done a CNC conversion of these very popular little home shop hobby mills, but I didn't find anything in this forum when searching for G1006. This machine is sold in slightly different versions under various names. I think Rong Fu makes them, and markets it as the RF-30. I've read some interesting accounts of CNC conversions of these milling machines, but I haven't been looking lately. I need to search and do some more reading before I go too far down this path. I remember a video of a guy who was a semi-retired machine builder who did a remarkable job converting one of these machines, with all of the bells and whistles - flood coolant, fully enclosed in powder coated sheet metal, and a tool changer!



On the other end of the budget spectrum, here's a guy who used Arduino to CNC one of these milling machines.



For now, I'll be happy to have an open loop stepper based machine, even with the Acme screw backlash. Simply automating some of the jobs I do now would be a big help and great bang for the buck. But I would like to start out with enough of the final goal in mind that I'm not ripping out previous work when I move to the next stage.

Starting out, I feel a little bit like the Underpants Gnomes on South Park.

Step 1 - Collect underpants
Step 2 - ????
Step 3 - Profit!

http://johndorris.files.wordpress.com/2011/06/underpants_gnomes_all.jpg?w=300&h=178
Last edit: 22 Oct 2012 15:05 by BruceLayne. Reason: Fixed typo

Please Log in or Create an account to join the conversation.

More
22 Oct 2012 12:16 - 22 Oct 2012 12:16 #25597 by BigJohnT
Normally with steppers you don't use encoders due to the fact that you can't just apply more power to a stepper like you can a servo to "catch up". There have been a few cases that I've heard of using steppers and encoders. The things that I remember are they used stepgen in velocity mode and the encoders had to have at least twice as many lines per rev as the step pulses per rev.

Some suggestions to get started
  1. Install LinuxCNC in your computer
  2. Run the Latency Test for several hours
  3. Create a config using Stepconf Wizard or copy a sample config
  4. Connect up your drives and steppers and verify that they work as expected
  5. Install the steppers and use the VFD manually
  6. Start making parts while you consider the next steps

John
Last edit: 22 Oct 2012 12:16 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
22 Oct 2012 15:04 #25614 by BruceLayne
I already have LinuxCNC 2.51 installed in the $50 Craig's List PC, with a good latency test. I did an overnight memory test to make sure the memory was stable and there were no intermittent bit flipping errors, but I haven't done a two hour latency test. I have read about some "once a day" sort of latency problems, so I'll do the extended latency test.

I was considering the simple open loop stepper solution first, but I thought I'd pick the collective brain to avoid unwiring everything when I wanted to add encoders later.

I looked at the many offerings from MESA, but didn't see anything optimized for my unusual configuration with stepper motors and encoders. They have a good solution for steppers (5i25+7i76) and there's a good servo and encoder solution (5i25+7i77). I guess I could get the 7i77 solution and just leave the stepper motors connected to the parallel port.

I wasn't so much wanting the encoders to close the loop on the steppers and run them like servos. I mostly wanted the encoders to detect a rare following error, fault out, and stop the machine. I'm leery of open loop machines that could hit some harmonic zone, lose a few hundred steps, and then continue machining with a gross positional error like nothing ever happened. I won't be running this thing unattended for hours. It ain't that kind of machine. My jobs run for a few seconds or a few minutes. I'll be there as a part loading monkey, so I can detect any problems related to open loop operation. My parts are inexpensive, so the occasional scrapped part won't make me suicidal.

With the beefy 1600 ounce inch stepper motors, I may not need to worry too much about encoders to detect lost steps. The open loop stepper motors and manual spindle speed control may serve me well for a long time, and ultimately may be all that this import mill deserves. I'll probably want to upgrade to inexpensive ball screws, but all of my current production work is linear motions and the backlash isn't a problem. I could probably program the huge backlash into LinuxCNC as a backlash compensation to make it easier to write my point to point G code programs, lube up those Acme screws, and keep on truckin'. KISS.

I'll post some pictures when the stepper hardware arrives later this week, I'll post pictures and drawings of the motor mounts I create to mount the NEMA 34 motors, and I'll post a video of the machine making parts.

I guess it's time to buy another Sam's Club roll around tool cart to house the CNC electronics and the CNC PC, and find someplace in my cluttered basement shop to put it.

Please Log in or Create an account to join the conversation.

More
22 Oct 2012 15:54 #25623 by BigJohnT
When you get to that point run the stepper test in the manual to find out what the breaking point is for your steppers for direction reversal and speed. Back off from that 20% and make parts. The 5i25 7i76 combo is a fantastic setup. I use one on my plasma table.

A huge backlash compensation can be a pain to actually get it to work. At direction reversal the stepgen tries to move to the compensated position immediately. Better to try and fit some anti backlash to the acme nut until you get the ball screws installed. In any case if you use backlash make sure you make the adjustments to stepgen max acceleration.

At the end of each part if you go to a predefined position with match marks to check that would give you a quick visual that all is well. You can also use the match marks to home the machine until you fit it with limit switches which can be used to home to as well.

Also keep in mind that the 1600 ounce inch rating is while the stepper is not moving ie. how hard it tries to stay still.

John

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 13:14 - 23 Oct 2012 13:16 #25670 by andypugh
BruceLayne wrote:

There is probably some simple and cheap hardware that will allow LinuxCNC to generate that analog control voltage

Indeed there is. You need a capacitor and a resistor. The first picture here
www.linuxcnc.org/index.php/english/compo...id=27&id=24915#24915
You then set up a PWM module in HAL to output a PWM on a parallel port pin, then filter that to a DC voltage.

This might not be the ideal answer, as the voltage is sourced from the parallel port, not the VFD +10V (or whatever).
To emulate a potentiometer a slightly more complex solution is required.
You need an opto-isolator with a totem-pole output. This is important as you need a push/pull output to discharge the capacitor at logic-false and charge it at logic-true.
I used: uk.rs-online.com/web/p/products/734-4962/
Attachments:
Last edit: 23 Oct 2012 13:16 by andypugh.

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 13:36 - 23 Oct 2012 13:39 #25673 by BruceLayne
I was hoping that LinuxCNC supports a simple frequency to voltage converter. This is exacly what I was hoping to see. Thanks Andy. At the very least, you definitely saved me some googling when I got around to the VFD implementation. I'm trying to take this a step at a time, and I'm still at the stage where I'm making motor mounts. I hope to have simple XYZ motion in an evening. I'm trying to get this CNC conversion done as quickly and as easily as possible. I have many other not so easy CNC projects underway and I'm trying to get this machine to CNC productivity with the minimal distraction to the other competing projects.

I'm an EE, so the circuit is actually less valuable to me than the confirmation of the PWM signal generation in LinuxCNC. I may make am op amp circuit that can generate +/- 10VDC or 0 to 10 VDC and publish it for others to use.

My strategy will probably be to get the new spindle motor mounted and running from the VFD. I already ran the 220 VAC outlet for the milling machine when I installed the outlet for the lathe, so that unpleasant task is done. I'll get the VFD running in manual mode from the front panel and it'll be very usable for my simple needs. Then, I'll get the spindle under LinuxCNC control with PWM with the current VFD, or I'll buy a new VFD and use Modbus via the RS-232 port, through a converter to RS-485... whichever looks easier. I'm all about easier..

Thanks!
Last edit: 23 Oct 2012 13:39 by BruceLayne.

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 13:53 #25674 by andypugh
BruceLayne wrote:

I'm an EE, so the circuit is actually less valuable to me than the confirmation of the PWM signal generation in LinuxCNC.

www.linuxcnc.org/docs/html/hal/rtcomps.h...en_a_id_sec_pwmgen_a

I may make am op amp circuit that can generate +/- 10VDC or 0 to 10 VDC and publish it for others to use.

The circuit probably wants to emulate a Potentiometer, as that is what most drives expect. It is worth bearing in mind that some drives (the KBIC controllers for example) float the pot at mains voltage.
My first attempt at a controller for a KBIC used a DC-DC converter to create a floating reference voltage and a precision current source. On reflection that simple circuit above would have worked better and more cheaply.

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 15:25 #25677 by BigJohnT
BruceLayne wrote:

or I'll buy a new VFD and use Modbus via the RS-232 port, through a converter to RS-485... whichever looks easier. I'm all about easier..

Thanks!


Keep in the back of your mind that Automation Direct GS2 drives are supported in LinuxCNC via modbus over the serial port. You can set the speed, run fwd or reverse and check the status of the drive all from LinuxCNC. I used a 3hp single phase to three phase GS3 on my Bridgeport spindle. The setup is trivial. I did have to get the braking resistor to be able to reverse the spindle for rigid tapping.

www.automationdirect.com/adc/Shopping/Ca...-_460_-z-_575_VAC%29

John

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 16:53 - 23 Oct 2012 16:55 #25690 by BruceLayne
I looked into the Automation Direct GS2 VFD for my 1.5 HP spindle. The 2 HP GS2 is $251. That made me wonder if the $117 Chinese VFD with the Mitsubishi chip uses the same Modbus commands as the GS2. I bet it does. The GS2 looks a bit nicer, but they're probably both made in China. For my el cheapo milling machine conversion, I wouldn't mind saving $134.

I noticed that there were examples of using several different VFDs under Modbus control. I took a quick look at the GS2 version, but I need to compare them to see if the LinuxCNC side is similar. Or are there VFD specific Modbus commands? Even if so, I should be able to use the other example code and the Chinese VFD manual to make my own version and add it to the list for cut-and-paste support for the inexpensive Chinese VFD. BTW, what I've been calling the Chinese VFD is manufactured by Huanyang Electronics Company Ltd. Here's the current eBay auction:

www.ebay.com/itm/300652886556

My import mill has a belt driven spindle. I'm using Jon's clever dual gear tooth detector to generate a quadrature encoder on my lathe spindle. I could probably notch the spindle V-belt pully on my milling machine and use the same method, or laser cut a black polycarbonate disk for the spindle pulley and use optical switches in a similar configuration to make a quadrature encoder for the spindle, but I doubt I'll be doing any rigid tapping on that machine! Barring that, a simple one-pulse-per-revolution sensor could be fed to a LinuxCNC counter encoder to verify a rough spindle speed.
Last edit: 23 Oct 2012 16:55 by BruceLayne.

Please Log in or Create an account to join the conversation.

More
23 Oct 2012 17:36 #25694 by BigJohnT
That does look like a pretty good Chinese VFD and the Chinese can make good quality when forced to.

I didn't see the modbus protocol in advert... I'd bet if you had that you could modify the gs2.comp to work with any VFD that communicates with modbus. At least you can see the GS2 modbus info in the manual and if you can compare it to another VFD manual to see if they are close or even the same. I'd assume than anything beyond the modbus communications protocol will not be the same between different VFD's.

John

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.212 seconds
Powered by Kunena Forum