This is the kind of project that is certainly the product of drinking a bunch of coffee. After downing a few cups I recalled how frustrated I was about filling the coffee pot and pouring the water into the back of the coffee machine. Typically, because of the way the pot is shaped, you have to turn it almost upside down to get all the water out. Between this and the lid flapping around, I usually spill water all over the place. I though, "hey it would be cool to just press a button and fill up the back!"
In retrospect, this first world problem may not have warranted the several evenings of experimenting and hacking, but hey, isn't it important that we learn things? For me I learned a great deal about solenoid control circuits and the inductance present in the solenoid coil.
The goal here is simple. Use a 555 timer circuit in monostable, "one shot" mode to turn on a solenoid valve for a set period of time. When the time is adjusted to the available water pressure and desired amount, pressing a button should precisely fill the coffee maker and shut off. (While this is happening I'll grind the beans!)
Below you can see one of the early prototyping efforts to make this circuit work. Arriving at a working timer circuit was simple, there are plenty available online, and I only had to adjust the values of a capacitor and a variable resistor to determine my time range. There harder part was what to "do" with the output signal from the 555 timer. Early prototypes used a relay, and then a transistor driven relay, but unbeknownst to me, the inductance from the massive solenoid coil was causing my circuit to go hay wire. I basically needed a large MOSFET transistor to do the switching and a diode to allow the coil to dissipate stored energy after it turned off.
Here are the initial sketches of the ultimate switching circuit, drawn out as I carefully prototyped and confirmed the design:
With a good design I moved to finalizing it in cad:
Etching a circuit board:
And then soldering all the parts to the little board, in the picture below you can see the adjustable resistor which determines the amount of time the solenoid will stay open.
I wanted a clean way to house the little circuit board as well as mount the solenoid and hold the buttons. So I whipped up this little design and 3D printed it with my mendel-max 1.5:
The circuit board is screwed through little standoffs printed into the bottom of the enclosure box and then into the top of the solenoid which has mounting points. There is a status LED and "fill button" in the front and a power connector in the back. Just popping off the cover allows adjustment (if needed) of the valve timing. Here it is assembled:
And mounted to the wall near the coffee pot. I used a ice maker install kit to tap the water for this:
Check out this playlist for a walk through of the building process: