SmartParallel: laying out the PCB

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…

4 thoughts on “SmartParallel: laying out the PCB

  1. Lenore Underwood

    Hi,
    I’m curious why if you have plenty of board space to work with and are somewhat daunted by surface mounted fine pitch chips that you don’t use a Arduino Nano v3.0 module like this:
    https://www.ebay.com/itm/Arduino-Nano-V3-0-Compatible-board-ATmega328-5V-With-CH340E-By-CNEWTEC/123784721026?hash=item1cd224f282:g:wdgAAOSwxYRc7bCP
    It doesn’t have to be this module or supplier, but it would save you some smd soldering. Or go ahead and use the dip version of the Atmega 328PB. 🙂 Might look a little weird if the other parts are surface mounted, but hey in a case, no one cares what it looks like if it works. 🙂

    Of course I ask, after you’ve sent the pcb for manufacturing. 🙂 But maybe if you need to redo the board……

    Reply
    1. Machina Post author

      I considered reverting to the DIP version of the chip. But there’s no challenge to that. 😉 With these projects, learning and challenging myself is more important than the final ‘product’. I’m daunted by the prospect of soldering that part, but if I overcome that, and maybe work out a technique for it, then that opens up new possibilities, such as more tightly populated boards.

      Reply
    1. Machina Post author

      The status is that the PCBs have arrived but I’ve been too busy to do anything with them! I’ve revamped the prototype somewhat using my parallel breakout board (which has the shift register on board) and my new ATMEGA328PB prototyping board. And I wrote a program in Go that runs on a Raspberry Pi and will send a designated text file to the printer. But this isn’t fully working and I simply haven’t had time to debug the software – or make up any of the SmartParallel PCBs. I want to get the software debugged before testing the PCB, otherwise there are too many variables to grapple with. But work and life are getting in the way at the moment…

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.