Cheap PCB story
github.com
github.com
There are a whole bunch of improvements I'd suggest with this particular design and article though: (also, doing six respins for a board this simple is a bit painful, and I'd encourage people to submit their layout to someone for a design review before going through this many iterations - I've reviewed things for friends in exchange for a pint of beer!)
- this board has no ground plane, and no return paths near the data traces - this will be an absolute EMI nightmare and also signal integrity will suffer. At very least, dedicate the bottom layer to ground (and flood-fill it) - the return path for digital signals (and anything above a few KHz) is directly below the signal path - see https://incompliancemag.com/wp-content/uploads/2017/04/1705_....
- (the clock design, in particular, is completely against ST's recommendations - there's no ground plane and traces running directly underneath!)
- panelisation: as others have mentioned, even for large-scale production runs, the PCB manufacturers will do a better job of panellising themselves, and can stack your boards in amongst other boards on the same panel if you're not taking up a whole panel.
- unless you've got a good reason to do it, having a serial programming interface with a serial/USB chip isn't the easiest way of doing it - exposing SWDIO/SWDCK/SWO to a suitable connector and using an ST-Link in-circuit programmer is generally an easier and more space-efficient way! They seem to have gone that way in the last couple of revisions.
There are a bunch of other things I'd probably do differently, but this is all to say - if you do decide to take up this hobby, please do get your designs looked at by someone knowledgeable, you'll learn a lot that way!
1. Microcontroller selection. This can be a daunting task. Best to just pick one with good dev kits and community support. You can tailor the part number if you need more IO for a specific project. The only real choice to make is if you want/need to work in the low-power embedded realm (eg Arduino or STM32), or in higher-power/userspace realm (eg raspberry Pi or Beaglebone/Linux).
2. Rules of thumb for the design. You mentioned some great ones. I would add - use 4 layers unless you need more (and you will know if you do) - Put signals on the outer layers so you can access them for troubleshooting, unless you have a reason to have ground planes on the outer layers (you'll know if you do) - Use the internal 2 layers for ground and power. The keyword "polyfill" will let you know how to do this. - Don't try and make PCBs at home. It's so fast and cheap to order them. And a home-made one, even if you make it with a router instead of the printer/acid method, will not have a solder mask. You can easily spend 3 days troubleshooting. Watch movies for 3 days while you wait for your delivery, instead. - If you have any doubts, use a breadboard for prototyping. If you have confidence on your 3rd board design, skip the breadboard. - Put a hole in each corner, with a healthy clearance from any circuit to a fastener. At some point you will want to mount the PCB somewhere. - Put some spare IO on a connector if you have space - Use a barrel connector or USB for input power if you can. If you need more than 5V, USB-C at another voltage is trivial to add these days (as this page shows). It's a matter of when, not if, you mess up your settings on your bench power supply. - Use 2.54mm pin headers where you can instead of weird connectors - Ask yourself: Can I buy something that will work instead? - Invest in 3 kits: surface mount resistors, surface mount capacitors, through-hole resistors. eg: https://www.sparkfun.com/products/10969 - Spend at least $100 on a soldering iron with temperature control
First batch was bare PCB from jlcpcb.com and components from digikey. Handsoldered it. And it worked!! OMG, the JOY!! I highly recommend to do some simple own pcb design.
Then I did v2: STM32, ws2812b, tiny smt components. I used jlcpcb assembly service, complemented with some components they didn't have in their (limited!) smt library. Bringup of the first stm32 was a bit of a nightmare. I had missed pulling a boot0-pin low (~2 days wasted). A co-worker is madly in love with rust and made me write the whole code in Rust (2 weeks maybe, not "wasted" per se - but oh man can embedded rust be... a lot of fun... sometimes). Missed pullups on i2c lines. So much learning on version two.
Version three I tried to keep is simple. But also smaller. I had an idea to use 3.5mm audio cables for power and data. I thought SMD audio cable contacts would be rugged. I was wrong - they came off. I had bought a syringe with solder paste and one with flux. Totally recommend getting a flux syringe! So good! But that solder paste... I maybe didn't grok how to use it, but it did not reflow well enough to make the audio cable contacts stay put when used.
Got version four a couple of weeks ago. Doing pcbway.com with them doing the full smt and through hole soldering. This is how to do it! I do not at all understand why all are raving about jlcpcb.com - they have such a limited library. Why not make a proper pcb shop solder it all? It doesn't cost that much more. If time is a factor it is a lot cheaper. V4 feels like a winner - shipping them out to customers now.
I've also done some other boards during the lock down, such as control boards for RC cars in three versions, and three versions of an Ethernet connected microphone. I'm still on EasyEDA, but as mentioned I now let pcbway do soldering of everything.
Power over audio cable felt iffy too - feels like it will short on insertion? Maybe it needs some thermal fuse in line with it or something.
I've seen at least one PCB shop that asks customers not to panelize for small lots, so they can mix layouts from several customers and get better packing efficiency.
I much prefer soldering 0402 and 0201 components than larger SMD parts, including 0603. What's needed is soldering paste, liquid flux and heatgun and macro lens attached to a phone for inspection.
What's nice with hot air soldering tiny SMD components is that you don't need a lot of heat when soldering, desoldering and get zero tombstoning.
ios: Settings > Control Center > Customize Controls > Magnifier
I have confirmed this by ordering a custom pcb with weird specs (color, thickness, etc.) and they were all going thru the same manufacturing steps at the same time, down to the second.