gCoffee for Linux

[about] [current] [hardware] [download]


gCoffee was created one night when I finally started fooling around with i/o port programming in Linux. I read the Linux Coffee mini-HOWTO a while ago, but never found an actual implementation sans hand-waving, much less in a GTK app to make it look pretty. So, since I was teaching myself port programming and at the same time learning GTK, I figured what better way to learn than do both for gCoffee.

gCoffee is basically a program that will allow the user to set the data pins on a parallel port. This allows a circuit to be built to take this pin data and in turn drive a relay which can replace the switch on an ordinary coffee maker. With the click of the mouse the user can start brewing coffee. The command line version of gCoffee (with the "--no_gui" option) allows the same functionality through the command line, and therefore can be put in .crontab files for automatic brewing in the morning.

The more complex and sophisticated coffee drinkers (read "EE's) can hack together a temperature sensor or similar feedback device to then feed back through the port's STATUS pins (5 bits). In the next version of the hardware I hope to hook in a simple optical sensor to feed the coffee level information back, and display it in the form of a small vertical bar chart. That's for version 0.9 ;-)...

Basically, gCoffee is an attempt to combine two big interests of mine: caffeine and linux. And, another goal is to simply have as many things "wired" as possible in my apartment. Next comes the ability to telnet to my cappuccino machine...


The current version is 0.80. This is the initial release to the public. It sets data pins D0 through 7 to all high (+5v) when the "Start Coffee" button is pressed. It then sets the status display to the value of the status pins. When "Stop Coffee" is pressed, the data pins are all set low.

With this software comes the circuit diagrams and general hardware specs that must accompany this application. The hardware uses the /dev/lp0 port (also could use lp1), a parallel cable, a standard coffee maker, and some miscellaneous circuit hacks. The hardware is outlined in the next section.


Currently, the hardware is in development, but basically the alpha version will be simple a box with a large relay coil. There will be an input plug for a standard 110V household plug, in which will be plugged the coffee maker. There will be an output of a cord with a 110V plug, which will go into a wall socket. There will then finally be a small wire going into the box from the parallel cord to draw the data value (+5v) from the data pin to drive the relay switch. The coffee maker's actual switch will then have to be left in the on position, with power controlled from the power cord itself.

The beta version will involve hacking (literally) into the coffee maker to put a parallel port right on the actual appliance, with all circuitry inside of the machine. That will allow a clean parallel cable from the computer to the coffee machine for a more presentable appearance.


The current version is downloadable in gzipped tar format. Please grab the newest version from this link:

  • gcoffee-0.80.tar.gz

    After downloading the tarball, gunzip and untar the file which will create a directory "gcoffee". cd to that dir, and do the standard "make; make install" (you will have to be root to install it). If you wish to let any user run the program, instead do "make; make install_with_setuid".

    After the software is installed, you will need to construct the appropriate circuitry to control your coffee maker from the parallel port.

    (more info coming soon.)

    © 1999 Michael Sherman <m.sherman@erols.com>