Tired of filling the water in your single-cup coffee machine? Have a Benjamin to spare (~$100), and an afternoon to kill? This is just what you need!
coffeewater is the code behind CoffeBot, a tiny computer and some plumbing parts to automate an annoying and repetitive task.
You need the following basic components:
- A single-cup coffee machine.
- A computer with a few GPIO pins, such as a Raspberry Pi.
- An HC-SR04 compatible ultrasonic range sensor.
- A solenoid controlled water valve.
- A few bits of plumbing and wire to connect everything together.
CoffeeBot uses an ultrasonic range sensor mounted inside the top of the coffee machine's water reservoir to read the water level. When the water level falls below a certain point, it triggers a solenoid valve to open and begin filling the reservoir. To feed water into and out of the value, you must attach the water valve between a nearby sink's plumbing and the reservoir. CoffeeBot's code includes several safety measures to ensure it won't accidentally flood your kitchen, and to ensure you never have to fill the reservior by hand again!
Here's the precise set of materials, with links, that you need to assemble a CoffeeBot of your very own. Do take note that you may have some of these items already (such as a few resistors, or an old USB charger to power the Pi), or that you may be able to find them cheaper at a local plumbing supply store or big-box hardware store (such as a faucet supply line). You may also be able to easily substitute some less expensive plastic plumbing parts, such as for the brass Sink Tee and Threaded Coupling I have linked to below. You could cut costs more aggressively by dropping down to a Pi Zero and replacing the Perma-Proto hat with a spare piece of perfboard.
Description | Cost |
---|---|
Rapsberry Pi Model 3 A+ | $25.00 |
A cheap SDCard | $8.99 |
Rapsberry Pi case | $5.00 |
Perma-Proto Model A+ Hat | $4.95 |
Rapsberry Pi power supply | $7.50 |
HC-SR04 Ultrasonic Distance Sensor | $3.95 |
Solenoid Water Valve | $6.95 |
Water Valve Power Supply | $8.95 |
5.5x2.1mmm Barrel Power Supply Jack | $0.97 |
TIP120 Transistor | $2.50 |
Kickback Protection Diode | $1.50 |
Faucet Supply Line | $5.22 |
Sink Tee | $8.46 |
1/2" Threaded Coupling | $6.88 |
1/2" MIP Adapter to 1/4" OD push fit adapter | $3.98 |
1/4" OD PEX water tubing and adapters | $14.87 |
If you don't have a pile of resistors and a few optoisolators lying around, you might need to order some. You should order a bunch of these if this kind of project sounds fun, because you'll inevitably find uses for these cheap components.
Description | Cost |
---|---|
an optoisolator | $0.39 |
some resistors | $14.99 |
some breakaway headers | $4.95 |
some female/female jumper wires | $1.95 |
~10 feet of >=4 conductor wire | $3.30 |
You could do without the headers if you just solder everything together, but it's much easier to work with on the future if you can disconnect each of the pieces. You could also use roughly any wire with at least 4 conductors to hook up your HC-SR04, such as an old CAT5 patch cord or some alarm or thermostat wire.
TODO: Describe how to lay out the parts on the perma-proto board, and what each one does.
TODO: Describe how to wire the 3 parts together.
TODO: Describe how to setup coffeewater to be run by systemd.