Live data from Hacker News

CNC milling with open source software

opensource.com

41–50 of 133 posts

Re: CNC milling with open source software

#41

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.

Will you be adding servo support in the future?

Steppers are great, but anything big needs a servo, as the steppers get to expensive and too slow very quickly.

Re: CNC milling with open source software

#42

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

At first glance, it looks like an assembly language. Does anything compile to it?

Re: CNC milling with open source software

#43
post #23

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…

Is there no way to test? Or there is, just not everything?

Most decent CAM software has at least some simulation routines, which is helpful, but definitely not definitive. There can often be errors such as defaults that are bad in some situation that create a lead-in/out that tries to clear the tool, but actually digs the full length of it into the solid material, and this might not be noticed in the simulation.

I've also frequently mocked up styrofoam stock material and run the entire toolpath through that, which can be very helpful, but again, not definitive.

Ultimately, you need to just be really careful about the toolpath creation, and watch the first run like a hawk, which can take hours. Pausing and starting each new segment at a fraction of normal speed can help also.

The cool thing is that once you've run the toolpath a few times and can trust it, you can almost start it and ignore it while the part gets made (note that the operative word is almost).

Even with the difficulties, when you have a good machine and some skills (and patience), it is quite rewarding what you can make!

Re: CNC milling with open source software

#44
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.

Being able to have prototypes in hand in like 30 minutes is the best thing about PCB milling. You can make boards for fine pitch parts as well - the board has to be probed and leveling applied to the GCode. We're using 3040Z CNC which is not the best for this job but manageable.

Check out my tutorial (gallery on the bottom) https://wiki.base48.cz/PCBMilling

Re: CNC milling with open source software

#45

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.

Cool -- just took a quick look, downloaded and I'll be trying it out soon -- thanks!

Re: CNC milling with open source software

#46
post #23

Earlier quoted context omitted.

Is there no way to test? Or there is, just not everything?

The best shops use simulation tools, but you need the 3D models / configurations of everything to make them work, and then the machinist still needs to load everything correctly. It's very easy to make a mistake. Check out a simulator here: https://www.ncsimul.com/

We use a very simple method: overlay the position of the head/arm of the machine on top of the DXF file of the table.

If the supports/bars are in the overlay, the operator DOES NOT run that part and takes it back to design.

Re: CNC milling with open source software

#47

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…

Spindle crashes are terrifying. I've had a few. I've destroyed tools and pieces. Cost thousands of dollars in damage from a single misplaced tool path or lead in/out. There's also this very transitive nature to the programs. Unless you make a whole bunch of the same pieces your programs tend to be one time use. 99% of the things we make in our shop are fully custom meaning brand new programs for every single table.

[deleted]

Re: CNC milling with open source software

#48
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…

A good G-Code variant would roll up the un-rolled loops and separate the geometry data from the tool config data. This is what the view of a CAM IDE presents, G-Code source can be structured the same. If you change the semantics on some of the syntax you get lexically scoped blocks, macro-b subsystem which has existed for decades needs to be fully utilized for this to happen.

A fully implemented system would provide the CAM GUI engineer and the CNC CLI machinist to work on the same file, skipping post-processing entirely.

And, finally implement what was originally envisioned but not possible on even the most powerful mainframes of the late 50's: https://youtu.be/ob9NV8mmm20

Re: CNC milling with open source software

#49

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, there is an endless supply of improvements I could make around the house if I had enough time and equipment.

It bothers me greatly to hear from appliance repair techs that I must throw out an entire major appliance instead of repairing just the pieces that broke [1], because the parts are either grossly expensive, or even simply not available. I'd love to own "versioned, open source" appliances, where open specifications let everyone repair only what breaks. And when something breaks, the community can figure out the root cause and redesign for greater robustness.

Like if a plastic part wears down causing a cam to miss a gear, then redesign to machine the cam out of high strength steel. Or if lots of people note a design oversight that makes a particular maintenance procedure a pain, a different access panel is designed and distributed for machining. Or if someone wants upgrade to a later version of an appliance, they swap out only the guts that change, and not the entire assembly, ideally sending the old guts in for recycling back into feedstock that others use for either manufacturing new or upgrading old units themselves. Or building in self-diagnosis over time, and auto-ordering new components for those that are detected wearing out.

The Increvable washing machine comes close [2] in the repairability area, but it isn't open source to the point where you can read off specs to create completely compatible machines, and the company can still go after you for copying their product.

[1] https://circuitmaker.com/blog/about-open-source-washing-mach...

Re: CNC milling with open source software

#50
post #22

Earlier quoted context omitted.

It's not just that it's easier, but you can get much finer detail, you don't have to deal with vias, and you can do more than two layers. And (big plus in my book), you don't have to deal with the inevitability of breaking those insanely small end mills. The only benefit over having a board shop do it is the turnaround time, and even that's essentially a tradeoff of time vs money. I just sent a board off to OSHPark.…

This is all true. The biggest deal breaker for any kind of serious work is being constrained to two layers, routing is so much harder that way! Milled PCBs also have lousy surface quality which is incompatible with fine pitch parts.

Surface quality on milled PCBs can be pretty good but you have to get a bit spendy. Also, the copper FR4 likes to delaminate under stress and deforms easily if you use the wrong cutting parameters so you typically want to go for a higher quality board material. It's pretty common for high end RF boards to be milled.
Post reply on HN