Belt-driven open source circuit mill using low-cost 3-d printer components

: Barriers to inventing electronic devices involve challenges of iterating electronic designs due to long lead times for professional circuit board milling or high costs of commercial milling machines. To overcome these barriers, this study provides open source (OS) designs for a low-cost circuit milling machine. First, design modiﬁcations for mechanical and electrical subsystems of the OS Distributed 3-D (D3D) Robotics prototyping system are provided. Next, Copper Carve, an OS custom graphical user interface, is developed to enable circuit board milling by implementing backlash and substrate distortion compensation. The performance of the OS D3D circuit mill is then quantiﬁed and validated for: positional accuracy, cut quality, feature accuracy, and distortion compensation. Finally, the return on investment is calculated for inventors using it. The results show by properly compensating for motion inaccuracies with Copper Carve, the machine achieves a motion resolution of 10 microns, which is more than adequate for most circuit designs. The mill is at least ﬁve times less expensive than all commercial alternatives and the material costs of the D3D mill are repaid from fabricating 20–43 boards. The results show that the OS circuit mill is of high-enough quality to enable rapid invention and distributed manufacturing of complex products containing custom electronics.


Introduction
Domestic commerce started in the U.S. as household-level distributed manufacturing (DM) [1,2].However, standardized high-volume, centralized mass production overtook it with the first industrial revolution and has made up the majority of domestic production until the present [3][4][5][6][7][8].Recently, many authors have argued that DM with 3-D printing can reduce costs for consumers for a wide range of products [9][10][11][12][13].This can be accomplished with 3-D printing businesses manufacturing and selling products to consumers or other businesses [14][15][16][17].As examples of the growing prevalence of this trend, 3-D printing stations are being added to commercial chains such as Home Depot [18] and the United Postal Service [19].However, free and open source hardware (FOSH) development [20,21] provides a profitable investment for household-level DM with self-replicating rapid prototyper (RepRap) 3-D printers [22][23][24].RepRap-centered DM of high-end products (e.g., scientific tools) has been shown to significantly reduce costs [25][26][27][28][29][30] and provides a high return on investments (ROIs) for science funders [31,32].In addition, this model is being adopted by the average American consumer and the number of free pre-designed 3-D products of all kinds is also growing rapidly because of the economic benefits of DM for both Do It Yourself (DIY) kits [33] as well as plug-and-play commercial 3-D printers [34].Most strikingly, a recent study showed commercial 3-D printers were economically viable even when used for only fabricating hard plastic toys [35] or flexible products from a relatively-expensive specialty 3-D printing filament [36].
However, currently DM has matured primarily in mechanical products and components because of widespread cost declines due to the open sourcing of 3-D printing [37].Open source electronics has created many successful companies because various open hardware business models work well with hobbyist electronics [38]; however, the DM of electronics is not as mature.For example, the fabrication stations at Home Depot [18] and the U.S. Postal Service [19] only include mechanical prototyping, but do not offer electronics prototyping.The lack of maturity in DM of open source electronics is a limiting factor in the complexity of products.There are two primary reasons for the slow adoption of DM circuit boards.First, there is a lack of unified sources for pre-designed projects, equivalent to sources for 3-D printable models like MyMiniFactory [39], Thingiverse [40], and YouMagine [41], or the search engine Yeggi [42].There are some sources of FOSH circuitry, such as Open Circuit Institute [43] and Open Circuits [44], though they have not been widely adopted.Most importantly, there are no widely recognized low-price FOSH circuit milling machines equivalent to the RepRap 3-D printers that can be built by consumers or purchased from companies like Lulzbot [45], re:3D [46], and Ultimaker [47].The existing mills on the market are either prohibitively expensive [48], or lack proper documentation and are difficult to tune due to reliance on closed source designs [49].The current traditional methods of circuit board procurement (ordering from fabrication shops) can be improved on in terms of both lead time and cost [50] with a low-cost FOSH circuit board mill.
This study provides open source designs for a low-cost circuit-milling machine in order to overcome these limitations and enable DM of complex products containing custom electronics.The goal of the design is to provide an enabling device for inventors to make novel electronic designs by leveraging the same open source and peer to peer (P2P) methodologies found to be so successful in 3-D printing.The mill is thus designed around the open source D3D Robotics prototyping system [51], because of a low part count, scalability, and ability to be DM.First, this study provides the design modifications for the mechanical and electrical system of the D3D system.Next, a custom graphical user interface (GUI) open source software called Copper Carve is developed to enable circuit board milling.
Copper Carve is minimalist in nature and made to be easily modified for other applications, although here the implementations of two critical features, backlash compensation and substrate distortion compensation, are discussed for their importance to circuit board milling.The mathematics of these features are detailed and discussed.The performance of the open source circuit mill is quantified and validated for (1) positional accuracy, (2) quality of cut, (3) feature accuracy, and (4) distortion compensation.Finally, the cost of the machine is considered, as well as a return on investment (ROI) analysis for using it.

Materials and Methods
First, the design (Figure 1) and construction of the device is discussed, as well as adaptions that must be made to customize D3D to this new application.Next, the major components of the software will be explained.Lastly, a standard operation procedure will be defined, as well as a validation procedure to characterize the machine and test for proper operation.

