SmartParallel: refreshing the design

The SmartParallel, aka DottyMatrix, project has been languishing for a while now, but it’s time to get it restarted.

SmartParallel is a serial-to-parallel interface that I embarked on because I wanted to be able to use my decades-old Epson MX-80 F/T III dot matrix printer with a number of platforms that don’t have parallel interfaces, such as the Raspberry Pi. It’s ‘smart’ in that the serial-to-parallel conversion is handled by a microcontroller – an Atmel ATMEGA328P in this case. This provides the opportunity to do stuff with the data before sending it on for printing.

(By the way, I’m reverting to the name SmartParallel in preference to DottyMatrix because the latter is a tad silly and I think this device might have more applications than just driving the dot matrix printer.)

The project hasn’t been getting the love it deserves for a couple of reasons. First, the printer blew up. I fixed that eventually, but in the meantime had to resort to emulating a printer with another microcontroller which just got very complex. Second, once the printer was working again I decided I wanted to use it with my BBC Master.

However, looking at my list of projects, I realised how few were completed. That won’t do…

Back to KiCad

The first thing I needed to do was have a look at the schematic I’d drawn up with KiCad. This was created using KiCad 4 and I’ve since updated to KiCad 5, but haven’t really used the software.

The project loaded fine and the schematic opened. But I quickly discovered that my installation of KiCad 5.0.0 was exceptionally crash-y. I could barely keep it running for five minutes. I hoped that this was just an example of the ‘never use version 1 of anything’ rule (and yes, the first instance of a major upgrade – ie, x.0.0 – counts as ‘version 1’).

So it proved. An update to 5.1.2 fixed the problems and, so far, KiCad has been rock steady.

Having been away from KiCad for a fair while, it’s hard to be specific about improvements. The user interface is still idiosyncratic (to put it politely), annoying and clunky, but I guess the designers have to prioritise consistency and muscle memory over bringing the UX into the 21st Century.

The updated schematic. Click on the image for a larger version. Comments welcomed.

The big change, of course, is library management. I’m relieved to say KiCad had no trouble finding my custom libraries (both for schematic symbols and footprints) and using libraries is much more intuitive and considerably faster.

Rethinking the design

Whenever you come back to a partly completed project, your first reaction is often, ‘what was I thinking?’.

I had several moments like that. For instance, I had a double-pole, single-throw switch for my reset switch. Why would it need to be double pole?

I found that I’d connected VCC to the AREF pin on the microcontroller. Supplying this pin with a reference voltage is necessary only if you’re using analogue pins, which I’m not. So I’m leaving this pin disconnected. Similarly, although I am still connecting VCC to the AVCC pin, it’s not now getting its own bypass capacitor (yup, I had two bypass caps, the result of designing on the fly).

On the original design, I had a row of eight LEDS, each with its own power-limiting resistor, showing the status of the data lines. These are pure blinkenlights. Then I got to thinking of all the fun I’d have placing 16 tiny SMD components, and then fixing them when they tombstone.

So my first step was to replace the individual resistors with a single resistor network. And then I changed the eight LEDs to a single eight-segment bar LED.

Fun with footprints

This project had never previously got past the schematic stage, plus some matching up of schematic symbols and PCB footprints.

To finish that task of assigning footprints I need to create my own footprint for the 8-segment bar LED. Because its pins use a standard 0.1in (2.54mm) pitch, and I had a set of callipers handy to measure the casing size, that was the work of a few minutes,

I did encounter one weird error while working on the board layout. There’s an option to ‘Update PCB from schematic’. I’d made a simple change on the schematic (changing the order in which the data LEDs are connected). This went fine when I clicked the update button, but I got an error about something I hadn’t touched. I didn’t record the exact wording, but it was something along the lines of:

…pad not found in footprint ‘Housing_SOIC:SOIC-20W_7.5×12.8mm_Pitch1.27mm’

This confused me mightily until I twigged that the problem wasn’t with the footprint file. This footprint is a standard one from KiCad’s default libraries. However, the schematic symbol that I’d associated with the footprint was of my own creation. The error message made a reference to ‘pin ~’. And the tilde symbol is what KiCad defaults to as the pin number if you don’t assign one.

My symbol for a 74HC541 tri-state buffer. Note that the bottom-right pin (/OE2) has no pin number, so KiCad has assigned a tilde. Changing this to 19 fixed the problem. Click on the image for a larger version.

When I opened up the part in the Symbol Editor, I indeed found that the /OE2 pin did not have a number. It should have been 19. I made the change and the problem went away. But it’s worth noting that this error can occur even if you assign a number, but this number does not match any in the footprint you use. If, for example, I’d decided to be non-conformist and had numbered this pin ’21’ or ‘K’, then the error would still have occurred because the footprint has no matching pin 21 or K.

Getting smaller

I set up an initial board size much larger than the one I expect to have at the end. I find it helps to have a perimeter to work within. I expect the whole thing to shrink over time.

I also add copper fills – VCC on the top layer and GND on the bottom – right from the start. This eliminates a large number of the rat’s nest lines and makes things easier to see and understand. I just get into the habit of hitting ‘B’ after moving any component.

The surface-mount version of the ATMEGA328PB I’m using results in a dead space in the centre, underneath the chip, with no copper fill. So I added an additional fill in there, but linked to the GND net, with four vias providing a connection between this and the bottom layer ground plane using ‘via stitching’. The two ground pins of the microcontroller are then easily connected. I may also eliminate the solder mask over this area. The bare copper would then provide some heat sinking for the chip.

I’m not sure if this is a good idea – let me know if you think it isn’t.

The PCB layout hasn’t progressed far. While this might be a simple board for seasoned practitioners, it’s the most complex one I’ve ever attempted.

This is how far I’ve got with the PCB layout.

So, lots of work to do yet. And I’ll probably replicate this design on a breadboard before committing to ordering up PCBs. The fun’s still only starting.

[UPDATE] I’m sharing the KiCad files on GitHub. Be aware, though, that I use a number of symbols, and a couple of footprints that I created myself. These are kept in global libraries, not project libraries. (Don’t get me started on that debate.) So I’m not sure how that works for people downloading these files. Once I’m happy the board is complete and working, I’ll probably create a project library. But, for now, use at your own risk!

The repo is here: https://github.com/mspeculatrix/SmartParallel

5 thoughts on “SmartParallel: refreshing the design

    1. Machina Post author

      I will – still battling with the PCB layout, but it’s coming along.

      Reply
  1. Lenore Underwood

    Are you Linux only or do you do Windows too? I finally threw up my hands in disgust at the interface of Eagle 7 some years ago. I went looking for a better pcb software tool and found Diptrace. It has a free version that your board could fit in. A much better interface too.

    Maybe before you get to deep into Kicad take a look at it. 🙂 If you want to stay with Kicad, here’s website that has a lot of footprints free to use http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm

    Reply
    1. Machina Post author

      Thanks for the info. I’ll have a look at Diptrace, although I have already invested some effort into KiCad – creating symbols and footprints. I mainly use Mac. My recently built Windows PC is principally for games & flight simulation. I do have a Win10 VM on my iMac which I use for Atmel Studio, so that’s a possibility…

      Reply

Leave a Reply to Lenore Underwood Cancel 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.