Zeta: it lives!

zeta_firstboot-20150725wYou have no idea how good it was to see that message come through over the serial link. The Zeta worked first time!

Here’s the board, fully populated:

zeta-complete-20150725I still have to put it in a proper case. A visit to Above All Electronics did result in getting a floppy drive (and most importantly, 3½” 1.44 MB floppies …) and all the cables, so I’ll add that later. But for now, I’ll try to remember how CP/M works …

 

Zeta: all soldering done!

Please excuse horrible blurry photo, but I think all the soldering is done —

zeta-20150724This adds the crystal sockets, the 32.768 kHz RTC crystal, the status LED(s) and the reset button.

A whole new board I soldered up is the Mini-PPISD. It adds (slow) SD card storage to an SBC board:

ppisd-20150724Man, but those surface mount SD card pads are a pain. I had to get flux on the PCB pad and the bottom of the SD connector, load a little blob of solder on the iron, then warm up the pad and roll the solder into place. It made a satisfying little Zsht! noise as the flux burnt off, and the molten solder got drawn under the pad by capillary action.

Next up is checking the power and ground continuity, adding the chips, building a null modem (grr; I hate RS232, really) and finding a case. I may already have one, but I may forage at Above All to get a 3½” floppy drive and enclosure. I definitely have an old Turbo/reset button from an XT that would make a great reset breakout.

Zeta: looks more finished than it really is

zeta-20150712Just waiting for the full-can oscillator sockets (and most of the chips) to arrive from Mouser. I could have used 14-pin DIP machine pin sockets, as Sergey was thoughtful and had all of the holes drilled.