D3D Design System
The D3D construction has already been proven by Open Source Ecology (OSE) [52], as an effective fused filament fabrication (FFF) 3-D printer [51].The system itself consists of few original components for motion axes; motor pieces, idler pieces, and carriage pieces (Figure 2).A breakdown of the quantities of each piece used can be found in the machine bill of materials (BOM) available at https://osf.io/mf78v/.The mill is built inside of a 406.4 mm (16 inch) cubic space frame for rigidity, and ease of mounting.The D3D building blocks are all designed with short sockets for 10-pound neodymium magnets [53], which are used to easily connect and reconfigure components like the end stop interfaces.Magnets are also used to fix the movement axes to the space frame.
Though it is not necessarily a D3D requirement, OSE recommends the utilization of the open source Arduino Mega [54], paired with a RepRap Arduino Mega Pololu Shield (RAMPS) motor control board [55].The firmware used is a slight variation on the Marlin 3-D printer firmware [56].A 12V DC power supply is used for motors [57], and a 0-50 V DC supply is used for powering the spindle [58].

D3D Design System
The D3D construction has already been proven by Open Source Ecology (OSE) [52], as an effective fused filament fabrication (FFF) 3-D printer [51].The system itself consists of few original components for motion axes; motor pieces, idler pieces, and carriage pieces (Figure 2).A breakdown of the quantities of each piece used can be found in the machine bill of materials (BOM) available at https: //osf.io/mf78v/.

D3D Design System
The D3D construction has already been proven by Open Source Ecology (OSE) [52], as an effective fused filament fabrication (FFF) 3-D printer [51].The system itself consists of few original components for motion axes; motor pieces, idler pieces, and carriage pieces (Figure 2).A breakdown of the quantities of each piece used can be found in the machine bill of materials (BOM) available at https://osf.io/mf78v/.The mill is built inside of a 406.4 mm (16 inch) cubic space frame for rigidity, and ease of mounting.The D3D building blocks are all designed with short sockets for 10-pound neodymium magnets [53], which are used to easily connect and reconfigure components like the end stop interfaces.Magnets are also used to fix the movement axes to the space frame.
Though it is not necessarily a D3D requirement, OSE recommends the utilization of the open source Arduino Mega [54], paired with a RepRap Arduino Mega Pololu Shield (RAMPS) motor control board [55].The firmware used is a slight variation on the Marlin 3-D printer firmware [56].A 12V DC power supply is used for motors [57], and a 0-50 V DC supply is used for powering the spindle [58].The mill is built inside of a 406.4 mm (16 inch) cubic space frame for rigidity, and ease of mounting.The D3D building blocks are all designed with short sockets for 10-pound neodymium magnets [53], which are used to easily connect and reconfigure components like the end stop interfaces.Magnets are also used to fix the movement axes to the space frame.
Though it is not necessarily a D3D requirement, OSE recommends the utilization of the open source Arduino Mega [54], paired with a RepRap Arduino Mega Pololu Shield (RAMPS) motor control board [55].The firmware used is a slight variation on the Marlin 3-D printer firmware [56].A 12V DC power supply is used for motors [57], and a 0-50 V DC supply is used for powering the spindle [58].

Custom Adaptions
A few custom components must be designed to facilitate the tool spindle (Figure 3a), and board holder (Figure 3b).In addition, each axis must be driven by two stepper motors to facilitate the loads associated with carrying the tool spindle, as well as milling into the material.In addition, the Z-axis requires a higher current supply than is on the RAMPS driver board, so a TB6600 based driver [59] is selected and split to two stepper motors.

Custom Adaptions
A few custom components must be designed to facilitate the tool spindle (Figure 3a), and board holder (Figure 3b).In addition, each axis must be driven by two stepper motors to facilitate the loads associated with carrying the tool spindle, as well as milling into the material.In addition, the Z-axis requires a higher current supply than is on the RAMPS driver board, so a TB6600 based driver [59] is selected and split to two stepper motors.The last modifications are to add four compression springs to the Z-axis linear rails.They are used to cancel the 1 kg of weight associated with the tool spindle.Since D3D is based around belt driven axes, the failure mode of the loaded Z-axis would be to fall until it collides with the cutting surface-effectively breaking cutting tools or ruining the work piece.The addition of the springs mitigates this issue and changes the failure mode to lift the spindle or at least maintain its position (when friction in the belt matches the forces caused by compressed springs).

Software-Copper Carve
Copper Carve (Figure 4) is programmed in C++ using the community edition of QT Creator [60] available at https://github.com/ShaneOberloier/gcode_leveler.The software is designed specifically to communicate with Marlin firmware and utilize the RAMPs board hardware configuration.Since Copper Carve is also intended to be used for other D3D based projects, it is designed to be a minimalistic backbone that can be expanded for other applications.Copper Carve is released under the open source license GNU's Not Unix (GNU is a recursively defined acronym) General Public License (GNU GPL) [61].In order to maintain flexibility, the software is made to be as modular as possible.There are a few key required features that are described below.The last modifications are to add four compression springs to the Z-axis linear rails.They are used to cancel the 1 kg of weight associated with the tool spindle.Since D3D is based around belt driven axes, the failure mode of the loaded Z-axis would be to fall until it collides with the cutting surface-effectively breaking cutting tools or ruining the work piece.The addition of the springs mitigates this issue and changes the failure mode to lift the spindle or at least maintain its position (when friction in the belt matches the forces caused by compressed springs).

Software-Copper Carve
Copper Carve (Figure 4) is programmed in C++ using the community edition of QT Creator [60] available at https://github.com/ShaneOberloier/gcode_leveler.The software is designed specifically to communicate with Marlin firmware and utilize the RAMPs board hardware configuration.Since Copper Carve is also intended to be used for other D3D based projects, it is designed to be a minimalistic backbone that can be expanded for other applications.Copper Carve is released under the open source license GNU's Not Unix (GNU is a recursively defined acronym) General Public License (GNU GPL) [61].In order to maintain flexibility, the software is made to be as modular as possible.There are a few key required features that are described below.

