Author Topic: CNC GRBL for PCB milling  (Read 1864 times)

0 Members and 1 Guest are viewing this topic.

Offline sairfan1Topic starter

  • Frequent Contributor
  • **
  • Posts: 348
  • Country: ca
CNC GRBL for PCB milling
« on: June 17, 2022, 08:10:40 pm »
If someone has experience milling PCB with open source GRBL, is it reasonable?
I understand there is great part played by hardware but i want to know abilities of firmware, if its all good then I will start choosing related hardware
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: CNC GRBL for PCB milling
« Reply #1 on: June 17, 2022, 09:34:43 pm »
You need different software for different tasks.

GRBL is only the part that lives in a microcontroller. It receives test strings with G-code, and it translates this to stepper motor timing pulses. A few years ago I flashed it in a "Blue Pill", but in the meantime GRBL has moved on. Back then the atmega328 it was originally designed on was reaching it's limit and there were a lot of forks to 32bit (mostly ARM-cortex) controllers, but also others such as ESP32. A few years ago a lot of these projects have come together again in the GRBLhal project on github.

In the mean time my "Blue Pill" is also deprecated, but as a test I flashed GRBL into a WeAct "Black Pill (with STM32F411) and I've seen the stepper motor pulses on my scope, but not attached to hardware yet.

Personally I do not trust WiFi much for CNC control, but the Teensy 4.1 seems quite attractive because of it's wired Ethernet, which is by definition gavanically isolated from your PC. There are also break out boards on Tindy (and PCB design files on github) with buffers and screw connectors for the Teensy.

The next software piece you need is for the PC part. I use bCNC on my Linux box myself. It has nice extra functions such as import of simple DXF files and then adding multiple passes and tabs, and you can also import multiple files and nest them, but this is all manual work. bCNC can also do Z-axis probing for PCB milling to get a uniform depth even with a slightly bent PCB.

But programs to control GRBL typically have G-code as input. The most usual workflow is to first design a PCB, then create a set of Gerber files (because it's a standardized format) and then use programs such as coppercam (commercial) or FlatCAM (Open Source) to translate the Gerber files into G-code.

I have not (yet) milled a PCB myself, but I do know that GRBL itself is quite reasonable.
Quite a long time ago I bought a Beaglebone Black to run Machinekit (a fork of LinuxCNC), but the GUI update rate was quite slow over SSH (about 1 frame per second). So I tried GRBL and bCNC and it works good enough for me and I never tried another combination.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: CNC GRBL for PCB milling
« Reply #2 on: June 17, 2022, 09:53:29 pm »
Interesting.
I've never considered going this route myself, seeing how fast and cheap you get finished and through-plated PCBs from the Far East.
Setting up a CNC portal mill for this will cost at least 3000 Euro just in machinery and drives.

But a step is missing in the milling process you describe: the conversion from "positive Gerbers" to "negative Gerbers".
That is, the conversion from, let's say, milling tracks (which is unwanted) to milling non-tracks.

Is there also a utility for that?

Thanks.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: CNC GRBL for PCB milling
« Reply #3 on: June 17, 2022, 10:33:09 pm »
it's pointless to mill PCBs using GRBL and cheap hardware... tried a cheap 3018 cnc engraver (bought it for engraving wood, plastic and playing around in general) and it's definitely not usable for PCBs.. even if you use "auto leveling" - adding a z probe and probing a bazilion points and correct the g-code with the height map, you still get local warping and the traces will have variable width or even disappear in a warped region.
even if you manage to mill the PCB (takes ages to mill a tiny 40x60mm PCB) and the traces are uniform, it's still crap because of burrs and deep groves between traces.
laser printer, photoresist, etching and dry-film soldermask is much much faster process (including solder mask) than milling and order of magnitude better results :)
 
The following users thanked this post: sairfan1

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: CNC GRBL for PCB milling
« Reply #4 on: June 18, 2022, 04:19:28 am »
But a step is missing in the milling process you describe: the conversion from "positive Gerbers" to "negative Gerbers".

That step is done by software such as coppercam and flatcam.
They take gerber files as input, then calculate offsets (such as the mill radius) and then create G-code as output and this can they can do multiple passes with different offset to create bigger clearances for the isolation milling.

I do agree with rob77 that this would not work properly for a mill of cheap chinese hardware. You need a pretty accurate mill to get success with this, but it does not necessarily mean the hardware has to be expensive.

You can get some idea of accuracy on different hardware with:
https://www.youtube.com/results?search_query=pcb+isolation+routing

And if you compare it with the cheap PCB manufacturing. Those have neater PCB's with closer tolerances and smaller clearances (with milling the Minimum clearance is defined by the mill diameter). and with those PCB fabs you also get a solder mask, silk screen and plated holes.

