I'm making a hybrid 3D printer and circuit etching (CNC milling) machine that can both 3D print and etch prototype circuit boards. I'll be using Marlin firmware with an Arduino Mega & RepRap 1.4 board. It will have a 3D printer head and a milling head side by side. I'd like to have it be able to read both .gbr (for circuit etching) and .gcode (for 3D printing) files. How should I configure Marlin to read both types?

  • $\begingroup$ You cannot do that. .gbr files are for photo plotters. $\endgroup$
    – user77232
    Commented Jul 17, 2019 at 19:55

2 Answers 2


You can use both .gcode and .gbr files one one machine. We do it where I work.

However, when we make prototype circuit boards, we don't print them; we acquire circuit board blanks, and then we either:

  1. Use a diode laser to burn off the top layer of garolite for isolation traces, then do a chemical dip to remove that copper, then another laser burn to expose pads for surface mount components; or

  2. Use a spindle tool to remove the top layer of garolite where needed for pads, as well as mill through the copper layer for isolation traces.

We have not found a printable material that has the conductivity we want in a circuit board.

Source: I work for Hyrel 3D

enter image description here

Note: we don't use Marlin on Arduino, we use in-house firmware on STM32F429 boards.

  • $\begingroup$ Would that mean I can load .gbr files just like I would .gcode files with no extra configuring? Also, I'm planning to just use a spindle, no laser or chemicals. $\endgroup$ Commented Jul 16, 2019 at 12:37
  • $\begingroup$ What does your software and firmware work with? Our software and firmware can do this. See this image (also added to answer). We also make our own solder paste masks (from aluminum cans), and use our pick-and-place attachment to position surface-mount components, then put them in our reflow oven to make prototypes and first runs, before sending them out for mass production. $\endgroup$
    – Davo
    Commented Jul 16, 2019 at 12:48
  • $\begingroup$ I'm using the Marlin firmware for my machine and I'm not sure it can use .gbr files. My machine is just supposed to etch prototype boards and 3D print. $\endgroup$ Commented Jul 16, 2019 at 13:47
  • $\begingroup$ As noted above, we don't use Marlin on Arduino. We use in-house firmware on STM32F429 boards. I don't know what your setup is capable of, but it does not seem like a very big stretch to turn a different motor during "extrusion" moves. $\endgroup$
    – Davo
    Commented Jul 16, 2019 at 13:55
  • $\begingroup$ I asked about using Marlin on Arduino so your answer didn't really answer my question. $\endgroup$ Commented Jul 17, 2019 at 2:40

Well, I'm Using pronterface to send the gcode to print the traces of my PCB with an ink pen (sharpie); since the parameter in the Marlin-Rep rap1.4 is configured to fast print, So I can easily send the code just setting the origin or Zero to print on any area of the printer.

To set the new Zero just use the code G92, for example we need to print in the middle of the printer, so just move the spindle to that position and set G92 X0 Y0, then andjust the Z height then set G92 Z0. for your milling add a Z secure travel to avoid collide with the surface and or mechanical clamps

This video shows a PCB print in the 3Dprinter, so for the milling process will be the same. The video shows also the process making the holes on the CNC; I didn't do in the 3d printer because in that time I hadn't a dremel support.

Also Tech2C teach how you can configure the whole printer, just follow this link

So, be happy milling in your 3d printer

Note: for gbrl files I haven't tested but you can try to read and send your code thru this program (pronterface) probably you cand get some messages like "uknown code" just like gcode sender does while trying to send codes for laser etching (old versions).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .