This guide teaches you how to design a PCB in Fritzing and export Gerber files that can be cut on your Bantam Tools Milling Machine.
What is Fritzing?
Fritzing is a free, open-source electronic design software package for makers and hobbyists that enables you to go from a physical breadboard prototype to a milled board on your milling machine, without the steep learning curve of other PCB design software packages. Its four views allow you to build your breadboard prototype, turn it into a schematic, lay it out as a PCB board, and quickly export to Gerber files that can be cut on the milling machine. You can download Fritzing on the site.
In Fritzing’s code view, you can even write your Arduino code and upload directly to your microcontroller, making it a one-stop software package for makers.
Even better is that Fritzing comes with over 50 example Arduino shields, so if you don’t know anything about designing a circuit, it’s easy to follow their lead and quickly create, or modify, a board that you can mill out on the milling machine and populate with parts found in a typical Arduino starter kit.
If you’re new to Fritzing and want to learn more, check out their beginning tutorials or Simon Monk’s book Fritzing For Inventors.
Designing PCBs for the Milling Machine
Designing a PCB for the milling machine is a little different than designing for a PCB manufacturer.
Here are some design considerations:
- Use 10 mil minimum trace and space for the Othermill, and 6 mil minimum for the Bantam Tools Desktop PCB Milling Machine and Othermill Pro.
- Vias are not plated, so on double-sided boards you’ll need to solder a wire on either side of the board to connect vias.
How do I start a new project?
Open Fritzing and you’ll be taken to the Welcome tab. Notice that there are four other views: Breadboard, Schematic, PCB, and Code.
If you’re a maker with a physical prototype, start in the Breadboard view, where you can pick a microcontroller, select components, and place the components appropriately.
Fritzing comes with a parts library containing a variety of core parts. Sparkfun’s parts library comes preloaded, and Adafruit’s can be downloaded and installed. Also, a quick internet search for a part name plus “Fritzing part” will often produce that part made by another person in the Fritzing community.
Fritzing’s Built-in Examples
Another way to start a project is by opening one of Fritzing’s many example projects. This is how we’ll start this tutorial. Go to File > Open Example, and you’ll see over 50 templates of projects, most of which are Arduino shields that use components similar to those found in most Arduino starter kits. Many of these have links to thorough project explanations, a list of parts to buy, and code to use.
We’re going to open the Button example: File > Open Example > Arduino > Digital > Input > Button.
This example requires a momentary button, an LED. and a 10K resistor, all through-hole components. These .1” headers will enable you to attach the shield to your Arduino. The full project explanation is found on Arduino’s site.
Notice that once the example is loaded, you can toggle between the Breadboard, Schematic, and PCB views. A change made in one view — for instance, deleting the LED — will instantly be synchronized across all three views. Select File > Save As to make edits.
Breadboard View: Swap in a new component, connect a jumper to a different pin, or make any other changes you want.
Schematic View: View the corresponding schematic.
PCB View: View the board layout, which is how the milling machine will cut the board.
We’ll stay in the PCB view to prepare the design for the software.
Selecting Trace Size
Let’s take a look at the PCB layout and see what things we want to change. You’ll see some orange traces; click on one of them. In the Inspector window (go to Window > Inspector if it’s not already open), you’ll see how big that trace is.
In this case, it’s 24 mil, a width that’ll make soldering easier later on, so we aren’t going to make any changes. However, you can go as low as 6 mil for a Bantam Tools Desktop PCB Milling Machine and Othermill Pro or 10 mil for a V2 Othermill. To make a change, select a trace segment and select a width from the drop-down menu. Or you can type in your own value. For simple boards like this one, if you stick with larger trace sizes, you can mill the entire board using just a 1/32" flat end mill.
Putting Traces on the Top or Bottom of the Board
Select a trace and notice if it’s located on the top or bottom of the board, as shown in the Inspector. Top traces are yellow, and bottom traces are orange.
Click on “View From Above” and “View From Below” to switch perspectives.
Select if you want to be able to manipulate traces on one or both sides.
Consider what you’ll be soldering when choosing whether to put the traces and pads on the top or bottom of the board. If they’re on the top, headers will be easier to solder. However, if you’re using through-hole components, then putting traces and pads on the bottom of the board is more common.
In this case, we’re using both headers and through-hole components, so there’s no perfect choice. We’ll go with moving the traces to the top and put up with a little awkwardness when soldering the LED, resistor, and momentary button.
To move a trace, click on a trace segment, and in the Inspector window, select Top or Bottom. The entire trace will move, confirmed with a color change.
Take a look at your design and make sure everything looks correct. Now we’re ready for the fun part: exporting your Gerber files and milling your board on the the milling machine!
Mill and Build Your Shield
Most PCB design applications have a series of settings to navigate when exporting Gerber files. Not so with Fritzing.
Export your file.
Step 1: When you’re ready to export, just click on “Export for PCB” in the bottom bar, and select Extended Gerber (RS-274X). Create a new folder to save them in. If you have designed a single sided board, you must export your Gerbers as a double sided board, otherwise Bantam Tools Milling Machine Software will not be able to load your Gerber Files.
Step 2: Then open the software, click Open, and select the Button_copperTop.gtl file (all other files will be grayed out).
The software will automatically select the copperBottom.gbl, contour.gm1, and drill.txt files. The first two files contain your traces and pads; the contour.gm1 is the outline shape of the board; and the drill.txt is for the holes.
Mill the PCB.
Step 3: Take out a single-sided PCB and double-sided tape. With digital calipers, measure the thickness (Z) of your single-sided PCB and put this value in the Material Size dropdown.
Step 4: Then measure the thickness (Z) of the tape, putting that value in the Material Placement dropdown.
Step 5: Select a 1/32" flat end mill from the Milling Tools dropdown, make sure the settings look correct in Otherplan, and click Start Milling. The cut should take a few minutes to complete.
If you haven’t cut a PCB before, please refer to our Getting Started PCB Badge project for an overview of operating the milling machine and making a basic circuit board.
Solder the components.
Now it’s time to solder the components and headers onto your newly milled shield!
If this is your first foray into soldering, check out Adafruit’s Soldering Guide.
If you’re new to uploading sketches to Arduino, check out Arduino’s Getting Started Guide.
Go back to Fritzing, click on the Code View, and upload this sketch to your Arduino. You can upload through Fritzing, or with Arduino’s downloadable or web-based IDE.
Once that’s done, place the shield on your Arduino, attach it to a power supply, and give it a try!
If you run into any issues, you can download our completed Fritzing file or set of Gerber files and compare them to the ones you made.
Bonus: Want to learn how to use Fritzing to personalize your PCB with text or image? Check out our blog post on the topic!