Update: Thanks to Neil for correcting some of my (bad) assumptions about parts.
Update 2: It turns out that KiCad doesn't merge plated-through and non-plated-through hole drill files by default. I had to email the NPTH drill file to them separately. Next time, we will merge our drill files with KiCad or gerbmerge before sending.
Officially, our 'first spin' is underway!
Last night I managed to send off our prototype boards to Macrofab. Our estimated delivery date is January 17th.
I was torn between Macrofab and Tempo Automation, but ended up using Macrofab for the prototype because their bill-of-materials editor was far better. Macrofab's process walks you through the bill-of-materials. Tempo basically says "No, really, upload a CSV and we'll send you a quote."
Tempo was very, very nice to me on the phone, and I really want to support them because they're in SF, but I don't think their site is very easy to work with. The BOM search tool needs a lot of work. When they cannot locate a part in your uploaded BOM, they send you to a search page on on mouser or digikey, and after you find your part, you have to copy and paste that on Tempo's site.
Macrofab searches for you, in the same window, and allows you to easily click and select the part. This is a huge win.
What did we learn in this process?
- House parts are always cheaper. Base your design on what is available at the fab-house. You will save money on placement fees and parts.
- It seems that 0805, SOT-23 (transistors and otherwise), and SSOP are currently the best parts to use in SMD. There's a good balance there of hand-solderable/fixable and cost. It also seems like the 0603 LEDs were cheaper, but only available in Red and Green. Hey, Macrofab, what gives? No Blue LEDs?
- Avoid BGAs! BGAs require high-end tools to reball, repair, and fix. You probably don't have a $3000 oven or hot air tool.
- Don't use 1206. When I tried to use 1206, my prices went way, way up and parts were not available. The industry seems to be using 0603 mostly, but 0805 seemed to be a good balance for hand-soldering and repairability. Your iPhone probably has microscopic 0201 parts in it but there is no way I could ever work with those without a microscope and the steady hands of a surgeon (or robot.)
- RoHs is a great standard for (somewhat) environmentally friendly electronics work -- All electronics work is environmentally hostile, Don't act like it isn't! However: RoHS parts cost more. Fact: All but one of our parts (the JST battery jack) is RoHS compliant.
- Consignment saves money. if you have the time-to-market and can ship parts, it will greatly reduce costs. Example: 12 WS2812 Leds are around $11 on Macrofab's site, or a Tape Reel of 1000 are $60 from China.
- We will probably consign batteries, touch screens, and LEDs from China to make this project go.
Ideally, work your project in the following order:
- Schematic and Component selection first, based on...
- Match components to the BOM of the fab house. Use the Macrofab KiCad libraries so you don't have to guess or look up parts. Download them at https://github.com/MacroFab/EDALibraries/tree/master
- Use that to dictate foot prints for the PCB. Place footprints before you try to route at all!
- Move all of the decoupling caps in place on your board next. Also make sure things are together (i.e. pullups near pins, resistors near their companion LEDs, etc.)
- Why? Because placing footprints after things are routed is very hard!
- Place mounting holes BEFORE any routing takes place. Note that if you import the net list again in KiCad, it will remove all of the mounting holes. Write that shit down in your notebook once you figure out where the holes go, or back up the kicad_pcb file so you have a copy of the mounting locations.
- If you add mounting holes as components to the KiCad schematic, KiCad will not destroy your mounting holes every time you reload the net list.
- Also, don't be stupid. A 3mm mounting screw goes into a 3.2mm hole, not a 3mm hole. You must allow some clearance for the bolt.
- Set Design rules, based on the rules of the fab BEFORE you route.
- Then: Position the components, by hand, matching the fab's design rules.
- Install freerouter. It is an abomination written in Java. Deal with it, it works and works well.
- Run Freerouter. Do not be afraid to stop it if it gets stuck and manually route.
- Repair the autorouter's mistakes / make things sensible.
- Don't add ground layers to the board until everything is 100%. It's too confusing otherwise. If you are using a round / robo-bender / artwork / strange board shape, don't panic, just draw the ground polygon around the entire board and let KiCad sort it out. Tie that net to ground. Duplicate the ground shape and flip it (if necessary) for the other side of the board.
- I'm told that the practice of via-pinning or via-caging (putting vias all around the edges of the board to create a mini faraday cage for internal layers) isn't really used these days. I saw it on the Ninja Networks badge in 2010, but I don't think we're doing it unless we have clock noise or issues with the radio.
- Last, confirm that none of your traces are near the edges of the board's edge cuts.
General build notes / mistakes
- KiCad UI - I dealt with days and days of UI pain, so much so it made me feel nauseous as the screen would zoom in and out randomly. It turns out that the Mighty mouse on my Mac Pro didn't get along well with Kicad. To fix, do the following: Enable Trackpad Panning in Preferences. Then, go into the hotkeys editor and map Zoom in, Zoom out, and Zoom to region to "1", "2", and "3". Your left hand goes on 1,2,3, your right hand on the mouse. Modify this if you're a southpaw, but you'll love it after ten minutes of use. Trust me. Also Command-0 is your friend to reset the screen to something sensible.
- Four layer = more expensive than two layer. strive for two layer when possible (not so easy to avoid 4-layer on VLGA chips, like our KW01) We see a near 1.6-2x cost increase when going to 4 layer. As much as it is going to suck, I am going to attempt to make the production run 2-layer.
- Custom silkscreen colors = don't do it in short runs. There is a minimum board limit with very strange boundary conditions at Macrofab. I think given our board size it was 109 boards before we could take advantage of the custom color cost
- USB Ports: There are an incredible number of different USB ports out there. Make sure you buy the right one and your footprint matches, or just give up and use Macrofab's USB_MICRO_RIGHT and call it a day.
- Clearance: I am currently in a panic over the hole/drill clearance on some of my parts as well as the silkscreens. Advanced Circuits offers a free DFM check tool that unfortunately takes about 12-24 hours to mail you back, but it is very good in finding mistakes. "Potential Showstoppers" found here might haunt you later. I have some vias to move, sadly.
- Test pins: For the love of his noodlyness: rename the damn test pins on your board. I forgot to do this and now I am going to pay for it. We will fix this. "W1" means nothing when testing. "SPI1_MISO" means something.
I used KiCad. KiCad is buggy as hell, but I got through.
The library management is garbage and failed constantly. I had to resort to hand-editing files to get things done, especially when we would do a major change (like a component footprint) and then have to update the board.
Additionally, I had to get a same-day patch to stop the design-rules-check from crashing. Without the kicad nightly builds I wouldn't hve been able to build.
After all that, you'll get something like this:
if you want more information about Macrofab and KiCad, there's a nice video about some of this from the And!XOR guys here: