Live data from Hacker News

CNC milling with open source software

opensource.com

61–70 of 133 posts

Re: CNC milling with open source software

#61

CNC is programming "for keeps". Any tiny little error in your gcode has a chance to crash the machine. Unlike a computer crash, a CNC crash results in broken metal flying across the room and anywhere from $5- to $5000 in damage. I programmed for a heavy machine shop for a year before I gave up and went back to making websites. Hobby CNC is fun though, it is amazing what you can make out of wood when you can shape it…

Yes. This article is about very low end CNC, just 2D routing.

Using a Dremel tool as a CNC router never works very well. The motor isn't constant speed, slows way down under load, and can overheat. The bearings can't take side loads for long, either. It's been tried. A Bosch router from Home Depot works much better. Those can cut wood all day. You can take off the handles, leaving a motor cylinder that can easily be clamped. Also, enclose the electronics in something that will keep the dust out. If the stepper motors are not dust-tight, they also need dust protection.

You need dust removal. Any CNC router doing useful work generates sawdust in huge quantities, much more dust than hand woodworking. Absolute minimum is a Shop-Vac sucking dust from the cutting area.

Trying to make a machine tool from low-end 3D printer parts does not work very well. There are some far better open source CNC wood router designs. The Maslow project [1] is especially clever and very useful, since it can make furniture-sized wood parts on a low-cost machine.

[1] https://www.maslowcnc.com/

Re: CNC milling with open source software

#62

CNC is programming "for keeps". Any tiny little error in your gcode has a chance to crash the machine. Unlike a computer crash, a CNC crash results in broken metal flying across the room and anywhere from $5- to $5000 in damage. I programmed for a heavy machine shop for a year before I gave up and went back to making websites. Hobby CNC is fun though, it is amazing what you can make out of wood when you can shape it…

A poorly programmed CNC machine can drill a gaping hole in itself, and into the table that it stands on. Don't ask me how I know. If there was no table, it would be the ground, and yes, it would . Not many things can stand in the way of a spindle hell-bent on chopping chips off a block of titanium. It's a very fun thing to play with, though. Probably the most high-stakes programming most of us are ever going to get.

Can the CNC machine computer not simulate the program and see if it violates some safety rules like cutting into the table or removing too much material at a time?

Re: CNC milling with open source software

#63

Earlier quoted context omitted.

A poorly programmed CNC machine can drill a gaping hole in itself, and into the table that it stands on. Don't ask me how I know. If there was no table, it would be the ground, and yes, it would . Not many things can stand in the way of a spindle hell-bent on chopping chips off a block of titanium. It's a very fun thing to play with, though. Probably the most high-stakes programming most of us are ever going to get.

In other words, don't mix up your G0 , G1 , G90 , and G91 . Much sadness will ensue.

God, I hate how G commands are sticky in Mach 3. Much sadness indeed.

Re: CNC milling with open source software

#64
post #62

Earlier quoted context omitted.

A poorly programmed CNC machine can drill a gaping hole in itself, and into the table that it stands on. Don't ask me how I know. If there was no table, it would be the ground, and yes, it would . Not many things can stand in the way of a spindle hell-bent on chopping chips off a block of titanium. It's a very fun thing to play with, though. Probably the most high-stakes programming most of us are ever going to get.

Can the CNC machine computer not simulate the program and see if it violates some safety rules like cutting into the table or removing too much material at a time?

It's not that easy. You need accurate models of your machine, the tools and the stock material. Your simulation has to be linked to the real machine movements and be ahead of time so you can estop the machine before the crash happens.

But that still doesn't help in case of insufficient workholding or breaking tools.

Re: CNC milling with open source software

#65

CNC is programming "for keeps". Any tiny little error in your gcode has a chance to crash the machine. Unlike a computer crash, a CNC crash results in broken metal flying across the room and anywhere from $5- to $5000 in damage. I programmed for a heavy machine shop for a year before I gave up and went back to making websites. Hobby CNC is fun though, it is amazing what you can make out of wood when you can shape it…

>>Any tiny little error in your gcode has a chance to crash the machine.

