- March 14, 2016 at 8:17 am #9048
Has anyone done any PCB work with a MPCNC? Anyone want to share some photos or videos?March 14, 2016 at 4:11 pm #9067
I would like to, but I have not had time to figure out how to create the files in a format I can make G Code with. I tried Fritzing to create the file, and I also downloaded Eagle. I haven’t used Eagle before, so there is some learning curve there. Was thinking of just making something simple with 123D, maybe a few LEDs inside some type of logo.
DaveMarch 14, 2016 at 4:19 pm #9068
Have you thought about just downloading something? There are sites like oshpark that have designs already. I know eagle (sort of), but I don’t know how to go from there to the tool paths.March 14, 2016 at 5:37 pm #9071
Milling PCBs requires a perfectly level surface and good results can be hard to achieve. You’ll need design software that can export your trace outlines in the board layout as a dxf file that you can then create a vbit toolpath for with your cam software. What I prefer over milling is to spray paint the board and use a laser to burn the trace outlines away which exposes the copper for a secondary acid etch operation. After that you’ll use your design software to export the drill gcode that will create the drilled holes. Most board layout software will export drill code that uses g81 canned drill cycle gcodes that Marlin and I believe even Grbl don’t even support. This is one of the main reasons why I’m abandoning the atmega based firmware platforms and going back to mach3 which supports all gcode as well as USB locating cameras, and many digitizing probe functions.March 15, 2016 at 7:25 am #9100
I tried milling few simple PCB with my MPCNC. Smaller one almost perfect, but bigger one was difficult, because of not even height of it. Used FLATCAM to generate gcode. For better results some sort of auto leveling would be nice :).
Some sort of problem with attachments, can I edit them ?
Sorry for bad English.
Attachments:March 15, 2016 at 8:35 am #9116
Nice work. Does your software generate the drill code without the g81 commands? Might have to look into that…for drilling. I’ve milled in the past, not on mpcnc, and got good results once in a while. The laser method has never failed me though and no bits to buy or burrs to clean up. Muriatic acid and peroxide etchant is very fast and effective. There’s a free software called pcb2gcode that does auto leveling but only supports mach3 and linuxcnc probing gcode. I think grbl might work to since it supports straight probing gcode as well but I’m only guessing.March 15, 2016 at 9:07 am #9120
Very cool. Those PCBs look great. Thank you for sharing.March 15, 2016 at 4:35 pm #9154
I saw this software used in a video I watched on milling PCB boards. I’m not sure exactly how it works, but I bookmarked it for when I get to this.March 15, 2016 at 4:53 pm #9156
That autoleveler turns your vbit into a probe by conducting between the tool and the copper surface of the board like a zero set plate works. It uses g31 codes for probing which is standard gcode.this command is not implemented In marlin firmware so you’ll need either mach3 or Linuxcnc control software. I think grbl implemented g31 code so it MIGHT work. If you never plan to do any3d printing with your machine then I’d strongly recommend moving to mach3 or Linuxcnc .definitely better support for pcb milling and drilling with a full gcode command set.March 16, 2016 at 2:24 pm #9203
That autoleveler looks pretty neat. I’ve seen auto tramming before by measuring the build plate in three places (which defines any plane) and then the z moves up and down depending on where the tool is in X, Y.
This one takes it a bunch further, mapping the Z offset for a grid across the entire surface, and then controls the z height of the tool at different X, Y depending on the measured grid.
From the description, I’m assuming there is some sort of separate calibration procedure, where you do the grid measuring, then the data output from that goes into the AutoLeveler tool, along with an input G code file. The software changes the GCode commands to insert a z height with the calibrated offset for each position command.
I don’t see why this wouldn’t work for all firmware, it’s only changing the position commands in the gcode.
It’s an especially good idea for the second case, where the surface is warped or bent (I’m sure there are limits though). The results looks great too. Thanks for sharing.March 16, 2016 at 3:34 pm #9204
I’ve used this software before with software called pcbgcode. You import your board layout into pcbgcode which runs as a plug in for eaglecad. The plug In creates the gcode from your board layout. That gcode is imported into autoleveler where you choose your probe grid layout. The autoleveler then inserts the probing gcode and the gcode to store the probe offsets. The probing gcode is the problem. It isn’t in the Marlin gcode command set. Grbl should work though as well as mach3 and Linuxcnc. Marlin does do probing and bed leveling but its done with a different command. Why? Who knows?March 16, 2016 at 6:54 pm #9219
Oh. I see why you’re talking about the g31 now. That makes sense.
Looking at mach3 and linuxcnc, that seems like hitting this problem with a sledge hammer. I would think the arduino is going to be way less painful than using Linux or Windows OS to directly drive the motion. It seems like real time would be a requirement, which (in my experience) is just a road full of hurt. Just my $0.02, feel free to disagree with me.
I found this page too, with some great info: http://reprap.org/wiki/PCB_Milling and some not-so-great info.
This page says that reprap firmware supports G31, dunno if that’s correct or not:
Seems like you could do the auto leveling with some of the other codes, G30 specifically looks like a good choice. I wonder how hard it would be to make a python script to do the same thing this autolevel program is doing. Just move the head around, call G30, get the Z. put it in a table. Then read in a GCode file looking for specific move commands, query the table for the right Z offset, then add it to the position command, and let all the other GCode just fall right through. Seems like a good weekend project, as long as you didn’t have to make a complicated user interface for it. Sorry, software engineering is my day job. If all you have is a hammer, everything looks like a nail, right?March 16, 2016 at 7:18 pm #9221
Are the pcb’s usually warped? Why not just mill the work surface flat first then slap down the pcb and skip the whole auto level part? You could even mill a nice custom pocket for it so you would only need to hold it in the z direction not the x and y?
Or is this, if the only tool you know is a mill everything looks like it needs to be cut? hahaha I crack myself up sometimes.March 17, 2016 at 2:49 am #9229
I might be mistaken about gcode used by autoleveler. Most cncs use g38.x for probing where marlin uses g29 and g30. Wouldn’t hurt to try Marlin but i was just looking at autoleveler site and it looks like everyone uses it with mach3,linuxcnc, or grbl which all have g38.x probing. I’ve used it with mach3 and Linuxcnc myself in the past. Also most, not all, pcb design software will export the drilling gcode with g81 drill codes, not supported by marlin and i doubt grbl either.
@vicious1: i think a well surfaced and levelled bed eliminates the need for autoleveler software and if the traces are wide enough then a mill is the better choice for tooling since its more forgiving of an unlevelled surface than a vbit. This is fine for simple passive component circuits but anything cool will involve a microcontroller and then you’ll be needing much tighter and thinner traces. I really do prefer a laser and acid etching for stuff like that. The way you secure the board is just as important. A vacuum table is ideal but who can afford that? Double sided tape also good. A fixture that only holds down corners isn’t so great because it tends to bring the corner lower while the opposing corner teeters upward so you end up with high spots in the middle of the board.
Nowadays You can get a batch of prototype boards made overseas for about$20 if you’re willing to wait but always more satisfying to make things on your own.April 3, 2016 at 9:06 pm #10202
Here is my first milled PCB. This is my electronics project I moved aside when I started building my MPCNC. It only has a Pro Trinket and 3 devices so the hook up isn’t too complicated. But I need at least 5, maybe more of these. I haven’t found any PCB milling software with an easy learning curve, so I just made a 3D model, generated the G Code in Estlcam, then cut it.
It took 3 attempts. I milled a pocket in pink foam board, then put the circuit board in the pocket. I gave this 2 tries, but I wasn’t satisfied with it so my last try I made a pocket in MDF. The MDF worked best. It’s a 2 sided circuit board, so I did it in 5 cuts. Drill, engrave, pocket, (flip the board over) engrave, and pocket.
I tested it with an ohm meter, and it checked out. I will need to clean this up and cut it out next.
Attachments:April 4, 2016 at 5:04 am #10210
I didn’t try anything actually, but it seems that the best solution to make PCB is to use all the stuff from the Cyclone PCB Factory:
You can use GRBL for RAMPS (or at least GRBL for Cyclone: https://github.com/carlosgs/grblForCyclone ),
then you can use bCNC (free, autolevel, gerber files, milling, etc…) https://github.com/vlachoudis/bCNC
With GRBL for Ramps, you can still use Estlcam (and I think in a better way: you don’t need Repetier Host anymore and you can use autolevel, etc).
All the stuff of the Cyclone is as well documented as the MPCNC. Perfect for newbie.
I’m not an expert and I didn’t try all this stuff (still trying to find where is the 0.5mm slop I have on my MPCNC or trying to build a stronger CNC in mdf). But I don’t see any reason it won’t work with GRBL in your Ramps, it looks like better than Marlin if you don’t need to print in 3D.April 4, 2016 at 7:19 am #10214
Judging by the consistency of those lines, milling the pocket makes it extremely level. It looks great.
I tried to find software or some sort of PCB to test a while ago I gave up on the software after a few hours of screwing around and turned to SolidWorks for my little PCB test. I’ll need to find a guru to sit down with or maybe a good video walk through before I attempt that again.April 4, 2016 at 7:50 am #10216
Very cool. What size tools and depths of cut did you use?
I’m assuming you’re happy with your CAD solution, but if you really want to make anything more complicated, you are less likely to have wiring errors if you use a PCB CAD program. Something like eagle or KiCAD. In those programs, if your schematic is correct, then your layout has a high chance of being correct. The trick is finding a good part library, which had a 2D model of the part and a schematic. Sparkfun also has a big part library, which can really help getting started. Making parts from schematics is a pain, and most of the time, someone’s already done it. Doing this in 3D is going to be really tough when you start adding a lot more connections.
The gist is:
1) install eagle and get a good 1 or 2 parts libraries
2) All all your parts to the schematic, including any pin headers (0.1″ pin headers are useful if you actually solder on headers, or even just to solder on wires)
3) Wire everything together in the schematic.
4) Go layout, set the size of the board, move your parts around. Add holes for mounting, etc.
5) Make your traces, adding vias to the other side of the board, if necessary, etc. You can adjust the size of the traces. You can also do an autolayout or autotrace if you are bold.
6) Export it into a bunch of files… This is where it gets hazy, but the files are some standard format, with funny extensions, and they still need to be CAM’d.
I’m trying to remember, but when I did this last, eagle exported individual 2D files, something like a dxf for each layer, top and bottom, one for drill holes, and one for the perimeter, then I had to use something specifically designed for the PCB mill I was using to actually do that CAM.
Unfortunately, it is a steep learning curve, but if you’re already familiar with CAD, you’re going to be a step ahead. When you get your first PCB cut though, you will have learned 90% of the program. There’s no escaping that. You might also try to just find some eagle files out there to play around with. Again OSHPark has some shared designs:
When you do learn a program like this, you can definitely whip up some boards pretty quickly, and when you are done, you can just inspect the schematic to see what was wired where. It’s a very useful debug tool. The schematics can also have little subsections to make them easier to understand. I’ve seen some very complicated PCBs made this way, and with very few errors and revisions.Then when it comes time to put them into service the schematics were the only way to find out where to debug things.April 4, 2016 at 3:15 pm #10237
What size tools and depths of cut did you use?
I used all Dremel bits. To cut the traces, I used a 30 degree engraving bit. The pockets I found the smallest diameter bit I had so I’m not sure what it is. I think it’s a diamond bit, it looks like a gritty metal. It has a slight taper, flat on the bottom. This bit has a 2mm diameter at the bottom.
For engraving: 30 deg V, 5 m/s feed, .3 mm steps and a total depth of .6 mm.
For the pockets, I just needed to remove the coper: 2mm Dia, 5 m/s feed, .3 mm steps and depth of .4mm.
Most of my PC boards are one-off and include a micro-processor like an Arduino, so I make them with perf board, or 3D printed. If your interested, I have several examples here: http://www.instructables.com/id/Custom-Circuit-Boards/
I do a lot of prototyping before I solder, so I’m not to concerned about getting something wrong. I use Fritzing to document my wiring and I also use it to manually route the wiring for my one-off boards. I used Fritzing to do my wiring layout for this project, so I already knew about what it would look like before I made the model.
I will figure out a better software in time, I was just anxious to see if I could get the accuracy to do it. The MPCNC looks like it will do nicely.February 12, 2017 at 3:20 pm #27365
I just tested my MPCNC for PCB-milling and it worked great!
The outcome needed some sanding but that’s because I need to get some better end-mills or V-bits and fine tune the speeds and widths…
I made a simple post processor to clean up the gcode form FlatCAM, you can find it and an explanation on how I did it on my github
/KalleFebruary 12, 2017 at 3:25 pm #27367
Wow!February 12, 2017 at 4:35 pm #27368
I need to try this!February 12, 2017 at 9:50 pm #27396
I knew I had a reason to buy that set of really tiny bits. 😉February 15, 2017 at 3:04 am #27551
Marlin have implemented bed auto leveling, manual….
Its a way. See in action on this video.March 2, 2017 at 11:56 pm #28774
Thanks so much for your isolation milling write-up on github. Your notes and batch file gave me the inspiration to try it.
I made an arbitrary test board with a VCO and binary counter from some 35 year old 74LSxx parts that I had laying around. After the first iteration I squeezed the design rules and was able to get traces between the .1″ DIP pads with very clean results. This is by far the tiniest thing that my 1 1/2 year old MPCNC has milled. The trace width is 0.6mm and clearance is 0.3mm. Probably could go a bit smaller.
I modified PostProcess.Bat to add tool-change pauses and messages on the LCD display and to combine everything into one gcode file. To set Z0 I just use a multimeter in continuity check beep mode and an alligator clip on the V-bit. I adjust the Z thumbwheel until it beeps then turn on the machine to lock in Z0. (I’ve been too lazy to merge your Marlin changes into mine for Auto-Z0 and to keep steppers active between files.)
I may modify the batch file to get rid of the feed rate defaults so that the feeds can be specified in Flatcam for each individual pass. For example I want a deep cutout pass as a bit slower pace but the drilling and engraving can go much faster, probably over 140mm/min.
This board took about 21 minutes to mill, 24 for drill, 6 for silk, and 4 for cutout. I should be able to cut that down a lot. There is a tradeoff between trace milling time and the isolation width. The PCB I’m holding in the photo used the Flatcam width=1 parameter which makes one pass around each trace. Width=2 will take two passes and clear out more room for easier soldering but will take twice as long to mill.
The milling and cutout was done with cheep ebay 10 for $10 V-bits, 30degree, 0.1mm tip. The PCB drills are from Harbor Freight. I found that the Inventables.com FR1 PCB blanks mill much cleaner than the FR4 that I started out with. No tear-out at all and no sanding was needed.
I have some notes on Eagle/Flatcam workflow and setting that I can clean up and post if anyone is interested.
My next step is for my son and I to design some guitar pedal effects and synths based on the Teensy 3.2/3.6 (https://www.pjrc.com/teensy/)
Attachments:March 3, 2017 at 12:16 am #28780
I’d love to see you workflow if you have the time to write it down – as I said before, I’ve just found a way that works, not put a lot of effort to optimize it!
Please post your modified bat-file as well if anyone likes your workflow more!
The speeds set in the bat file are very low! I have increased my speeds a lot compared to the bat file on github! (good to start slowly)March 3, 2017 at 12:19 am #28781
Including few more photos.
I milled a flat surface and parallel edge reference to hold the PCB. I may need to resurface the holder each time I remove it. Haven’t tried it yet. Held the PCB down with “JVCC DCP-01 Double coated Crepe” tape from Findtape.com.
The V-bit did not come with the stop collar. I took one off a broken drill bit (they break if you drop them!) and pushed it on with a vice to match my drill depth.
Attachments:March 3, 2017 at 12:26 am #28786
Here is the modified batch file. Funny I have not touched a .bat file in probably 20 years. I’ll try to clean up my notes and post them next week or try to get them formatted for Gitub.
Attachments:March 3, 2017 at 12:30 am #28788
Haha, I know bat-file is the shit!March 3, 2017 at 12:31 am #28789
You must be logged in to reply to this topic.