Backlash Compensation
The first critical feature needed for printed circuit board (PCB) milling implemented in Copper Carve is backlash compensation.Mechanical backlash is a phenomenon caused when a movement axis changes direction.It is the maximum distance through which a mechanical component can be moved in one direction without applying appreciable force [62].For example, as the drive belt and pulley have tolerances between their teeth, the pulley will "slip" a finite and predictable amount when moving to push against the reverse sides of the belt teeth.Backlash causes movement axes to move slightly smaller distances than commanded.This error can cause significant cutting errors when milling fine features such as completely removing 0.5 mm circuit traces.
There are two necessary steps to compensate for backlash: (1) detecting backlash, and (2) injecting movement instructions to accommodate the physical limitations of the system.Since all motion commands are sent through Copper Carve, backlash can be predicted by examining the sequence of sent G-Code commands.The algorithm is straightforward and detailed in pseudocode below.

If Motion Command For Each Direction If Direction != Previous Direction Call Compensate for Backlash End If Store Direction End For End If
Once backlash has been detected, all other operations must be put on hold to allow the serial port to become available for the compensation G-Code.This is detailed below in pseudocode.

Backlash Compensation
The first critical feature needed for printed circuit board (PCB) milling implemented in Copper Carve is backlash compensation.Mechanical backlash is a phenomenon caused when a movement axis changes direction.It is the maximum distance through which a mechanical component can be moved in one direction without applying appreciable force [62].For example, as the drive belt and pulley have tolerances between their teeth, the pulley will "slip" a finite and predictable amount when moving to push against the reverse sides of the belt teeth.Backlash causes movement axes to move slightly smaller distances than commanded.This error can cause significant cutting errors when milling fine features such as completely removing 0.5 mm circuit traces.
There are two necessary steps to compensate for backlash: (1) detecting backlash, and (2) injecting movement instructions to accommodate the physical limitations of the system.Since all motion commands are sent through Copper Carve, backlash can be predicted by examining the sequence of sent G-Code commands.The algorithm is straightforward and detailed in pseudocode below.Once backlash has been detected, all other operations must be put on hold to allow the serial port to become available for the compensation G-Code.This is detailed below in pseudocode.

Substrate Distortion Compensation
Commonly, inexpensive copper-clad fiberglass used as a circuit board base material has a large degree of warpage as illustrated in Figure 5 (e.g., may vary in height by 2 mm).This warpage is considerable relative to the isolation routing cut depth of 0.1 mm.Because of this distortion, a lack of compensation will cause a failure to cut, or an increased cut depth-both of which will render the work piece unusable.

Store Location SendGCode(G91)//Relative Movement For Each Direction
If Backlash Present Move by backlash increment End If End For SendGCode(G90)//Absolute Movement SendGCode(G92 Location)//Reset to Measured Location

Substrate Distortion Compensation
Commonly, inexpensive copper-clad fiberglass used as a circuit board base material has a large degree of warpage as illustrated in Figure 5 (e.g., may vary in height by 2 mm).This warpage is considerable relative to the isolation routing cut depth of 0.1 mm.Because of this distortion, a lack of compensation will cause a failure to cut, or an increased cut depth-both of which will render the work piece unusable.This warpage can be compensated for by adjusting G-Code files to follow the measured Z axis topology.This topology can be measured automatically using the cutting tool as a continuity probe for the digital input on the RAMPS board.An alligator clamp is used to connect positive voltage to the cutting tool, and another clamp is used to connect the substrate to the digital input.By default, Marlin reports the location that the digital input is triggered (the digital input is configured as a Z end stop) and halts motion.Using this concept, paired with automated movement, height data can be collected for a grid of points of resolution and the size is determined automatically by Copper Carve (although it can still be modified by the user).
Once the topology is measured, the G-Code file can be transformed to conform to the measured mesh.This is accomplished by applying a 3-D linear interpolation [63].To start, assume a 2-D array of measured Z height data evenly spaced by ∆X and ∆Y.Four points P, Q, RI, and RII define a rectangular region (visualized in Figure 6) that is offset from the reference origin (i.e., if P is (0, 0, Z), then Xoffset and Yoffset will be 0).This warpage can be compensated for by adjusting G-Code files to follow the measured Z axis topology.This topology can be measured automatically using the cutting tool as a continuity probe for the digital input on the RAMPS board.An alligator clamp is used to connect positive voltage to the cutting tool, and another clamp is used to connect the substrate to the digital input.By default, Marlin reports the location that the digital input is triggered (the digital input is configured as a Z end stop) and halts motion.Using this concept, paired with automated movement, height data can be collected for a grid of points of resolution and the size is determined automatically by Copper Carve (although it can still be modified by the user).
Once the topology is measured, the G-Code file can be transformed to conform to the measured mesh.This is accomplished by applying a 3-D linear interpolation [63].To start, assume a 2-D array of measured Z height data evenly spaced by ∆X and ∆Y.Four points P, Q, R I , and R II define a rectangular region (visualized in Figure 6) that is offset from the reference origin (i.e., if P is (0, 0, Z), then X offset and Y offset will be 0).Commonly, inexpensive copper-clad fiberglass used as a circuit board base material has a large degree of warpage as illustrated in Figure 5 (e.g., may vary in height by 2 mm).This warpage is considerable relative to the isolation routing cut depth of 0.1 mm.Because of this distortion, a lack of compensation will cause a failure to cut, or an increased cut depth-both of which will render the work piece unusable.This warpage can be compensated for by adjusting G-Code files to follow the measured Z axis topology.This topology can be measured automatically using the cutting tool as a continuity probe for the digital input on the RAMPS board.An alligator clamp is used to connect positive voltage to the cutting tool, and another clamp is used to connect the substrate to the digital input.By default, Marlin reports the location that the digital input is triggered (the digital input is configured as a Z end stop) and halts motion.Using this concept, paired with automated movement, height data can be collected for a grid of points of resolution and the size is determined automatically by Copper Carve (although it can still be modified by the user).
Once the topology is measured, the G-Code file can be transformed to conform to the measured mesh.This is accomplished by applying a 3-D linear interpolation [63].To start, assume a 2-D array of measured Z height data evenly spaced by ∆X and ∆Y.Four points P, Q, RI, and RII define a rectangular region (visualized in Figure 6) that is offset from the reference origin (i.e., if P is (0, 0, Z), then Xoffset and Yoffset will be 0).First, confirm that a given point from the G-Code falls in the region currently being examined.Assume an arbitrary point (X,Y).In order for this point to fall in the region of concern, the following inequalities must be true: Once a point is confirmed to be within the rectangular region, it must next be in sub-region I or II.This is important because a plane can only be constrained by three points.The interpolation will always use P and Q, but it must be determined whether R I or R II is to be used.The point is in sub-region I if the following inequality is true.This will indicate that R II must be used for the interpolation.
If the above inequality is not satisfied, then the point is in sub-region II, and satisfies the following relation.R II must be used.
Once the location of the point in the height array is determined, the interpolation process can begin.First, define the points used for interpolation: From these three points, two vectors can be defined: Now it is possible to find the normal vector formed by PQ and PR.This can be done by carrying out the cross product: The value of this determinate is found to be: In order to keep equations orderly, short hand representations are defined for Inventions 2018, 3, 64 8 of 19 A 3-D plane can now be defined given the normal vector and a point on the plane, which is assumed to be our point undergoing adjustment (X,Y,Z), where X and Y are known, and Z is a known value that will be modified.
Finally, solving for Z, a solution is attained: Using Equation ( 16), each G-Code position can be modified to conform to the measured height mesh.

