The Leto Coffeemachine FAQ


The current status of Leto's coffeemachine is:

0 0 means "off", 0 -1 means "making coffee", 0 -2 means "dunno"

See also the historical data


Where is this coffeemachine located?

On the fourth floor of Ricardishof in Delft, the Netherlands. This floor is called the Penthouse, because it's the top floor.

Do you have a webcam pointed to it?

No, but I have a archived pic of it, you can see the reading module and some coax behind the machine. Here is a link to the Braun product page.

Why the heck did you do this

In my third year of my study Electrical Engineering, we have to come up with a project that you need to do. Mostly, this project is about planning, costs, gannt-charts, reports en everything else about projectmanagement, but in the end every EE student usualy comes up with some kind of hobby project. In my case, coffee. I'm a caffiene-addict.

So how does it work

It measures current drawn from the AC line by the machine.
A coffeemachine typically draws ~5Amps (@220V) from the net if it's "on". I placed a 1 Ohm (@25W) resistor in series with the AC line. If the machine is "on" (that means, the heatingdevice is working), there is a 5Amps*1Ohm=5V AC sine over that resistor. I put a rectifier circuit consisting of a simple RC circuit parallel on that 1Ohm resistor. That gives me an output of about 7V DC voltage, which I feed to a transistor, which acts as a pulldown transistor. That signal goes to the parallel port of a hostcomputer running any kind of Unix (as long as it has a parallel port). Lately I ported the daemons to Netware, too.

The software takes care of the rest of the calculations

What heuristics do you use

The software takes care of all the calculations and heuristics. These are the following:

on longer than MAXONTIME (default MAXONTIME 15 seconds) making coffee
off longer than OFFTIME (default OFFTIME 400 seconds) machine is off
machine goes on for at most MAXONTIME seconds every FULLTIME (default FULLTIME 180 seconds) pot is 100% full
machine goes on for at most MAXONTIME seconds every FULLTIME*(100+PERC) (default PERC 25 percent)pot is 0% full
machine goes on between those two extremes there's a linear regression between ontimes and percentages

How does your software framework fit together?

First, there's a deamon named "readpar" that reads the parallelport. This is the only setuid program on the system. It just outputs a file with only 1 byte, an ASCII "0" or "1", depending if the parallel port gets 5V or not. I use the 5 statusbits of the parallel port, the ones named !ACK, BUSY, PAPEREND, SELECTIN and !ERROR. See the parallel port FAQ.

The main calculation daemon, "coffeed" picks up this file and computes the level and percentage of the pot according to above mentioned heuristics

Then any frontend client can be made that uses this information. An example is the Server Side Include that displays the status on top of this page. Other frontend clients that are made include:

Unix GUI X-client
Based on a hopelessly obsolete version of libforms, with memoryleaks that makes your whole X crash every 48 hours
Win32 GUI client
Reads the coffeed output over a Windows network and displays status in the systemtray
Raw output from "readpar" parser
Useful to come up with statistics like: Last year we made an average of 5.35 pots per day
IRC announcer
Go to EFnet, channel #dcti-tunes, and see for yourself
inetd daemon
To distribute the coffeed output over the internet, so other frontend clients can pick up on it across the world
MRTG
Here is a mrtg-graph of this port
finger
finger xcoffee@ricardis.tudelft.nl for status info

Is this software freely available?

Yep, it's GPL'd and available here. But don't expect it to work or compile or anything.

Who are you?

I'm Ivo 'Leto' Janssen, you can read more about me on my personal homepage.
Last updated July 22, 2000