espresso PID (first steps)

going to make a PID controller for my espresso machine (rancilio silvia).

at this point, I have an lm35 temp sensor inside the coffee machine, a SSR (solid state relay) to pulse the heating coils and a db9 serial cable cut in 2 to allow me to have the controller and lcd OUTSIDE the hot coffee machine :wink:

here the arduino is reading from an analog pin (ref to 1.1v internal) and scaling the 0..1023 value to proper degrees C and F:

Imgur

Imgur

early stages, reading the voltage directly on my DMM (showing 77.7 deg C, funny enough)

Imgur

and an inside shot of the espresso machine where I added the lm35 sensor:

Imgur

Imgur

more to come as the project progresses...

next next steps (and some code, too!)

Imgur

and two shots; one of the temp going up and one going down :wink:

link to my code (non-commercial DIY use only, please):

http://www.netstuff.org/espresso-master/firmware/arduino/

no PID logic, yet. so far, mostly just temperature monitoring (trending and graphing, though!) and stopwatch timer.

the framework is there and what I've written so far, does work :wink:

hope someone finds it useful.

Are you going to make it start brewing at a certain time?

it will have many clock-like features.

if the machine is idle 'too long' it will go into inhibit mode (won't keep pulsing the heating element, just let it go cold, then).

I might let it auto-warm up at 6am or turn on again at mid-day :wink:

a shot timer is useful (25 secs).

also a cleaning function! I just did a backflush of my rancilio and I could have used a feature that turns on the pump for 15 secs, waits 15 secs, turn it on again for 15 and repeat 5 or 6 times. you'd have to supervise it but it could do all the timing and on/off for you.

it could also keep track of how long its been (days) since the last cleaning; sort of like some home a/c units have a 'time to clean the filter' memo feature :wink:

here's the solid state relay (SSR) that the arduino simply pulses on/off to make the heater go on/off:

Imgur