View Full Version : First-Ever CNC project

05-19-2008, 01:06 AM
Hi Guys.
Just thought I'd scatter some evidence here from my latest project.

I've wished for a CNC machine here at the house for many years. I have a lot of years experience programming, setting up and running various CNC machines, but you never have the opportunity to just fiddle with "the man's" machines since they are constantly making parts. I realized that I finally scavenged up enough crap to throw together that I actually have the workin's of a sumthin-er-nuther. I have an X-Y table with 16" x 16" travel and some linear rails & bearings that should give me about 14" to 16" of travel for the Z-axis too. This is pretty good travel for a small mill. The bearings will only allow relatively light duty removal of steel, but much more than a Sherline for instance.

I had four identical Vexta stepper motors and a couple suitable power supplies, so all I had to buy was a driver board and a bunch of power resistors (due to the style of driver board I bought). A laptop wasn't absolutely necessary at this point, but it would be eventually and I found a cheap one on Craigslist so I pulled the trigger on that, which has already proven to be quite handy just in the past two days of owning it.

I started out assuming I'd use the Linux EMC2 software, but now that I've tried the demo version of Mach3 I've changed my mind - it has tons more features and it's a lot easier to use.

My approach is:
1. Get the steppers working with minimal cost.
2. Attach the working drive motors to a machine I build from stuff I've collected over the years. High on the design priority list is the ability to switch motors easily so I can change/upgrade them later. Basically this translates to cog-belt drive and plenty of clearance in all directions in case future motors are larger.
3. Use what I come up with and get used to it. This allows me to analyze what I've got and where the weaknesses are.
4. Upgrade things later as need & money allow.
5. Enjoy steps 1 thru 4

