I put the CNC engraver to use milling a prototype single-sided PCB for the ESP8266 alarm system I've been working on. The tutorials on the internet for PCB2Gcode and KiCAD were pretty easy to follow, so this post is not a tutorial, but just for documenting my experience and some gotchas.
Design
The final design of the board in KiCAD |
The board is a connector board really. It powers the ESP8266 module at 3.3v and the 433MHz module at 5v, pulls up the reset and CH_PD pins on the ESP8266 and the buttons allow it to be easily reset and programmed (there's a UART header on the board too). For the wireless alarm system side of things it has a connector for the 433MHz wireless module to plug into, the output of which is voltage divided to get it down from 5v to somewhere in the neighbourhood of 3.3v, which the ESP8266 can handle.
Toolpath generation
Converting the Gerber and drill files from KiCAD into G-code instructions with PCB2Gcode. |
You always have to watch out for potential issues with mirroring at this point in the process, otherwise you might mill and drill a PCB only to find it "off" somehow. That reminds me of an early trap I ran into in KiCAD of the SMD component pads being on the opposite side of the board to the traces. This of course makes no sense for a single sided board without vias. The side that traces and SMD footprints are on can be changed, however.
The drill files were a bit of a nightmare because this PCB needed about five different drill sizes ( which I have), but it means lots of tool changes. The G-code that PCB2Gcode outputs also seems to expect your machine to be capable of automatic tool changes, which mine cannot do. I got around this by manually separating the G-code for each drill size into its own program. I'll have to look into writing a script to do this for me and/or insert a pause command into the G-code, if the feature does not already exist in PCB2Gcode.
It's important that Grbl doesn't have its position zeroed out between programs or it'll make a mess of things. Alternatively, and to be on the safe side, have the machine return to (0,0,0) position at the end of each file and don't do any homing, just so you always have a reference point.
Engraving/Milling
The CNC engraving setup with the board in the process of being engraved. |
The finished board. |
The clamps holding the board down were scarily easy to undo after
all the vibration of cutting; I'll have to put spring washers under the bolts to stop them coming loose. If the board had come loose in the middle of cutting I would have had to start over again without any way to align the board to the bed.
A bit more tuning of the settings in PCB2Gcode will be needed, and probably also a program which probes the surface of the board before cutting to determine where the surface of the board is, so that a constant cutting depth can be achieved.
The populated board. The ESP-01 breakout board is socketed (can't be seen from this angle). |
Assembled and ready for programming. |
More to come on the ESP8266 wireless alarm system soon...
No comments:
Post a Comment