Usage of Timers
In an attempt to keep the code of Copper Carve as comprehensible as possible, QT timers are implemented to handle long or continuing processes such as G-Code streaming or the auto leveling procedure.The timers are used to break up the execution of a sub-process and allows for multiple processes to be executed in a parallel and scheduled manner.These same processes could be handled with multi-threading methods, however the implementation in QT would not be easily comprehensible by the lay user.

Auto-Replace Functionality
Though Copper Carve is made to directly interface with the D3D mill, some considerations have been made.Each G-Code command feeds through an auto-replace function that references a file "substitutions.txt".This can be used to alter the G-Code based on which computer-aided manufacturing (CAM) software is being used, or which firmware the target machine contains.

Mill Usage Workflow
The mill has a specific set of constraints that define minimum specifications of the designed circuit board.In this section, a process is detailed to ensure manufacturing that meets these specifications.

Board Design
It is recommended that circuit boards are designed in KiCAD [64], since the software is free and open source software (FOSS), and fits well with the toolchain.It is required to have a minimum trace spacing of 0.2 mm and a minimum trace width of 0.5 mm.Any smaller trace width will result in the trace being cut completely off of the board.
Once the board is designed, the auxiliary axis must be placed near the circuit board (preferably in the bottom-left corner of the edge.cutslayer) in order to reduce any large locational offset from the origin.

FlatCAM
The Gerber files are converted to machine-readable G-Code files.This is done with the open source PCB CAM package, FlatCAM [65].Tool settings may vary depending on the specific tool selected.However, a typical cut depth for traces and pads is 0.1 mm.Feed rate for V-shaped engraving bits [66] should be 50 mm/min, and end mills should be 100 mm/min.

Validation
Circuit board milling requires tight tolerances, otherwise the board will likely malfunction.Because of this, the machine must be tightly calibrated and characterized.

Positional Accuracy
First, the positional accuracy of each axis must be measured.This can be done with a dial indicator set up similar to Figure 7.

Validation
Circuit board milling requires tight tolerances, otherwise the board will likely malfunction.Because of this, the machine must be tightly calibrated and characterized.

Positional Accuracy
First, the positional accuracy of each axis must be measured.This can be done with a dial indicator set up similar to Figure 7. First, the axis is jogged a small value (1 mm) in the positive direction.The indicator is zeroed, then another positive movement is called of a known value.The actual movement is measured and compared.If there is a discrepancy between the two, the steps per mm value for that axis must be adjusted using the M92 command.
Using the same dial indicator setup, the backlash can be measured, but only after the steps per mm value has been validated.To measure backlash, the position is moved in the negative direction a small value (1 mm).The indicator is then zeroed, and the axis is jogged in the positive direction.The difference between command and the measured distance is the backlash value.This value is placed in Copper Carve's option screen for each axis.With these values updated, the same test can be performed, and if the compensation is successful, there should be no difference between the movement command and the measured movement.

Quality of Mill Cut
A quality cut is defined as a non-destructive cut in the substrate with minimum burring on the copper edges.This is observed both visually, and with an Olympus PME3 optical microscope, using 50× magnification.

Feature Accuracy
Trace width can be a critical dimension, so it is important that their parameters appear on the board as designed.Using an optical microscope, a known trace width can be measured and compared with the intended value.If the measurement is off, this can indicate that either the steps per mm, or backlash values were not properly calibrated.
As an additional test, the pattern in Figure 8 is milled out 20 times in both the X-and Y-axis.This pattern is designed such that the left-most rectangle's width will not be affected by backlash errors.The right rectangle will be affected by backlash in movement 3, causing the width of the rectangle to First, the axis is jogged a small value (1 mm) in the positive direction.The indicator is zeroed, then another positive movement is called of a known value.The actual movement is measured and compared.If there is a discrepancy between the two, the steps per mm value for that axis must be adjusted using the M92 command.
Using the same dial indicator setup, the backlash can be measured, but only after the steps per mm value has been validated.To measure backlash, the position is moved in the negative direction a small value (1 mm).The indicator is then zeroed, and the axis is jogged in the positive direction.The difference between command and the measured distance is the backlash value.This value is placed in Copper Carve's option screen for each axis.With these values updated, the same test can be performed, and if the compensation is successful, there should be no difference between the movement command and the measured movement.