My stepper drive board came from Delagrange (http://www.dtllc.com/). It's pretty primitive and required the addition of a slew of power resistors, but I found the resistors for cheap and the board works pretty well for the money. Man! Those resistors generate some serious heat. Oh, well. This will be upgraded to something much better eventually (so far I'm thinking Gecko - maybe servos). For now the Delagrange board does OK and I'm sure it can make some parts.

So the tally is: Delagrange board = $120, resistors = $40, laptop = $75, uhhh... I think that's it. $235 total. Not bad for a good start.

Here are a couple clips showing test #1 with two motors and test #2 with four motors (though A-axis not shown moving in the clip) and the Y-axis attached to a linear slide.
http://blip.tv/file/896048 Test #1
http://blip.tv/file/917568/ Test #2
The clips are pretty low quality, but you can get the gist of it anyway.

More to come

05-19-2008, 03:17 AM
What the heck are all those resistors doing besides wasting power?

05-19-2008, 03:46 AM
They're for keeping the shop warm. You should get some for up north there. Could heat up a serious cup of coffee, soften plastic sheet for vacuum forming, maybe remove an embarrassing tattoo. Lots of different uses.

But seriously - hell I don't know. No doubt it's amazingly inefficient. All I know is with this type of driver board, if you're running the motors at the rated voltage (slightly more than 2V) you don't need them, but when you use higher voltage to get better performance from the motors, you need to install a big honkin' power resistor so you don't fry stuff. I'm running at 24V which still isn't a lot, but the higher the voltage, the bigger wattage resistor you need. I just did a series/parallel thing to reach the specs I needed. Ideally I guess you'd just buy the one correct resistor-per-winding that you need (8 for four motors) but buying them from mouser gets into big money quickly... and all that for a low-quality drive. If the resistors weren't relatively cheap, I would have passed (and waited) and just got a better, more $$ drive system.

The new drives with all the bells & whistles don't need resistors and they perform much better too in pretty much every facet. As I mentioned, this is just to get off the ground and I'll upgrade to a slicker system as soon as I determine which way I want to go and have the money to do so. Maybe not the optimum way to go about it, but if I didn't do it this way, I wouldn't have anything going like I do today and I'd be sitting around counting dying brain cells instead of learnin' sumthin'.

John Stevenson
05-19-2008, 04:34 AM
Good on you Vinito.

Those drives, called LR drives are dated but as you say they are a start.

Later on have a look at the new Gecko 250 /251 it's done testing and is due to be released in a couple of months.
It's a 40 volt 3 amp drive with full protection and the core price is aimed at about $25 to $30 per axis.

These are so smooth, power wise and feature wise they will really hurt the other drive makers in the 2.5 to 3 amp range.


05-19-2008, 04:34 AM
I will assume then they are used for current limiting in place of a chopper drive. And yep, getting anything running is going to be instructive. The more difficult part may be reconizing when the hardware is the limit.

05-19-2008, 05:27 PM
"The more difficult part may be reconizing when the hardware is the limit."

Hey, are you talking about the drives or my gray matter? I'm expecting my noodle power to hit the wall before the drive does, but hoping for the opposite.

John,I haven't heard about those new Geckos. $30/per would be pretty amazing. Is that British or US $$ though. Either way it sounds quite affordable. I'll definitely check them out, but if they fall short compared to their finer pieces I'll probably leapfrog on up to as slick as I can afford. I'd like to step up to some high quality someday, but I don't mind skipping a tread here & there. I'll still need to ask around since I don't know much and I hope this forum is as helpful as it was when I last hung around.

One question I already have is about the amperage ratings. My motors are labeled "4.5A" but I've heard that the drives don't necessarily have to be rated as high as the motor says to work properly. Is that true? If so maybe one of the new $30 Gecko 3A drivers would work OK. I don't want to worry that I'm constantly pushing the envelope and I'd certainly prefer to have a setup that I don't have to think about once it's set up and working.

Anyways, thanks for the replies guys. Already learnin' stuff.

05-19-2008, 05:55 PM
Hey, are you talking about the drives or my gray matter?
Nope. The classic problem with computer controlled devices is distinguishing whether a problem is the fault of the software or the hardware. Some problems can be caused by either one and have identical symptoms, such as missing steps.

My motors are labeled "4.5A" but I've heard that the drives don't necessarily have to be rated as high as the motor says to work properly. Is that true?

Yes. That's the maximum rated current.

05-20-2008, 01:45 AM
I see what you mean about tracing the cause of problems. Now that I think of it, I've never used a PC to control motion of anything before - it was always dedicated hardware on "the man's" machines, though one Mazak booted to Winblows before loading its own system. It can be software or hardware, but in my case I'd add operatorware too. "I'm doomed"

I'm hopeful, being loaded on a laptop that's never been tethered to the internet, that running Mach3 will be solid. A guy suggested to me today that I should run Win2000 rather then XP because (according to him) it doesn't load all the unnecessary bells & whistles that XP forces on you. How true is that I wonder?

It seems to run pretty well in my testing so far with XP though. I've disabled various system monitors & such. Of course real axis movement will be the true test. Hopefully I'll be able to wiggle three axes in the next couple weeks.

05-20-2008, 02:59 AM
Ok.. First off. I love the way you write and Im diggin the whole project!!!

Looks like you are on yer way to a working machine pretty darn soon here..

I dont see any problems and you did it on the cheap... Make due with whats available to you and go with it... I like it all... Pat on the back hear bud!!!

Looking forward to seeing the motors driving all the axises... JR

John Stevenson
05-20-2008, 04:59 AM
Looking back thru my notes Marriss at Gecko quoted $29, thats US dollars, per drive, for the G250 which has a ribbon cable connection, the G251 on screw terminals will be more but so far no figure has been quoted.
Specs are 3.5 amps max at 50 volts, not3.0 at 40 volts as I quoted.

Normally all that required for windows is a clean install.
If you have to start messing with optimising the program to run Mach then it's probable you will have computer problems at one point or another.
Computers able to run Mach are being discarded everyday now so there is no excuse to mess with laptops.

Inside Mach is a program called Drivertest.exe.

Run that and see what the trace looks like, if it's stable you won't have any trouble, if it's all over look for another computer.

Also there is a dedicated Mach group on Yahoo


Join that, there are many knowledgable people on that group able to help out on software and hardware problems.


05-20-2008, 10:45 AM

To improve performance go to Start>Run and enter msconfig. Click OK.

In the Msconfig panel click Startup. Then uncheck all startup items. Don't worry if something stops working as any item can be restored by going back and checking it again.

Then click the Services tab. Check the box marked Hide all Microsoft Services. Then unchceck all the items that are left. Again, if anything you need stops working come back later and re-check it.

Then exit the Msconfig panel and restart the system as requested. Doing this will disable all non Microsoft software that runs in the background and will make Mach 3 (and everything else) run better.

It's all easily and completely reversible.

Then click on Start and right click the icon My Computer. Select Properties. This brings up the System Properties Sheet. Select Advanced and click the the Performance Settings button. Click the Adjust for best performance radio button. You can selectively enable any options in the list that you just can't live without such as Show window contents while dragging. Then click OK.

For even more stability and performance then open My Computer and right click the C drive. Select Properties. On the properties sheet that opens at the bottom may be a check box that says Allow Indexing Service to index this disk for fast file searching. Uncheck that box and click OK. This step will take several minutes to implement as it will cascade the permissions down through all levels of the file system. By doing this the only impact will be that it will take a little longer when you search for files or folders. It does however prevent the indexing service from running whenever it wants in the background.

Please note for anybody taking these steps that it will disable any safety and security software such as antivirus software. That needs to be done in order to prevent it from interfering with Mach 3.

05-20-2008, 05:32 PM
Thanks for the tips fellers.
John those new Geckos sound promising. Money will be less of an issue on my next system, but it's always an issue isn't it? If the specs fit my motors correctly and the feature list is pretty complete, I may go that route. If I dove in a bit later I guess for similar $ I could have started with those and been in better shape for my first go.

The laptop ran Mach3 OK on the first clean boot, but XP has a colorful circus of balloons to experience at first so that's why I mentioned disabling things. It was just a once over though and Evan's method sounds nice and thorough. I think the computer runs fine, but I'll certainly run that drivertest and make it official. I'm aware of the Mach3 "special driver" thing too and if necessary I'll opt it in.

Thanks TONS Evan for that recipe. That's great. I'm going to make a laminated card of it so it will always be handy - it might reside on my refridgerator for a while.
We may be on the same page. Whether or not I'm running Mach3, I'd prefer to just have a bare-bones OS going and only add whatI choose for myself. By the time you install Winblows and service packs 1 & 2 (I know there's a way to do it all at once, but I haven't done it often enough to warrant working it out) you could watch the crop come in. Linux sure is much simpler these days. Oh well.

No progress since my first post except that I hammered a wall wart apart (mildly gratifying in itself) to cannibalize the transformer so I can build a regulated 5V logic power supply. Currently I'm using an older but extremely nice bench supply for the 5V which is way-overkill. I'll solder up a pocket-sized circuit and tuck it into the motor PS box somewhere.

Update: Just finished soldering up and testing a 5V supply regulated with yer basic 7805 & filtered with various caps. I even included an indicator LED to make it shiny. Works just fine. One less thing ...

05-20-2008, 06:03 PM
There is a lot more that can be disabled, especially if the computer is not used online or on a network. However, it means disabling various system services and that means knowing what they do and what other services are dependent on them to operate. There isn't any "standard" set of services that can be automatically turned off. It will vary depending on the computer configuration and hardware as well as what software services are required.

There are other "tweaks" that can be implemented and some have dramatic effects on performance. One of the best is to connect a second drive on a different bus system from the System Drive (usually C drive). If C drive is an IDE drive then a second drive running over Firewire or USB 2.0 can be used to achieve about a 20 percent performance boost. All that is done is to reallocate the Page File and the system temp files to the alternate drive so they don't interfere with application access.

The system I am using to type this is an Athlon XP 2700 with 1.5 gig of ram and three hard drives. It fully boots in 23 seconds.

Through proper configuration Win XP can be made to run about 50 to 100% faster than it does in a default configuration. This isn't new to XP, all previous Windows version could also be similarly configured.

05-21-2008, 07:34 PM
I loaded some CAM software on the laptop and everything seems to run pretty goodly.

Generated some G-code for engraving a bit of text and opened it up in Mach3 to simulate the operation. The 500-line limit (trial version) doesn't let a guy piddle with much more than a couple letters when doing that, and that brings me to a question, which follows a couple thoughts.

I'm almost sold already on Mach3. It looks OK - a little busy but if I feel like taking the time I guess the screens are readily customizable. It sure has tons of features and a big following. Using the keyboard and mouse is a little awkward, but I'm sure you get pretty comfortable after a while and I'd eventually like to build a control panel with an RPG, etc.

So the question is: How do you guys like Mach and are there others I should explore before diving in and buying the license? I can play with the trial version and maybe use EMC if I need to run a long program (maybe once the machine becomes a semi-functioning 3D reality). Mach seems like an extremely good piece of software for the money they ask for it, especially considering the "cottage industry" factor inherent in this field.

I'm sure a lot of folks happily get by with less. It looks like EMC has its enthusiastic disciples, and for good reason. I guess I'm partly leaning toward Mach because it just seems more familiar - more like the CNC machines I've used and less like a DOS program - but I embrace that about myself so this fact doesn't bother me. Looks like Mach is quite a bit more user-friendly anyway.

05-21-2008, 08:06 PM
Love my Mach3.

Here are a couple of groups of really great people that are knowledgeable on Home CNC...



Tom M.

John Stevenson
05-22-2008, 04:44 AM
At the present time there are only a few affordable controllers out there.
In no order they are


Emc is a linux based open source controller, works well but requires a lot of technical knowledge on Linux to get working correctly, one for the techies. Cost free.

TurboCNC, old DOS program that works but very very dated, no development liable in the future. Cost free.

Flashcut, Windows based but uses a specialised controller box that it talks to. Still active but limited development. Was popular at one time with the router guys as it had becent look ahead to stop it buring the wood. Cost about $1200

Ahha, Old DOS program that requires a plug in bord inside the computer. Product dead but was good in it's day, still quite a lot out there, mainly in industry, was about $1200

DeskCNC, much like flashcut with it's own card, been no development for ages and very limited on features, cost around $300

Mach3, ongoing development, very customisable, brilliant support.
Runs up to 6 axis, supports many 3th party add ons like jog wheels etc. Cost $159

Small Son and myself sat down last night and wote a front screen for Mach that lets a newbie set up origin, tool hight offsets and zero all axis with the minimum of buttons on the display and each button doing what we wanted it to do, not what anyone else wanted.

What other program, at any cost, can let you do that in the time scale.?


05-22-2008, 05:45 PM
John, you make it sound like a slam dunk. Are you a stockholder?:D
The features and ease of use for Mach that you tout are just what I suspected. Kinda makes me glad I didn't decide I wanted to try this 10 years ago. Now I have something I can spend part of my "economic stimulus" tax refund on.

The pokey (my place of employment) has issued us peons day passes for tomorrow and Monday in light of the holiday, so with the extra days I'll probably get some fabricating done this weekend. I should at least have a base built and two axes attached to motors - possibly three. Once that's cobbled together, I'll be turning some of my attention to the spindle.
Regarding that, here's what I was thinking and I welcome feedback and criticism: (truth is, I'm hungry for it, so dive in!)

