We’ve been here before, but now it feels like we’re finally getting somewhere.
The long-running saga that is my SmartParallel serial-to-parallel dot matrix printer interface is nearing completion. Well, maybe.
Having solved (I think) the back-powering problem, and with a prototype that I believe actually works, I’ve decided to call Rev 2.0 of the design schematic the final version. All that remained was to lay out the PCB in KiCad and get it fabbed. And the components soldered. And the design debugged (we’ll come back to that).
As far as laying out the PCB was concerned, I’d done this once already. It was a nightmare, with a number of what can only be described as kludges – such as areas of the power and ground planes that became isolated and had to be stitched together with tracks and vias. Ugh! Plus, a couple of the signal lines snaked around in very convoluted paths. It was ugly.
Since then, the board design changed quite a bit. Gone was the 8-segment bar LED to act as blinkenlights for the data lines (they didn’t blink that much anyway). Gone also was the LED for the /STROBE line (it never lit up). And I also added a few things – a couple of diodes, one or two more pullup resistors, stuff like that.
Laying out the board in KiCad was still something of a nightmare. Running all those traces while not breaking up the VCC and GND planes into fragmented islands was tough. I can see why people resort to four-layer boards, although that wasn’t an option here. At JLCPCB, the cost of five two-layer boards is $2. The cost for five four-layer boards this big is $28.
It took several hours to lay out the board, and only time will tell if I made correct decisions. I used a lot of vias – I have no idea if that’s a bad thing per se, but it felt a little kludgy. There may be a Rev 2.1 down the road.
To ease problems with routing, I changed which pins were used on the ATMEGA328PB microcontroller for a couple of the signals. I like how easy it is now, with KiCad 5, to alter the schematic and have the changes reflected in Pcbnew, the PCB layout editor. It’s just a single click of a button – none of that constant re-exporting of netlists that was so tedious.
Finally, I ended up with this.
One thing I learned during this process was to not be too ambitious about saving space. I was trying to cram everything into as small a space as possible. But then I realised that was pointless. The cost of the PCBs is fixed for any size up to 100 x 100mm. I wouldn’t save money by making the board smaller. And it’s not like I was going to use panellisation to get more boards – I only need one, plus a couple of backups for soldering disasters. And the minimum order is five anyway.
It’s not a board that needs to be small. It ended up at 100 x 80mm, which is fine.
Normally, I lay out a board in as compact a space as I can, then draw the edge cuts lines around it. This time, I worked the other way around, drawing a 100 x 80mm outline as my maximum size and then being a little more relaxed about where things went. Yes, there’s unused board space – I’m cool with that.
The boards have been ordered from JLCPCB. I went with the standard green solder mask this time. The firm offers other colours at the same price, but with a two-day delay. And I do like the colours. But I’ve decided to adopt a protocol of using boring old green for the first (ie, non-working) version of any PCB.
See how confident I am?
I’m also fairly intimidated at the thought of soldering this board. There are 40-odd SMD components, including the microcontroller which is in the TQFP-32 format, its legs having a minuscule pitch. I just know that, even with my reflow setup, I’m going to get solder bridges.
Ah well, that’s a problem for another day – some time around two weeks from now…