Most of the big sockets need to be fully soldered, as at the moment they’re just tack-soldered at the corners. Maybe I’ll put on some dronecore and have a meditative time with the Sn-Ag tonight. I’ll be glad to get the flux off the board, though: it’s not my usual stuff (which is Kester #951; no clean ftw), and what I’m using is smoky and a bit gummy. It does make nice bright joints, though, which is never 951’s strong point.

Thermal Printer driver for CUPS, Linux, and Raspberry Pi: zj-58

This might be my last post on mini-printers, as I’ve found a driver that just works with CUPS on Raspberry Pi. It also works on Ubuntu on my laptop, and should work (though untried) on Mac OS. You’ll have to build it from source, but it’s not too hard.

The hard part is working out if your thermal printer will work or not. There are many out there, and they’re all slightly different. If they support the ESC/POS bitmap command GS v 0 on 58 mm wide paper, they should work. The ones I’ve tested are:

  1. Catex POS5890U — USB, cheap, fast.
  2. “701” control board panel printer — fairly generic, decent quality printer with serial input. A bit slow for daily use at 9600 baud.
  3. Xiamen Embedded Printer DP-EH600 — as above.

The following should also work, but haven’t been tried:

  • Adafruit Mini Thermal Receipt Printer — again, serial, so not super fast.
  • Sparkfun thermal printer — which now appears to be identical to the Adafruit unit, and is referred to as the “A1 (or A2) micro panel printer” in the documentation.

Known not to work:

  • BTHT-V6 printer — which uses a completely different command set.

If you have a manual for your printer, check it to see if it prints bitmaps by sending a three byte header of 29 118 48 (or 1D 76 30 in hexadecimal). If you’re not sure, try it with a small test image, and be ready by the power switch …

Getting and building the driver

The driver is meant for a ZiJiang ZJ-58 printer, and lives here on Github: klirichek/zj-58.

Building it is fairly easy, though it has some package requirements you’ll need to meet. On Raspbian, do something like:

sudo apt-get install libcups2-dev libcupsimage2-dev git build-essential

Then you can download the code:

git clone https://github.com/klirichek/zj-58.git

Building it is straightforward:

cd zj-58/
make

and installing takes all of:

sudo ./install

You’ll still have to set up the printer to accept jobs, but now you have the driver installed.

Setting up the printer

This bit is much more graphical. Open up the printer settings window:

2015-07-11-220946_452x281_scrotSelect the Add icon, and the New Printer window opens:

2015-07-11-221141_602x592_scrotThe POS5890U shows up as “Unknown” on my USB port, as Linux doesn’t know the name of this device from its USB ID. Your printer might have an known ID, or show up as a serial port. Select the right one, and click Forward:

2015-07-11-221221_602x592_scrotHere, I’m really pleased that the driver is for a Zijiang unit, as it’s conveniently at the end of the list. Click Forward

2015-07-11-221240_602x592_scrotNo options here, so again, Forward

2015-07-11-221311_602x592_scrotI changed the name from the default ZJ-58 to the more unixly zj58. You don’t have to, but either way, Apply the changes.

2015-07-11-222030_452x281_scrotAnd there it is, registered as a printer!

Printer Options

Most printers expect paper wider than 58 mm, but mini-printers can’t do that. To tell the system about paper sizes, right click on the printer’s icon, and change the printer settings:

2015-07-11-222225_570x560_scrotA test page might print properly now, but you should probably go into Printer Options first:

2015-07-11-222239_570x560_scrotYou do want to set the media size to at least 58 × 210 mm. This is just the longest strip it will print in one ‘page’; if your print is shorter, it won’t waste extra paper. You can choose longer prints, but not wider. The default assume your local standard paper size which —be it A4, Letter, or whatever — will not be what you want here. Hit OK.

Printing something

You could print the self test page, but it’s long and boring. If you’re fairly sure your printer will be supported, try this scaled PDF version of the Raspberry Pi Logo: raspberry-pi-logo.  Printed and scanned, it came out like this:

raspberry-pi-logo-miniprinterNot the best rendition, but not bad for a $30 receipt printer. My test image came out like this (iffy scan, sorry):

zj58-driver-testI haven’t covered the intricacies of setting up serial port connections here; maybe another time. Also, there’s a short delay (maybe 10–20 s) between selecting Print and the printer coming to life. CUPS is pretty complex, and is doing things in the background while you wait.

(Seeing as I use their logo prominently up there, I should totes acknowledge that “Raspberry Pi is a trademark of the Raspberry Pi Foundation”. Also, I couldn’t have done all this without the support of Reed Zhao. Though Reed has moved on to bigger things and doesn’t sell printers any more, his help — not to mention the generous loan of a couple of printers — was very welcome.)

Zeta: A small matter of soldering …

zeta-20150710That’s all but one of the capacitors in. The big chip sockets are soothing to solder.

Apart from the bits I got in a frantic dash between Supremetronics and Creatron on College, the rest is coming from Mouser. Taking the advice of someone who should know better, I’ve ordered a made-in-DDR UA857D MME chip, since Z80 CTCs are back ordered. Sometimes, it’s good to have chips older than your colleagues …

Oh no, he’s messing about with thermal printers again …

Instagram filter used: Lo-fi

View in Instagram ⇒

Scored this cheapo USB printer on eBay: “High-speed 58mm POS Dot Receipt Paper Thermal Printer USB”. It identifies itself as a CATEX Technolog [sic] POS5890U, with a USB vendor:product ID of b000:0410. After a bit of random fiddling, it shows up as /dev/usb/lp0 on a Raspberry Pi. After turning off CUPS (as it nabs the device, not even letting root near it), you can print images up to 384 dots (48 mm at 8 dots/mm) wide using the ESC-POS GS v 0 command. You can use my esc-pos-image.py script if you wish, and if you need a test image

(The photo is of Marie Doro; proto-goth 1902 style.)

Minimalist Computer Build: Zeta SBC

zeta sbc v2 boardI’m building a Zeta SBC V2, a basic Z80 computer in the spirit of the N8VEM. I’m trying to kit it out mostly locally, which means extensive trips to Creatron, Supremetronics/Honson Computer (aka the basement of College Home Hardware), Above All Electronic Surplus, and Active Surplus.

Fun discovery #1: not all CR-2032 battery holders are the same size. This board call for the one just a tiny bit larger than the coin cell itself. Most of the ones with the retainer clip that goes over the battery are too big, and will prevent other components being installed.