Ultimately I'd like to design some kind of automatic toolchanger. That is down yonder on the calendar, but it's applicable now for the purpose of building in flexibility. Since I'm being flexible and all, I figgered I'd carry it a bit further and maybe just build a cartridge holder kind of block thingy for the spindle head. This would allow me to change from milling spindle to router to hydrium fusion engraver or whatever pretty easily. If anybody has thoughts or recommendations or just wants to shoot my idea out of the water, please let me know. I'm especially curious about toolchanger ideas. The quick-release type of toolchangers on the commercial mills I've used are very nice of course, but what little thinking I've done on the subject keeps leading me to wondering how I could accomplish that and have the tool held firmly in the spindle. For a small home mill, quick tool changes aren't a big priority in practical terms, but a guy can only enjoy standing in front of his machine to stare at a 90-second tool change so many times before it isn't so fun to watch anymore. This cool little tool changer appears to work great, but I still wonder how solid the tool holders are fixed into the spindle nose: Link to Mini Tool Changer Video (http://home.insightbb.com/%7Ejoevicar3/Toolchanger_01_11_04.MPG) I would have to scale the design up, but it certainly switches tools fast if it would work at all.

Anyways, thoughts on any of this are welcome as always.
Thanks for the Mach3 comparisons John.

John Stevenson
05-22-2008, 06:14 PM
No not a stockholder but a serious convert :D

