Main Content

Contactless Water Fountain

I was looking for a project that would check all the requirements set by my teachers and at the same time be fun for me to make. When looking for a subject I couldn’t help but feel inspired by Covid-19 (This was right before it went to a world wide outbreak.) I chose for a contact less water fountain/dispenser, as it would offer for a way of drinking water without touching some buttons before water would come out.
This project uses a distance sensor to detect if a cup or glass has been placed under the water output, the fountain will then proceed to output water for 60 seconds (100ml / minute). This is to make it more consistent because detecting if the glass has been pulled away proved to be too difficult/slow of a task which is why a timer was put in place. After your glass has been filled with 100ml of water you can wait for 5 seconds and if the glass is still in front of the distance sensor it will proceed to fill another time (this means there is also a timeout of 5 seconds between filling two different items).


- 1x RaspberryPi (I used the 4th version but older versions might work as well)
- 1x S8050 transistor or 1x PN2222 transistor might work as well
- 1x Photoresistor
- 1x HC-SR04 (Ultrasonic Distance Sensor)
- 1x RFID-RC522
- 3x Different colors LEDs (blue, yellow, red)
- 1x LCD1602
- 1x Active Buzzer
- 1x PCF8574
- 1x MCP3008
- 1x Water Pump (A 12v peristaltic pump was used, link to this item)

- 1x DC Power supply (12v, 600mAh)
- 1x power brick with 3 spots
- 3x breadboards (you could probably use less)
- T-cobbler for RaspberryPi GPIO pins
- T-cobbler cable (for connecting between pi and cobbler)

Materials and tools used

- A drill with the following drill bits:

- 4mm (to pre-drill holes for the screws)
- 15mm (to drill holes for the distance sensor)

- Any screwdriver
- 30 screws of 45mm long
- 6 screws of 20mm
- 2 hinges for the door
- A plate of MDF of around 130cm by 80cm
- A couple of files”

Link to article