Quality of Mill Cut
A quality cut is defined as a non-destructive cut in the substrate with minimum burring on the copper edges.This is observed both visually, and with an Olympus PME3 optical microscope, using 50× magnification.

Feature Accuracy
Trace width can be a critical dimension, so it is important that their parameters appear on the board as designed.Using an optical microscope, a known trace width can be measured and compared with the intended value.If the measurement is off, this can indicate that either the steps per mm, or backlash values were not properly calibrated.
As an additional test, the pattern in Figure 8 is milled out 20 times in both the Xand Y-axis.This pattern is designed such that the left-most rectangle's width will not be affected by backlash errors.The right rectangle will be affected by backlash in movement 3, causing the width of the rectangle to be thinner than the left rectangle.Data gathered from this experiment will show both feature variation, and compensation effectiveness.be thinner than the left rectangle.Data gathered from this experiment will show both feature variation, and compensation effectiveness.

Distortion Compensation Accuracy
The distortion compensation can be observed by introducing an extreme situation.The copper clad fiber glass is fastened to a piece of wood, cut to set the board at a 10-degree angle to the cutting surface.A test pattern is then milled, and observed for Z-axis accuracy (i.e., under or over-cutting).

Overall Results
The completed design in Figure 9 has been proven to be robust and suitably accurate.The D3D design system has proven itself as a framework for creating low-cost, minimalist, and scalable machines.The machine itself can be constructed during a small 8 h build time.A comprehensive bill of materials (see https://osf.io/mf78v/)shows that the mill costs US$500 in parts.

Distortion Compensation Accuracy
The distortion compensation can be observed by introducing an extreme situation.The copper clad fiber glass is fastened to a piece of wood, cut to set the board at a 10-degree angle to the cutting surface.A test pattern is then milled, and observed for Z-axis accuracy (i.e., under or over-cutting).

Overall Results
The completed design in Figure 9 has been proven to be robust and suitably accurate.The D3D design system has proven itself as a framework for creating low-cost, minimalist, and scalable machines.The machine itself can be constructed during a small 8 h build time.A comprehensive bill of materials (see https://osf.io/mf78v/)shows that the mill costs US$500 in parts.
Inventions 2018, 3, x 10 of 19 be thinner than the left rectangle.Data gathered from this experiment will show both feature variation, and compensation effectiveness.

Distortion Compensation Accuracy
The distortion compensation can be observed by introducing an extreme situation.The copper clad fiber glass is fastened to a piece of wood, cut to set the board at a 10-degree angle to the cutting surface.A test pattern is then milled, and observed for Z-axis accuracy (i.e., under or over-cutting).

Overall Results
The completed design in Figure 9 has been proven to be robust and suitably accurate.The D3D design system has proven itself as a framework for creating low-cost, minimalist, and scalable machines.The machine itself can be constructed during a small 8 h build time.A comprehensive bill of materials (see https://osf.io/mf78v/)shows that the mill costs US$500 in parts.

Positional Accuracy
The positional accuracy of the machine was found to be suitable for the purpose of cutting most circuit board designs.Thanks to properly implemented motion compensation techniques, the machine step resolution is at the hard limit of 0.01 mm for the Xand Y-axis, and 0.008 mm for the Z-axis.The overall machine characteristics are shown in Table 1.
When measuring the machine backlash, a dial indicator can allow for accurate measurements up to 0.0254 mm.This value cannot be directly input into Copper Carve, however.Instead, the value must be some multiple of the resolution.This is because the stepper motors cannot physically make a "fraction" of a step.Once the values are measured to the fullest accuracy of the dial indicator, they are fine-tuned incrementally by cutting the test pattern in Figure 8, until the rectangles identical widths.

Quality of Mill Cut
It is desirable to minimize post-processing of the boards.One large post-processing step is sanding the circuit board to rid the copper cut edges of burrs.By sweeping different cutting feed rates and depth, an optimal configuration could be found.The following samples in Figure 10 were all analyzed visually for the amount and size of burrs present.In this case, it appeared that operating at a feed rate of 50 mm/min and a cutting depth of 0.2 mm yielded the fewest and smallest burrs.

Positional Accuracy
The positional accuracy of the machine was found to be suitable for the purpose of cutting most circuit board designs.Thanks to properly implemented motion compensation techniques, the machine step resolution is at the hard limit of 0.01 mm for the X-and Y-axis, and 0.008 mm for the Z-axis.The overall machine characteristics are shown in Table 1.
When measuring the machine backlash, a dial indicator can allow for accurate measurements up to 0.0254 mm.This value cannot be directly input into Copper Carve, however.Instead, the value must be some multiple of the resolution.This is because the stepper motors cannot physically make a "fraction" of a step.Once the values are measured to the fullest accuracy of the dial indicator, they are fine-tuned incrementally by cutting the test pattern in Figure 8, until the rectangles have identical widths.

Quality of Mill Cut
It is desirable to minimize post-processing of the boards.One large post-processing step is sanding the circuit board to rid the copper cut edges of burrs.By sweeping different cutting feed rates and depth, an optimal configuration could be found.The following samples in Figure 10 were all analyzed visually for the amount and size of burrs present.In this case, it appeared that operating at a feed rate of 50 mm/min and a cutting depth of 0.2 mm yielded the fewest and smallest burrs.

Feature Accuracy
A semi-octagon shape was cut into the copper with copper trace of widths 0.5 mm and 1 mm.An octagonal shape was chosen to view all common cutting orientations (Figure 11).The minimum width of each feature is measured and compared with the target in Table 2.The width of the cut was also measured and used to adjust the error percentage.This adjustment was made by subtracting the error of the nominal cut width (0.2 mm).This shows that if proper adjustments are made in the CAM software, the indicated error can be achieved.

Feature Accuracy
A semi-octagon shape was cut into the copper with copper trace of widths 0.5 mm and 1 mm.An octagonal shape was chosen to view all common cutting orientations (Figure 11).The minimum width of each feature is measured and compared with the target in Table 2.The width of the cut was also measured and used to adjust the error percentage.This adjustment was made by subtracting the error of the nominal cut width (0.2 mm).This shows that if proper adjustments are made in the CAM software, the indicated error can be achieved.The 20 patterns for X and Y are milled according to Figure 8.The widths of both the control (right rectangle) and variable (left rectangle) were measured in ImageJ [67] by analyzing a photograph taken with an Olympus Stylus digital camera and a reference scale.The results are displayed in a histogram to demonstrate the distribution of widths of the control and variable rectangles.
Figure 12 suggests that the X-axis follows a Gaussian distribution, with a standard deviation of 0.03 mm.This measured deviation was well below the threshold for significant error.Additionally, comparing the means of the distributions for no-backlash shapes with backlash induced shapes, there was an offset of 0.045 mm.This indicates that the backlash compensation used during this test was off by 0.045 mm.Ideally, the two distributions should be overlapped completely.
Figure 13 shows the two distributions for shapes cut with respect to the Y axis.Unlike Figure 12, the distributions did not follow any apparent trend.However, the standard deviation of the backlashinduced rectangles had a standard deviation of 0.02 mm.The means of each distribution had a space of 0.253 mm, indicating that the backlash compensation used to cut these patterns was not properly selected.The 20 patterns for X and Y are milled according to Figure 8.The widths of both the control (right rectangle) and variable (left rectangle) were measured in ImageJ [67] by analyzing a photograph taken with an Olympus Stylus digital camera and a reference scale.The results are displayed in a histogram to demonstrate the distribution of widths of the control and variable rectangles.
Figure 12 suggests that the X-axis follows a Gaussian distribution, with a standard deviation of 0.03 mm.This measured deviation was well below the threshold for significant error.Additionally, comparing the means of the distributions for no-backlash shapes with backlash induced shapes, there was an offset of 0.045 mm.This indicates that the backlash compensation used during this test was off by 0.045 mm.Ideally, the two distributions should be overlapped completely.
Figure 13 shows the two distributions for shapes cut with respect to the Y axis.Unlike Figure 12, the distributions did not follow any apparent trend.However, the standard deviation of the backlash-induced rectangles had a standard deviation of 0.02 mm.The means of each distribution had a space of 0.253 mm, indicating that the backlash compensation used to cut these patterns was not properly selected.

Distortion Compensation
The milling on an incline was executed successfully.The cut board could be viewed in Figure 14.The board was inspected using a flashlight to verify full cuts at all necessary areas.The inspection revealed one error, namely a failed cut (indicated by the red circle in Figure 14).This error could be

Distortion Compensation
The milling on an incline was executed successfully.The cut board could be viewed in Figure 14.The board was inspected using a flashlight to verify full cuts at all necessary areas.The inspection revealed one error, namely a failed cut (indicated by the red circle in Figure 14).This error could be

Distortion Compensation
The milling on an incline was executed successfully.The cut board could be viewed in Figure 14.The board was inspected using a flashlight to verify full cuts at all necessary areas.The inspection revealed one error, namely a failed cut (indicated by the red circle in Figure 14).This error could be remedied by increasing the cut depth by a small increment (0.01 mm).Additionally, the G-Code tool path is rendered in Figures 15 and 16, and visually inspected to follow the expected incline.The code successfully followed the angle, and the error likely occurred from slight measurement error, or a too-shallow cut depth.

Open Source as a Development Platform
This study joins several others [21,25,67] and stands as a testament to the effectiveness of open source technology as a hardware development platform.Very few components to this mill were designed from scratch thanks to contributions like D3D [51], RAMPS [55], Marlin [56], and communities, such as OSE and Arduino that provide helpful support groups and openly welcome contributions back to their library of work.A full list of the open source components used in this toolchain are described in Table 3. Open source is typically modular and scalable, which maximizes

Open Source as a Development Platform
This study joins several others [21,25,67] and stands as a testament to the effectiveness of open source technology as a hardware development platform.Very few components to this mill were designed from scratch thanks to contributions like D3D [51], RAMPS [55], Marlin [56], and communities, such as OSE and Arduino that provide helpful support groups and openly welcome contributions back to their library of work.A full list of the open source components used in this toolchain are described in Table 3. Open source is typically modular and scalable, which maximizes

Open Source as a Development Platform
This study joins several others [21,25,67] and stands as a testament to the effectiveness of open source technology as a hardware development platform.Very few components to this mill were designed from scratch thanks to contributions like D3D [51], RAMPS [55], Marlin [56], and communities, such as OSE and Arduino that provide helpful support groups and openly welcome contributions back to their library of work.A full list of the open source components used in this toolchain are described in Table 3. Open source is typically modular and scalable, which maximizes its potential applications [68].Because of the open source emphasis on DM, this machine was capable of being manufactured with a minimum number of tools or knowledge of manufacturing processes.Now the mill explored in this paper can act as an enabling device for encouraging electronics-based invention and the proliferation of DM of open source electronics.

D3D and Other Applications
The circuit mill explored in this application is one many potential applications of the D3D design system.The same setup could easily be scaled to mill large circuit boards.Copper Carve would require no adaptions to control the larger machine.The machine could also easily be adapted to hold different tools, such as a suction nozzle, making the machine into a pick-and-place tool.The machine could be adapted to utilize a syringe pump [48], which could then be used as a solder paste applicator.The mill, paired with the two bespoke hypothetical machines, could act as an entire tool chain to fabricate, and assemble circuit boards, furthering the capabilities of DM at the home, fablab, or small business levels.

Software Design Philosophy
Copper Carve is built around the philosophy that open source software should be coded in a way that the target audience can make meaningful modifications to the software.This philosophy requires a skilled programmer to prefer lower level (potentially more complex) solutions, than efficient solutions that invoke obscure or higher-level functions.For example, Copper Carve works for an electronics mill.Typical users of the mill will be electrical engineers, students, inventors, and hobbyists.Therefore, it makes sense to consider what kind of modifications the target audience may be making, and what level of programming they may be familiar with.That is why Copper Carve does not utilize a multi-threaded process, as they require a relatively high knowledge of computer science to properly utilize and modify.A core group of hardy functions, such as "SendGCode" are established so they can easily be implemented for purposes such as scripted buttons or custom processes by the target audience.

Market Comparison
Commercial circuit board milling machines can cost as much as 3199 United States Dollars (USD) [69], which is expensive when compared with the D3D mill explored in this study.All mills have identical resolutions, and though the maximum speeds seen in commercial systems can improve cutting times, they are limited by the maximum feed rate allowed by the cutting tool, which is well below 1000 mm/min.Thus, the maximum travel speeds are not a major advantage in real-world milling.The final category compared in Table 4, maximum milling speed, is thus a non-issue when considering the maximum allowable speeds used while milling.This high speed found in other devices is only useful in manual jogging operations, which is a small part of the overall operation.Commercial alternatives are often shipped assembled and ready to use, but because of that, are not scalable nor easily maintainable in cases of a part breakage.The cost of the D3D mill is for the materials only.The mill can be constructed in 10 h and requires only a RepRap-class 3-D printer, a chop saw, a power sander, and a soldering iron.This time does not include time spent 3-D printing axis components.The machine construction requires minimal knowledge of electrical wiring and mechanical assembly.Once the mill is assembled, basic knowledge of mechanical measurements is required in order to validate axial motion.
The price of each mill also weighs heavily on their respective return on investment (ROI).For this analysis, it assumed that unique 100 mm × 80 mm single layer circuit boards are being manufactured.Based on quotes generated from many PCB fabrication sources [50], a board can be ordered for 12.22 USD, if 27-day shipping is selected.From the same source, a board can be ordered for 25.36 USD if 10-day shipping is selected.The labor costs in using the D3D system are relatively trivial and the system does not need to be monitored during fabrication of a circuit.The energy used during the milling of a standard board was 0.5 kWh, and therefore the energy costs were also ignored.Thus, the only consumable material for the D3D circuit mill is the copper-clad fiber glass, which can cost as low as 0.42 USD [73].Simply dividing the cost of the mill by the cost per board less the cost to produce on the D3D mill, 43 boards (27-day shipping) or 20 boards (10-day shipping) must be produced in order to recoup the investment for the material costs of the D3D Mill.Compared to commercial alternatives, this can be as six times as many boards (258 27-day boards, 120 10-day boards).Although, the use of DM for circuit manufacture will cost less with any of the systems in Table 4, the most valuable asset of DM is the quick turnaround delivered by circuit mills: 2 to 3 h compared to a minimum of 10 days.This allows inventors and circuit designers to quickly iterate on designs of new boards.
Milling 43 boards is a highly achievable feat during the lifetime of the mill.For example, the base power meter used to monitor an open source home includes 11 boards [74].With this single project, the mill has already paid for a quarter of its BOM cost.Also, the design process itself for perfecting a new invention is likely to go through multiple iterations and revisions.There are also many cases where the mill could be used as a communal tool, such as research laboratories, fablabs or makerspaces.In all cases, the 43-board threshold can be met in a very short span of time.

Additional Applications and Future Work
The D3D circuit mill has added utility that has not yet been explored.The mill can be used to cut out 2-D components from wood, or plastics.Additionally, the mill can be used to engrave many materials from wood, plastic, and most metals.Due to the relatively low torques the mill is designed for, it is likely that these tasks can be achieved by using small cut depths and lower feed rates.
In addition to exploring additional applications of the milling machine, the machine can be fabricated for lower costs with 3-D printed vertices and aluminum extrusion.Copper Carve can also be modified to have many desirable features such as tool path preview, motion optimization, height map output, and multi-machine communication (for large production systems).

Conclusions
The open source D3D based circuit mill has proven to be a fully-functional circuit board mill that is constructed entirely on open source platforms.By properly compensating for motion inaccuracies with the open source Copper Carve, the machine has achieved a motion resolution of 0.01 mm, which corresponds to the step size of the stepper motor.The mill is at least five times less expensive than all commercial alternatives, with manufacturing capabilities that can fabricate according to most design standards.This allows the materials costs of the D3D mill to be recouped in as little as 20 boards while offering users a several-hour turnaround time between design iterations for inventors instead of 10 days.

Figure 1 .
Figure 1.The FreeCAD model of the open source circuit mill.

Figure 2 .
Figure 2. The 3-D printed component models for the D3D design system.The rendered designs of the (a) motor mounting block, (b) bearing mount block, and (c) carriage block are shown.

Figure 1 .
Figure 1.The FreeCAD model of the open source circuit mill.

Figure 1 .
Figure 1.The FreeCAD model of the open source circuit mill.

Figure 2 .
Figure 2. The 3-D printed component models for the D3D design system.The rendered designs of the (a) motor mounting block, (b) bearing mount block, and (c) carriage block are shown.

Figure 2 .
Figure 2. The 3-D printed component models for the D3D design system.The rendered designs of the (a) motor mounting block, (b) bearing mount block, and (c) carriage block are shown.

Figure 3 .
Figure 3. (a) The spindle mount model.(b) The board holder model.

Figure 3 .
Figure 3. (a) The spindle mount model.(b) The board holder model.

Figure 4 .
Figure 4.The machine control interface of Copper Carve.

Figure 4 .
Figure 4.The machine control interface of Copper Carve.

Figure 6 .
Figure 6.A sketch defining the regions and points used for the 3-D linear interpolation.

Figure 6 .
Figure 6.A sketch defining the regions and points used for the 3-D linear interpolation.

Figure 6 .
Figure 6.A sketch defining the regions and points used for the 3-D linear interpolation.

Figure 7 .
Figure 7. Setup of dial indicator for measuring backlash on X-axis.

Figure 7 .
Figure 7. Setup of dial indicator for measuring backlash on X-axis.

Figure 8 .
Figure 8.A test pattern to verify feature repeatability and backlash compensation effectiveness.Grey dashed arrows indicate that the mill is moving above the substrate.Green Circles indicate that the tool has plunged into the surface.Blue arrows indicate the path the mill is cutting into the copper.

Figure 9 .
Figure 9.An image of the completed circuit mill.

Figure 8 .
Figure 8.A test pattern to verify feature repeatability and backlash compensation effectiveness.Grey dashed arrows indicate that the mill is moving above the substrate.Green Circles indicate that the tool has plunged into the surface.Blue arrows indicate the path the mill is cutting into the copper.

Figure 8 .
Figure 8.A test pattern to verify feature repeatability and backlash compensation effectiveness.Grey dashed arrows indicate that the mill is moving above the substrate.Green Circles indicate that the tool has plunged into the surface.Blue arrows indicate the path the mill is cutting into the copper.

Figure 9 .
Figure 9.An image of the completed circuit mill.Figure 9.An image of the completed circuit mill.

Figure 9 .
Figure 9.An image of the completed circuit mill.Figure 9.An image of the completed circuit mill.

Figure 10 .
Figure 10.Top row from left to right: (a) Feed rate of 50 mm/min, plunge depth of 0.1 mm; (b) feed rate of 100 mm/min, plunge depth of 0.1 mm; (c) feed rate of 150 mm/min, plunge depth of 0.1 mm; and (d) feed rate of 50 mm/min, plunge depth of 0.2 mm.

Figure 10 .
Figure 10.Top row from left to right: (a) Feed rate of 50 mm/min, plunge depth of 0.1 mm; (b) feed rate of 100 mm/min, plunge depth of 0.1 mm; (c) feed rate of 150 mm/min, plunge depth of 0.1 mm; and (d) feed rate of 50 mm/min, plunge depth of 0.2 mm.

Figure 11 .
Figure 11.An image of the octagonal shape used to verify feature accuracy.

Figure 11 .
Figure 11.An image of the octagonal shape used to verify feature accuracy.

Figure 12 .
Figure 12.A histogram of feature widths measured on the X-axis.

Figure 13 .
Figure 13.A histogram of feature widths measured on the Y-axis.

Figure 12 . 19 Figure 12 .
Figure 12.A histogram of feature widths measured on the X-axis.

Figure 13 .
Figure 13.A histogram of feature widths measured on the Y-axis.

Figure 13 .
Figure 13.A histogram of feature widths measured on the Y-axis.
the cut depth by a small increment (0.01 mm).Additionally, the G-Code tool path is rendered in Figures15 and 16 , and visually inspected to follow the expected incline.The code successfully followed the angle, and the error likely occurred from slight measurement error, or a too-shallow cut depth.

Figure 14 .
Figure 14.The resultant circuit board, which was milled on a 10° incline.

Figure 15 .
Figure 15.The rendered tool path in the XY-axis.

Figure 16 .
Figure 16.The rendered tool path in the XZ-axis.

Figure 14 .
Figure 14.The resultant circuit board, which was milled on a 10 • incline.
, and visually inspected to follow the expected incline.The code successfully followed the angle, and the error likely occurred from slight measurement error, or a too-shallow cut depth.

Figure 14 .
Figure 14.The resultant circuit board, which was milled on a 10° incline.

Figure 15 .
Figure 15.The rendered tool path in the XY-axis.

Figure 16 .
Figure 16.The rendered tool path in the XZ-axis.

Figure 15 .
Figure 15.The rendered tool path in the XY-axis.
, and visually inspected to follow the expected incline.The code successfully followed the angle, and the error likely occurred from slight measurement error, or a too-shallow cut depth.

Figure 14 .
Figure 14.The resultant circuit board, which was milled on a 10° incline.

Figure 15 .
Figure 15.The rendered tool path in the XY-axis.

Figure 16 .
Figure 16.The rendered tool path in the XZ-axis.

4 . Discussion 4 . 1 .
Open Source as a Development PlatformThis study joins several others[21,25,67] and stands as a testament to the effectiveness of open source technology as a hardware development platform.Very few components to this mill were designed from scratch thanks to contributions like D3D[51], RAMPS [55], Marlin[56], and communities, such as OSE and Arduino that provide helpful support groups and openly welcome contributions back to their library of work.A full list of the open source components used in this

Figure 16 .
Figure 16.The rendered tool path in the XZ-axis.

Table 1 .
Motion specifications for the circuit mill.

Table 1 .
Motion specifications for the circuit mill.

Table 3 .
All open source tools used in the designed tool-chain.

Table 4 .
A comparison of commercial circuit mills to the D3D mill.
* Materials costs only.