SmartParallel dot matrix printer server – redux

Well, it had to happen sometime. I finally killed a Raspberry Pi.

Not on purpose, of course. I’m not a psycho. (I’ve been tested.). Nope, it was just sheer impatience and stupidity. But we’ll get to that in due course. First, let’s talk about finishing a project that was already finished.

Just when you think you’re out…

Sometimes you think it’s all over and then you realise the main task is still ahead of you.

And so it was with my SmartParallel project. A couple of years back I’d kinda declared this one finished. Having made up the PCB and run a few tests it was clear the design worked, so what more was there to do?

Well, actually use it, of course.

The SmartParallel is a device with an Atmega AVR 328PB microcontroller at its heart. This receives data via a serial port and prints it on my venerable Epson MX-80 F/T III dot matrix printer. Call it nostalgia, but I just had a desire to use what is probably the oldest piece of computer tech I own – that is, the oldest piece that has been continuously in my possession. I actually bought this printer some time around 1983, if memory serves (which it usually doesn’t).

And like I said, the device actually works and I’d even written functioning code – both to go on the board’s microcontroller and code to reside on a Linux machine that would act as a printer server (a Raspberry Pi, naturally). When I got to that stage, I was excited about putting the SmartParallel to use. But, as has famously been said, ‘Life is what happens when you’re busy making other plans’.

The fates decreed all kinds of disruptions and distractions. The Epson was placed in a cupboard and the SmartParallel in a storage box.

Code listings

That, however, was before my Zolatron 64, 6502-based homebrew computer project got going again. I’m writing a lot of 6502 assembly code. And I found myself with a real hankering for code listings that I could peruse at my leisure, away from the screen.

Modern code editors don’t make it easy to print out source code. There are work-arounds. But reading listings on laser-printed A4 sheets just isn’t the same as an armful of continuous, tractor-fed listing paper. Nor do you get to experience the angry bee sound of the dot matrix head busily impacting the ribbon.

It’s time to put the SmartParallel to practical use. And that meant putting it in a box.

A game of four halves

There are four boards in the box. First, naturally, there’s the SmartPallel board. Next, there’s a dedicated Raspberry Pi – I started with a 3B+ model that was gathering dust and gave it the hostname ‘matrix’ (what else?).

Did you spot the miswiring? I didn’t…

These two devices converse via serial. But while the SmartParallel uses 5V signal levels, the Raspberry Pi is strictly 3.3V. And so the serial line goes via a very basic level shifting board I created for just this purpose. This just uses pairs of resistors to create a voltage divider, shifting the TX and RTS outputs of the SmartParallel down to 3.3V for the Pi. The Pi’s outputs are left at 3.3V because this is still high enough for the TTL logic of the SmartParallel.

Finally, I decided to use a power adapter board from DF Robot. This takes any reasonable input voltage and converts to a present output. I decided to use a 9V or 12V power brick to feed the project, and convert this down to the 5V needed by the Pi and the SmartParallel rather than using a 5V supply off the bat. Why? Because I’m not exactly sure of the power draw. There’s also a front-panel LED to feed and I was concerned that the whole load might be a bit tasking for some 5V supplies, causing them to drop below the ideal voltage. As I have it, I can tweak the output of the power adapter to ensure a good, solid 5.0-5.1V.

So I thought. This was to spell doom for one innocent Pi.

Enter the Dremel

I happened to have a suitably sized project box hanging around. This has aluminium front and back panels which I eagerly attacked with a Dremel and a drill, cutting holes for the LCD panel, the Raspberry Pi’s USB and Ethernet ports and the SmartParallel’s DB25 port.

The front panel is a bit rough because … well, Dremel incidents. I’ll probably paint it.

A few standoffs, a bit of wire and soon everything was sorted. I chose a nice chunky power switch with a suitably retro look. And for the reset button (which resets the SmartParallel, bit not the Pi) I installed one with a built-in LED, to act as a power LED for the whole thing. Then I took that out and installed another one, along with a 330Ω resistor so that the LED didn’t blow up like it did on the first one. Doh!

It looked like everything was fine, except that the Pi wasn’t booting. The intention is that it should run headless, but to troubleshoot I rigged up a monitor, keyboard and mouse. The Pi booted this time, but kept giving a ‘low voltage’ warning. Maybe the load was pulling the output voltage from the power board too much. It measured 4.9V plus change.

Now here’s what I should have done. I should have disconnected power to the Pi and the SmartParalle board, then tweaked the potentiometer on the power board to up the voltage a smidgen.

Which is what I did. Except for the disconnecting bit. I figured that, if I was careful and turned the pot ever so slowly, I could adjust the output while monitoring the voltage on my multimeter wth everything under load – thus giving me a true reading.

Oops! Turned it the wrong way. The voltage dropped to just over 3V and the Pi crashed. Turned it the other way. Man, that pot is sticky. And boom! 12V.

Nothing smoked. Nothing went bang. And the SmartParallel is fine. But that Pi is never going to boot again.

Ah well. That was the only Raspberry Pi 3B+ I had to spare. So I’ve swapped in a model 3B, which is fine. It’s a bit weak at picking up the wifi signal, so I’ve added a dongle that was also going spare.

Looks nicely retro next to the printer.

Final lesson

Getting it finally working required one last lesson. I’m powering the Pi using Dupont-style jumper leads from the power board to the GPIO header pins. And I connected them working from memory. I got the 5V pin correct, but not so much with the GND wire.

It turned out that the low voltage warning may have had something to do with me connecting the GND wire to the 3.3V header pin! Weirdly, the Pi would boot, but not well, and not always. Once I fixed that mistake, everything’s been ticketety-boo.

So, there’s a couple of things I’ll never do again. Maybe.

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.