I would assume that an emulator for the machine exists that allows you to test your program before trying it out on the real thing. Was that not the case?

Re: CNC milling with open source software

#66
post #33

G-code is the most hilariously bad language. Keywords are G + a number, e.g. G01, with wildly different effects, varying arg lists and no standard. E.g. G01 move to position, G20 set the machine units to inches. Its often stateful. Obviously its coz its old and works, but i chuckle everytime i have to look up the codes at how comically awful it is compared to anything else i see https://en.m.wikipedia.org/wiki/G-code

What would a good G-Code variant look like? For all its flaws, it's pretty good at encoding the exact thing you want the CNC machine to do and while there certainly are different post-processors for different machines and in most cases they're not optional, it's also not like they're entirely different. I think of G-code as ASM. For high-performance work you might write code differently for different (related) machin…

It would look like something like this:

    go_home
    set_units mm
    set_movements relative
    activate_tool 0
    move X 10
    move Y 10
Instead, each of those names is replaced by G + a number.

Re: CNC milling with open source software

#67
post #64
post #62

Earlier quoted context omitted.

Can the CNC machine computer not simulate the program and see if it violates some safety rules like cutting into the table or removing too much material at a time?

It's not that easy. You need accurate models of your machine, the tools and the stock material. Your simulation has to be linked to the real machine movements and be ahead of time so you can estop the machine before the crash happens. But that still doesn't help in case of insufficient workholding or breaking tools.

It seems like the machine itself could implement some safety checks, like if a motor is commanded to go outside of its range of motion you trigger a stop with an error code and let the operator sort it out.

Or go even more oldschool and have physical safeties on the machine that trip if your cutting tool attempts to exit the work area. I mean these aren't cheap machines, it seems like they could be engineered to be just a bit safer and error resistant.

Re: CNC milling with open source software

#68

I owned a 3020 and own a Shapeoko 2. Unfortunately, I rarely use them. The biggest problem with CNC is that the overhead is so expensive. There's very little room for mistakes and material cost (stock and bits) can get very expensive. Holding a part can get tricky and the wrong feedrate can ruin your part. I end up using my 3D printers to do most of my parts nowadays. Though I do use my CNC for "food grade" stuff aro…

> ...and material cost (stock and bits) can get very expensive. I've been looking at CNC for a long time, and I've read that if you're starting from scratch, to allocate about the same amount that you spend on the mill itself to the consumables/logistical tail (end mills, cutting fluid, ancillary metalworking tools). Due to the steady degradation of quality design and manufacturing, and rapid support obsolescence, th…

Sometimes those plastic gears are serving a purpose though. They can protect much more expensive parts by failing first when an error occurs.

So the operators gripe about replacing a stupid plastic gear so they replace it with a metal one, then gripe when they have to replace the blown out gearbox.

Re: CNC milling with open source software

#69
post #8
post #7

I've been looking for a home PCB machine and would appreciate any recommendations on what to look at or what to avoid. I've been told multiple times that it's easier to just have a service print your board which is probably true, but that would take a lot of fun out of the entire process for me.

I've been using a 3018 CNC with pretty good results. They're fairly inexpensive machines (about $300 I believe) and are decently accurate. I still order boards from China, but for a quick breakout board it's incredibly handy! I also decided to get a 5W laser which is also pretty fun to engrave with. I'm planning on writing a series of blog posts about it if you're interested! As a last note, if you like tinkering, th…

I have the same CNC including the laser and decided to upgrade it with a 3D printer head. I attached an Arduino to the wire normally connected to the spindle motor and translated the signal into a PWM signal for the extruder. Temperature was controlled using the same Arduino. Yes, it worked and yes, it took the better part of a month of work. But definitely fun and educational.

Re: CNC milling with open source software

#70

If you're interested in Open-Source CNC you should check out two of my Open-Source projects. https://camotics.org/ a CNC simulator and https://buildbotics.com/ a CNC controller. I'm somewhat surprised neither of these were mentioned.

Is there any reason why CNC machines aren't directly controlled by CAM software, beyond it always having been done that way?

I'd think it would be useful to integrate the two, instead of the CAM software just firing-and-forgetting toolpaths.

Post reply on HN