Basic Idea
Laser diode and photoresistor are placed on the outside of the water tank opposite each other in a way that the resistor is hit by the laser through the plastic tank and water. As soon as the water level sinks, the light refraction through the tank changes and the photoresistor does not receive the laser light. At that point, a visual and/or audible alarm goes off, reminding the user to refill the water tank.
Assembly
I used a battery pack so the system can be run autonomous and turned on/off conveniently. Electronics are attached to the water tank via velcro so they can be easily readjusted or removed. The system is completely non-invasive, the only thing permanently attached to the water tank is velcro tape (adhesive).
Ressources
I used an Arduino Nano to control laser, photoresistor and indicating LED and buzzer. The Arduino code is provided in a Github repository which is linked to.
I soldered the circuit on a perfboard. Detailed circuit diagram can be found in the project files.
Additionally, I made a short video for the project:
Possible Improvements
- Better fixation of laser LED so it doesn't have to be readjusted after rough handling
- Dynamic setting of resistance thresholds to operate independent of ambient conditions
- Allow 24/7 operation by only checking every few seconds and then sending the Arduino to sleep. This would make so you wouldn't have to turn on the battery pack with the coffeemaker.
Cool sensor design! I could use this instead of the float switch in my coffee machine. https://hackaday.io/project/14862/log/169624-water-auto-refill-for-endless-coffee-supply