So indeed, there are not much advantages of milling PCB's, The biggest advantage is turnaround time for prototypes A PCB can be finished in a few minutes to half an hour, and this can be an advantage when for example designing antenna's.

You also do not have to mess with chemicals for milling, but you exchange that for noise and dust.
"Youtube / Marco Reps" has made some video's about experiments with a somewhat similar method. He used pre-sensitized PCB and used an UV laser to develop the photoresist, and he got quite good results with that method.



 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: CNC GRBL for PCB milling
« Reply #5 on: June 18, 2022, 04:30:37 am »
I also want to make a remark about the most redicilous PCB milling machine on the market: "Wegstr"

Wegstr is a very simple CNC machine made from some pieces of wood-like sheet material,  guides from simple extruded aluminimum and cheap hardware store all-thread. but by using some clever tricks the thing is (nearly?) free of backlash. Because mills are very small for PCB milling, cutting forces are also very low, and pushing backlash to the side with for example a spring is acceptable.

Wegstr is quite nicely built in that regard, but there is one thing that makes it completely bonkers. Wegstr would have been nice for EUR 500 or less (I'm guessing there is about EUR 200 of hardware in it), but if you try to buy one form that company then they lift over EUR 3600 from your wallet. I'm really surprised that company still exists, but then again, If they manage to swindle one customer a month on average then they still have a nice profit margin for a side-business, and if they manage to fraud tow or more customers a month then it's enough to live from.
« Last Edit: June 18, 2022, 04:59:13 am by Doctorandus_P »
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1851
  • Country: us
Re: CNC GRBL for PCB milling
« Reply #6 on: June 18, 2022, 04:56:35 am »
Here's a web-based Gerber-to-G Code program that does isolation traces.  I've used it with my Shapeoko CNC mill with limited success.  It takes a while to figure out how to get the Gerber and Excellon drill file origins set up -- I've done it, but seem to forget the secret every time.  The geometry is pretty large, you *might* be able to run a trace between DIP pads (0.10" centers), and leveling the blank PCB is pretty critical.

https://copper.carbide3d.com/
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline Kyle_from_somewhere

  • Regular Contributor
  • *
  • !
  • Posts: 59
  • Country: nl
Re: CNC GRBL for PCB milling
« Reply #7 on: June 18, 2022, 05:04:09 am »
I also want to make a remark about the most redicilous PCB milling machine on the market: "Wegstr"

Wegstr is a very simple CNC machine made from some pieces of wood-like sheet material,  guides from simple extruded aluminimum and cheap hardware store all-thread. but by using some clever tricks the thing is (nearly?) free of backlash. Because mills are very small for PCB milling, cutting forces are also very low, and pushing backlash to the side with for example a spring is acceptable.

Wegstr is quite nicely built in that regard, but there is one thing that makes it completely bonkers. Wegstr would have been nice for EUR 500 or less (I'm guessing there is about EUR 200 of hardware in it), but if you try to buy one form that company then they lift over EUR 3600 from your wallet. I'm really surprised that company still exists, but then again, If they manage to swindle one customer a month on average then they still have a nice profit margin for a side-business, and if they manage to fraud tow or more customers a month then it's enough to live from.

Then the only sensible thing to do is to clone it. It'll happen soon enough.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: CNC GRBL for PCB milling
« Reply #8 on: June 18, 2022, 03:38:32 pm »
On my Grizzly G0704 mill, I use AutoCad (Lite, free) to create the DXF file, CamBam to create the GCODE, Mach3 to interpret the GCODE and, for the hardware side of things, SmoothStepper (ethernet version) to control the motor drivers.  There's a heck of a learning curve but it works out pretty well.

The controller is a box PC from OnLogic (similar, my version is obsolete):

https://www.onlogic.com/cl200g-10-rs/

Smooth Stepper:

https://www.amazon.com/Ethernet-Smooth-Stepper-Breakout-board/dp/B07XVS3TRT
« Last Edit: June 18, 2022, 03:46:07 pm by rstofer »
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1175
  • Country: us
Re: CNC GRBL for PCB milling
« Reply #9 on: June 19, 2022, 04:11:14 am »
PCB milling requires excellent mechanical capabilities in the CNC mill.  So personally I think you are looking at this from the wrong end.    You really need a sound mechanical design before worrying about which G-Code processor you use.   In the end that micro controller is the cheapest part of a decent CNC mill.   

Beyond that heed the comment of others about board quality.   It is not trivial to get good results.   That doesn’t mean give up just make sure you have other uses for the CNC. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf