RetroPrinting
I'm working on a suite of tools for outputting onto common point-of-sale (POS) receipt printers. Why? Well, there are a few interesting art projects to be done... but mainly because it seems a rather funny thing to do! So I hopped onto ebay and purchased an Epson TM-300PD printer (there are still lots listed). I got mine for about US$35. Here is a log of my efforts...
Parallel Printing 2002.11.30
At first I tried using the standard java.awt.print package and Windows' generic printer driver, but it didn't work. Specifically, for some reason it wouldn't print the last line of text correctly, in fact it would print the last line of the last print job before printing the current job - very strange. That, and the annoyance of setting the margins to 0 each time, led me to ditch that and directly dump ASCII to LPT1. That worked fine, and it is what I'm currently using. Note that :
  • It doesn't print until it receives an end-of-line (\n).
  • It automatically wraps to the next line after 40 characters.
Check out Tomi Engdahl's Powering devices from PC Parallel Port webpage for good technical parallel port information (especially the pinout at the bottom of the page).
Generating ASCII-art 2002.12.13
Obviously, just printing regular text isn't enough - I needed to be able to convert various things to ASCII-art. So I scoured the web and found a quick and dirty converter from an Image to ASCII in Java. So I can insert images as ASCII-art, although some of them don't work too well.

But more importantly, I wrote a Font viewing utilty to output big characters of any font on your computer to ASCII - called the ASCII Font Inspector. To the right you can see an example of how it works with the receipt printer. That is a receipt I printed with the word "hi" in some font on a Windows machine. It worked nicely, although as you can see the scanner didn't do too well (and I need a new ink cartridge).
hi
the iPrinter! 2003.01.21

Of course, I want to put my humble little receipt printer on the internet! I don't want to wire it through a computer though, so it seems like a good opportunity to learn about embedded tools with networking. The TINI and the Rabbit look like good potential platforms...

I heard bad things about the TINI, so I bought a RCM2200 dev kit and it is working out great. I did some ugly wiring and it works now. By "it works", I mean to say that I can telnet to the rabbit, and any line I types gets echoed to the printer. Neat-o. Here's the base code.

Now I need to get Dynamic C working in VirtualPC, because I can't carry around Mac and PC laptops! But unfortunately it isn't working with the regular Keyspan USB PDA adaptor... apparently it works with the Keyspan USB high speed serial adaptor.

ASCII photos 2003.02.04

So I thought I had a brilliant idea of integrating this with a USB camera to make an ASCII photo booth. Of course, then I found out that somebody already did it.

damn.
I hate it when people steal my ideas before I even have them.

Guestbook 2003.02.10

Allright, so I got the physical guestbook working. My friends Michael and Tim made this great messaging display called MichaelMessage. Basically you could hit a webpage and type in a message, and it would run across a little LED display on Michael's desk. So I took the idea and changed it to work with my receipt printer.

So you hit a simple webpage and can type in a short message to me, like a regular web-based guestbook. However, your message gets printed out on my receipt printer. So soon enough, I'll have a great scroll of message from random people!

Of course, the problem is that I don't have a public server set up to run it. This is, of course, because my rabbit is plugged in at home, where it sits behind a dynamically assigned cable modem IP, and a Linksys router. So you can't use it yet, but soon I'll get it out there... well, here's the first version of the code.

iPrinting for Real! 2003.02.24

I made a PCB (using Osmond PCB) and it worked the first time! It's quite simple really, just the Rabbit and a parallel port. No more mess of wires, just a little board behind the printer. Soon this thing will go live! Here is the latest code - I added the ability to automatically set the time on powerup from a NIST server (mainly because I forgot to wire the board with a battery backup for the real-time clock).


:: go back to Rahul's tech notes ::