Espresso Machine Retrofit

Hello all,

I have a spare Arduino board with a 2 lines serial LCD that I would like to put to a good use.

My Gaggia Classic espresso maker is great, but lacks some digital fun to its analog interfaces. I am thinking of adding the following features through the board and LCD interface:
1- Boiler temperature sensing ( I won’t control the boiler in the first version)
2- Control of the solenoids using TRIACs
3- Conltrol of the pump using TRIAC
4- Programmable shot volume

There are various options to control the volume of the shots. One is by timing how long it takes to get the desired shot. This, as any espresso lover knows well, is unreliable and may cause unwanted spills or very strong shots because there are many variables that affect the net flow extracted by the machine.

Another option, which I prefer, is to pump out the precious liquid until a certain weight is reached. A sensor would be placed under the cup holder so that the initial weight of a cup is taken before the pump is activated and regularely after until the wanted weight difference is reached.

The pump and solenoids (240V) would ideally be each controled by a TRIAC isolated by an optoisolator so I don’t fry the Arduino with wiring issues. Are there examples somewhere of this?

I have done my homeworks in search of a weight sensing device that would give enough precision for loads under 500 grams but I am still in the dark. What are my options?

Thank you for your help!