This week, we design a new circuit (based on the hello 44 starter board), mill to our spec, stuff the board and test it in preparation for programming. While the principles of electronic design dictate most of the board layout, there are certain opportunities for creativity and optimization (location of the components and the subsequent puzzle of designing traces to and around them, curvature of the traces and the aesthetics of the traces around the board, your choice of optional additional components to work with, etc). I chose Eagle for the circuit design software, and have included some getting started tips below.
First, it's best to get acquainted with the software through a tutorial. I've linked to my two favorites... the Sparkfun tutorial for Eagle if you prefer step by step screenshots, or this Youtube tutorial for Eagle if you prefer a visual tour of the interface with narrated steps. Our final steps (notably the file exporting for the modela) are not covered in these, but I address the remaining steps, below.
EagleCad tips-- Schematic:
- In general, all of the ambiguous menu buttons are listed quite clearly in the Edit and Draw menu. I preferred working off these pull down menus or using keyboard shortcuts to switch between the many functions you'll need (adding parts, moving parts, rotating, mirroring or deleting parts, etc). The command line bar is also a good alternative to the icons/buttons.
- To make sure you have access to the component parts you'll use in our CBA projects, add the fab.lbr library to your Eagle library (follow the explicit process instructions in the youtube or sparkfun tutorial for this). This library is linked to on the Electronics Design tutorial page.
- For some of the parts, you'll want to pull from the pre-loaded "supply" library in eagle, not the fab class library (i.e. for VCC and GND symbols)
- Use ESC to exit from a particular function (i.e. to avoid putting down 3 extra copies of that resistor you're working with)
- Best practices: don't try to explicitly connect each component in the schematic. You can rename the "nets" that extend from each component to have the same name, thus encoding an implicit connection without crowding up your schematic with lots of extraneous lines.
- You can establish common VCC (power source) and GND (ground) rails by connecting parts to repeated versions of these added symbols. See the schematic below for examples.
- The UI can easily deceive you into thinking that you've connected a net, when in fact, it's just sitting there not bonded to the part you intended. If you connect a net properly and move the mouse, the green net drawing indicator DOES NOT follow you and you don't need to hit escape to get rid of it. When renaming nets to connect them via Eagle's interal logic, you should see a confirmation dialog asking if you want to connect the nets in question. This confirms that you've named both to-be-connected segments properly.
- You can use the "show" view (the eye icon) to click on a segment and see what segments light up as connected. This is a nice way to check that all intended GND and VCC connections have been made, and that your specially named segments do indeed connect to their visually separate components.
Working off these tips and the two tutorials, you can see my schematic below.
EagleCad tips-- Board Layout:
- How to check the width of the "routes", aka traces, you'll be drawing: in the parameter top menu after selecting the route tool, you'll see a "width" dropdown menu where you can select the desired size of the traces. For the purposes of our class, .016 was the proper setting, though you can try thinner traces as your soldering skills and milling bits allow.
- Traces cannot be "deleted" once drawn. You have to use the separate "rip up" tool (visually right next to the Route button)
- Changing the grid size setting (under View: Grid) will allow you finer control when drawing the routes/traces. Try pressing alt when drawing traces to allow even finer control.
- Eagle organizes your board in layers. The place to toggle on and off the layers is View: Layer Settings. Important layers to work with: top (shows you traces and pads), unrouted (shows you airwire lines that you haven't routed yet), dimension 20 (the outline size of your board). You can toggle them all one or off at once, and select individual layers to show. This is particularly useful when selecting just the "top" for exporting the traces to png, and just the "Dimension" for exporting the board outline cut to png.
Working off these tips and the two tutorials, you can see my board below. I did not display the values of the resistors and capacitors, those these values can be set in the schematic and displayed here if desired.
Now for exporting...You want to export your board layer, and just the "top" layer (which can be selected in the layer view settings), as an image. You can select this menu from the file menu, set the DPI (500-600 is recommended), select monochrome (black and white), name and export. The first image below is my exported png. The second is an inverted verions (done in photoshop), to fix the logic of the colors. The Modela mill expects to cut away the black and leave the white. Had I tried to submit my first, white background png, I would have been left with empty spaces where the traces should be.
You'll also want to export the "dimension" board outline, separately from the "top" layer. I drew this dimension outline with the "wire" tool and set a thickness according to the 1/32 end mill (~.031 in the software). You can set the thickness of the wire in the bar menu once the tool is selected. I then picked only the dimension layer and repeated the export settings from above. It is important to stay consistent with the DPI exporting resolution you choose.
Now, for the first attempt at Milling. Following the same steps from week 2, I programmed the Modela to mill my "Space the Final Frontier" board. While I had checked that the trace width was appropriate, my spacing between traces under the ATTiny44 chip was insufficient. As you can see in the picture below, the mill did not cut a path separating a trace from all the pins on one side of the chip...effectively shorting all these connections. I went back to Eagle and reconfigured the trace paths under the IC to have more space between trace and the IC pads. The redesign worked.
First milling attempt:
Redesigned board traces, with extra space between the under-the-chip traces. This time, I didn't bother doing an extra photoshop to invert the image, as I discovered that the fab modules software that we use to submit jobs to the Modela could invert the PNG.
With my corrected board now properly milled, I proceeded to the soldering steps. As in week 2, it's important to wash your board gently before beginning to solder (to remove skin oils that make the solder less willing to bond to the copper pads). The milling of the board was a little rough this time (there were raggedy edges to some pads), so I made a note to add extra solder along certain roughened copper areas, where the connection might be damaged.
Below, you can see that I selected the components and laid them out on the board prior to soldering:
And finally, the completed, soldered board. Ready for programming in a subsequent week!