Big Picture: From CAD to Spinning Motors

More
17 Jul 2014 06:33 #48853 by aehrlich54
Hi all,

First of all this forum is great and I have already learned quite a bit from browsing through it. I want to make sure my big picture for running a CNC machine is correct so I can dive into the building blocks and optimize them. Below I have listed out what I think the steps are for creating something in a CAD model to having a stepper motor turn correctly. The items after the colons are just my preliminary possibilities.

I have used solidworks quite a bit and I have driven stepper motors with an arduino and a motor driver. However, I have not used CAM software or delt much with Parallel port cards before. I dont mean for this thread to get into the nitty gritty on questions on one step or the next, but rather making sure this general outline is not off base.

Two quick questions right off the bat:
Are there CAM programs that include the ability to control stepper motor drivers, thus alleviating the need for LinuxCNC?
How/where does post processing fit into the whole scheme of things.

If anyone wants to list which CAD, CAM, Tool Control Software, PCI Card, Motor Driver, Power Source and Motor combo they think is best, that could be pretty interesting.

Software
First we need to create the product in a 3D software: Solidworks, FreeCAD....
Next we need to set a tool path and turn that into GCode using a CAM software: FreeCAM, PyCAM, HeeksCNC, MeshCAM($$)
Finally this GCode needs to be communicated to the electrical hardware: EMC2(LinuxCNC) Or Mach3

Hardware
EMC needs to talk to a stepper motor driver, this can be done with: PCI Parallel Port card, maybe Raspberry Pi.
The paraport card/Raspberry Pi will give commands to driver: Gekko drive and the like.
There will be a power source for this: Something that can safely handle the load.
Finally there is the motor: NemaXXX, or the like.

Let me know if I'm misunderstanding anything. Thanks so much in advance!

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

More
17 Jul 2014 16:45 - 17 Jul 2014 16:49 #48871 by ArcEye
Hi

CAD - draw a part (optional)

CAM - create gcode which describes that part in the form of a file (optional)

Linuxcnc - runs the gcode file, which tells a cutting tool how to move to describe that part and thus cut it from solid
It does this by telling each axis motor how much to move, as per the gcode, to achieve the movement that describes that bit of the part.

The method by which Linuxcnc is connected to the motor drivers, is not part of the process, it is just the electronics / mechanics of that particular machine.
The motors can be servos and the interface can be a PCI card, but the first 3 still maintain. (But in fact you do not need the first 2.)

The difficulty in conceptualising is probably symptomatic of how people come to CNC these days.

I grew up without any computers (except main frame monliths) and started engineering with manual machines.
I later converted machines to CNC and started by effectively machining manually, except by using the MDI line instead of hand wheels.

Gradually I started writing gcode programs and canned routines to achieve the jobs I needed to do, especially on a lathe, where I could program
arcs that would be very difficult to accurately turn by hand.

Only recently have I moved to converting jpg's and dxf's for engraving and drawing parts in CAD and then converting to gcode.

The difference is that I am nowhere near as good as the current generation at creating parts in CAD etc, but when it spits the code out, I can look at it and say 'That won't work' and have a good idea why, because I have done it from the ground up in the opposite direction.

My advice, decide what machine you want (lathe, mill, router etc), decide how you want to power the axes (steppers, servos ) and your paths to control the machine with Linuxcnc will be clearer, probably just a couple of choices.

Once you have the machine working, going where it is told accurately, you can build up from the jog buttons, MDI commands, simple programs, to full CAD and CAM
with a proper appreciation of what is happening.
Then when you get an error message, it will be just that, a message telling you where the error is, not an apocolyptic failure of the black art CAM god B)

regards
Last edit: 17 Jul 2014 16:49 by ArcEye.

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

More
17 Jul 2014 18:49 #48881 by andypugh

Are there CAM programs that include the ability to control stepper motor drivers, thus alleviating the need for LinuxCNC?

Not as far as I know.
It would be possible for a CAD package to control LinuxCNC directly without G-code or a separate CAM package, but I don't think any do. This would be just a special (and advanced) case of things like single-axis grinding controllers that people have created with LinuxCNC (number in box -> HAL -> limt3 HAL component -> software stepgen -> haedware )

How/where does post processing fit into the whole scheme of things.

Post-processing is the stage that converts the sequence of moves in the internal representation of the CAM package into G-code (Or APT, or Excellon, or whatever protocol the CNC controller understands)

If anyone wants to list which CAD, CAM, Tool Control Software, PCI Card, Motor Driver, Power Source and Motor combo they think is best, that could be pretty interesting.

For reference my setup is AutoDesk Inventor (free licence as a perk of my real job) running in a VM on my Mac to CamBam (Cheap, adequate rather than brilliant, again running on a VM on the Mac, but there is a Linux version). Then LinuxCNC controlling a Mesa 5i23 PCI card, connected to a Mesa 7i49 Resolver/Servo card. The motors are Lenze 500W brushless servos, with resolvers rather than encoders. For motor drives I use 3 x Mesa 8i20 boards running from a home-made 300V DC supply (big caps and rectified mains voltage). The system also has a Mesa 7i39 board to run up to two other accessory servos for the A or U axes, a 7i64 for interfacing switches, limits, relays, pneumatics and a 7i73 which is rather wasted on the simple task of counting pulses from the MPG.

Software
First we need to create the product in a 3D software: Solidworks, FreeCAD....

No need for 3D much of the time. You can do a lot with 2D and sometimes it works out a lot easier. (especially for lathe work)
Even with a 3D model it is often easier on engineering parts to save a 2D drawing and create pocket and profile operations from than rather than use 2D milling operations based on 3D geometry.

Next we need to set a tool path and turn that into GCode using a CAM software: FreeCAM, PyCAM, HeeksCNC, MeshCAM($$)

Or you can write G-code by hand. Sometimes that's easier. Also LinuxCNC can be configured to run input files though filter automatically. Most of the demo LinuxCNC configs can open a JPG and automatically run it through image2gcode automatically.

EMC needs to talk to a stepper motor driver, this can be done with: PCI Parallel Port card, maybe Raspberry Pi.

Onboard parallel port works too. There are much better PCI solutions than a parallel port card (Motenc, Mesa, General Mechatronics) and there are boards that use the parport as a communications channel to much more capable hardware for generating steps and counting encoders (Pico PPMC, Mesa 7i43). Experimentally there are ethernet-connected hardware solutions too.
The Raspberry Pi and BeagleBone are not add-on hardwaree, they are small PCs which run LinuxCNC just like a PC does, but also have some hardware IO to control the machine.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum