The Lobster PCB Mill
Project in Action
About the Project
Machine Capabilities
The Lobster PCB Mill is a fully automated PCB prototyping solution which aims to do for PCB design what 3D printing did for mechanical design. This project was designed and developed as my capstone project for the Mechatronics Engineering program at University of Waterloo. The machine is capable of producing 2-layer prototype PCBs with 0.1mm trace spacing, 0.5mm component size (0402), and 0.5mm vias without any user interaction. The project code is fully open source
Mechanical
The mechanical design of the mill is fully custom, featuring 3 individually controlled toolheads for milling/drilling, a PCB flipping mechanism, a mechanical press, and a wire extrusion head. The XY motion carriage uses linear rails and 2mm pitch lead screws with anti-backlash nuts for precise motion. Other components such as the wire feeding head, press, and milling heads use lead screws with a higher pitch and linear rods to save cost where precise motion is less important. BLDC motors and drone ESCs are used to power the drilling/milling heads, and a single servo motor actuates the wire cutters used on the wire feeding head.
The machine produces PCBs by first drilling holes for vias and through-hole components with 2 of the 3 toolheads. Wire is fed into each of the via holes, cut to length, and pressed to form an electrical connection between the top and bottom layers. An engraving head then mills out any copper where it isn’t needed, forming the final board (similarly to chemical PCB etching).
Computer Vision
Computer Vision is used during the wire alignment process to account for any bends or variations in the wire as it is fed, as well as to deal with skew issues that arise from the PCB flipping mechanism. Cameras and LEDs mounted on the wire head provide a view of the clippers, via hole, and wire in one shot. The computer vision algorithm isolates the via hole and wire with seperate masks, tracking the position of the wire tip relative to the via hole. By moving proportionally to the detected displacement, the machine can converge on the hole location to reliably feed wire into the hole.
Firmware
The machine is controlled using a Raspberry Pi, and two control boards (BTT octopus and arduino RAMPS). The machine uses a modified version of Klipper Firmware to communicate with both control boards to handle sensor input, servo control, ESC control, and stepper motor control. The use of klipper allows the machine to take advantage of a multicore 32 bit arm processor and Linux USB camera drivers for computer vision, while offloading the real time motor and sensor processing to the 16 bit control boards.
The modified firmware adds support for multiple toolheads as well as each of the custom motions added (wire cutting, pressing, flipping). The firmware uses microstepping on all axes to increase motion resolution, and additionally implements closed-loop position control using encoders on the x-y axis to compensate for the nonlinearities typical when using the microstepping feature on any stepper driver.
The modified firmware adds conductive probing on each of the 3 toolheads, and uses it to build a heightmap of the raw material before each PCB is milled. The firmware uses this information and bilinear interpolation to compensate for warping in the PCB material during milling, ensuring a constant cutting depth and width. Skew correction and position offsets were added to the firmware as well to compensate for the distance between toolheads, and misalignment in the pcb flipping mechanism.
The firmware presents a web interface via Octoprint allowing the machine to be controlled with a web browser, and allowing gcode files to be uploaded the same way.