CAD CAM EDM DRO - Yahoo Group Archive

Some expirements in Home brew CNC (long)

Posted by Ron Ginger
on 1999-06-16 19:55:04 UTC
Since Ive poked into this list a bit maybe I ought to do a bit of an
introduction.

Im an Electrical Enigneer, but with a very old degree- 1966- they still
did tubes when I was in school, transistors were new. For 30 yearss Ive
been in the computer world (DEC) mostly in software information systems.
For the last 10 years Ive been a Unix Admin Consultant. Ive been a hobby
machinist for 10 or 12 years. See http://www.ultranet.com/~ginger for a
bit more.

My CNC experiements started 4 or 5 years ago when someone on the net
offered a set of stepper motors to fit a Sherline lathe and I bought
them. For a driver board I bought a 3 axis board from AMSI in New York
($150). For software I bought INDEXER.LPT($250).

After I got it all to work, and I spent a few 'gee whiz' hours typing
'move a,250,b,300' and watching the lathe slides move back and forth, I
realized the real problem here (as in the entire computer world) is
SOFTWARE. I never did make a usefull part with this setup.

I muddled around, reading a lot, but not doing much (at least with CNC-
thats when my steamboat got done, among other things), until a friend
bought a Lagun mill with an AcuRite MillPower system. After just minutes
of waching it, I was off onto a new project. I copied its owners manual,
and started a clone of the program using Visual Basic. Before the
AcuRite lawyers jump all over me, I will note my program is a good deal
different, since I use Win95, a mouse and keyoard and all the normal
Win95 GUI actions, instead of the AcuRite special box and function
keypad. I have a similar concept, not a chineese copy.

In case you dont know about MillPower a brief bit will be usefull. This
is billed as an interactive system, and gcodes are not used in any way.
A set of buttons is labeled with common mill functions, like LINE, ARC,
CIRCLE, BOLT CIRCLE, etc. You pick a button, fill in the obvious blanks,
and a program is built to run that object. When youve got a whole
program ready the system runs it. You never see a gcode.

I have written just about all of these fnctions in VB. I first planned
to use INDEXER.LPT for the driver, but a friend wanted a program to
drill PC boards, so he wrote a .dll that we can call from VB that runs
the motors. It implements bresenhans algorithym for straight line moves,
and circular interpolation. I call it from VB with a simple struct that
gives it the distance to move each axis. We do acceleration and
decellaration and the use of the bits is fully software configurable.

I modified a Sherline Mill (see my web page for photos) in a somewhat
unsual way- I noted that each lead screw has 2 ends, one has a handle on
it, the other flaps around in the breeze. For reasons I dont understand,
everyone seems to want to modify the handle end, making stange standoff
brackets and shaft couplers and double shaft motors and lots of cruff,
leaving the other end flapping. I put my motor on the loose end, and
dont have to modify the handle end at all. I simply made one mounting
block and one long shaft coupling on each screw. I use a belt on the
Zaxis. I can also use the handles if I leave the power off, and I can
use single ended motors, often cheaper. For this system I bought one of
Dans 2Amp driver kits.

I have made some useful parts with this, and Ive added a couple features
to it- I can output a MillPower file on floppy, and I can read g-code
in. As a by product I can read in gcode and write it out as Mill Power,
something maybe valuable to Mill Power owners. I can also read the
standard PC board drill file (excelan?) and run that. I also can mill
TrueType fonts directly, altough a bit lumpy. Im still adding a geometry
calculator and a learn mode.

My delima here is the .dll. Because of the way Win95 works, once I call
the .dll to make a motor move, my VB routine is dead until the move is
complete. I cant abort it, and I cant update my display as the tool
moves. I dont think a CNC system is usefull with this limit.

To get around this I tried some experiements with microprocessor
controllers. I used a Tiny Tiger ($79) which I can load from a serial
port and use to drive the step and direction signals. Ive written
bresenhans line stuff there, and it works slick. But if I want to sell
my package, Id have to get into the hardware business of making these
boards.

so, that brings me to EMC and linux. Id like to port my VB GUI to linux
(maybe Tk, maybe Java) and use the EMC API to actualy run the motors. I
think I can write a perl hack that will read the VB source code and
generate the Tk functions. Then all I have to do is rewrite the
callbacks from BASIC to someting on linux.

So, if anyone has read this long winded note, thats what Im up to, and
thats why Im asking about EMC-APIs and such. If someone else is
interested in this software development, maybe we can take a page from
Linux and do a group project?

I suspect someone will ask, so, no, I have not decided to sell or give
away my VB program. I dont want to sell it with the .dll weakness, and I
dont want to give it away yet, because someday I might decide to fix the
.dll into a win32 .vxd and sell it.



ron ginger

Discussion Thread

Ron Ginger 1999-06-16 19:55:04 UTC Some expirements in Home brew CNC (long) Jon Anderson 1999-06-16 20:08:32 UTC Re: Some expirements in Home brew CNC (long)