Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Cloud4RPi
Published

Smart Coffee Machine Pump with Raspberry Pi & HC-SR04

Automatic water pump system for a coffee machine controlled by Raspberry Pi, HC-SR04 ultrasonic sensor and Cloud4RPi Control Panel.

BeginnerFull instructions provided3,545
Smart Coffee Machine Pump with Raspberry Pi & HC-SR04

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Relay (generic)
×1

Software apps and online services

Cloud4RPi
Cloud4RPi

Story

Read more

Schematics

Smart Water Pump System Diagram

Code

Makefile

Makefile
https://raw.githubusercontent.com/cloud4rpi/coffee-pump-project/master/Makefile
.PHONY: install run start stop status log deploy

MAIN_FILE:= coffee-pump/main.py
SERVICE_INSTALL_SCRIPT:= service_install.sh
SERVICE_NAME:= coffee-pump.service

install:
	chmod +x $(SERVICE_INSTALL_SCRIPT)
	sudo ./$(SERVICE_INSTALL_SCRIPT) $(MAIN_FILE)

run:
	sudo python3 $(MAIN_FILE)

start:
	sudo systemctl start $(SERVICE_NAME)

status:
	sudo systemctl status $(SERVICE_NAME)

stop:
	sudo systemctl stop $(SERVICE_NAME)

log:
	sudo journalctl -u coffee-pump --since today

deploy:
	rsync -av coffee-pump sensor-setup Makefile *.sh pi@00.00.000.000:~/

Full Source Code Repository

Smart Coffee Machine Pump controlled by Raspberry Pi & Ultrasonic HC-SR04 sensor

Credits

Cloud4RPi
8 projects • 20 followers
Cloud control panel for your IoT projects. Use dashboard widgets to display device data in real-time. Control your IoT devices remotely.

Comments