I have seen the Joe Vicars toolchanger and it's nice but like a lot of these small changers it relies on just the taper to drive as it's hard to get the cheaper controllers, Mach included at this time to index the spindle to line up with driving dogs as the big boys do.

I suppose this is the disadvantage of spending $159 against $10,000 :D

Little Machine shop does one that uses the Tormach tool holding system but that relies on a R8 taper and power draw bar.

We are working on one at the moment with the Chinese that will change quickly, doesn't require driving dogs but also doesn't rely purely on the taper to drive. Can't say more at the moment as it's a work in progress but a hint is to go for a steep taper like a INT30 to get away from powered drawbars etc. and any type of holder that converts from a spindle taper to a toolholder and justs adds length and run out to the equation.


05-22-2008, 06:28 PM
Ooooo! Since I'm unready for a toolchanger for a bit anyways, this might be great timing. Maybe for now I oughtta just make up an R8 spindle and change them by hand (or butterfly air drawbar anyway) to fit into the cartridge block. When yours gets released I could exchange it into my mill. I'm probably your dead-on target demographic for sumthin' like this. There goes the rest of my refund money.

Being me, I'll probably just steal your idea and make my ownie. I promise to give you credit though. :p
(Yea right. Like I need yet another project.)

05-24-2008, 12:48 PM
I didn't get a base made, but I have gathered up some steel for it and started working it about in my head (always a slow process).
As usual, several of errands popped up this weekend (felt like I was whacking gophers) and I ended up having less free time than I do on work days. Meh!

I did make some progress on another front though. I've begun to turn my attention toward the spindle motor. From the scavenge pile I pulled a 3/4hp DC motor and a variable speed controller. The controller has a bunch of inputs & outputs I don't even know if I can use, but its basic configuration is the standard 10K potentiometer to control RPM. I wired it up and after a little tweaking they check out OK with the motor whirring pretty smoothly throughout the full range.

So... I pulled the trigger on a bitty board from Peter Homann which will convert PWM signal from Mach3 to the 0-10V input for the motor control. While I was ordering that, I also committed to a Mach3 license since Homann sells them for a little less.

So if you've been paying attention, you'll notice a pattern developing here. If it isn't already hiding in a nearby corner, I throw money at it. John, I think your spindle/toolchanger will have to wait for a better man to copy it. :rolleyes:

I wanted to post here first and see if that PWM to 0-10V converter puts me on the right track, but the forum was kaput until today. I'd still be quite interested in hearing any feedback though. At any rate, looks like I might be on the path to having PC control of the spindle motor. How does this compare to using a 3PH motor and a VFD?

Here's a link to the manual for my DC motor controller in case anybody is curious enough to want deeper specs:
click here (http://f1.grp.yahoofs.com/v1/cNA6SGuNsc8HyuwYzBKMflyxhmeMX-FReyAJreKnlFHPRnXnQoGuVEXB_YyqIh1fLE78tI50t-nddLBsWJ65LyP_QqgkuV4/vinito/1600man.pdf)
My control is a 1600i