Built to order

IoT Water ATM with RFID Prepaid Card Dispensing using ESP32

This project builds a self-service water ATM kiosk around an ESP32. A user taps a prepaid RFID card on the RC522 reader, picks a volume on the LCD menu, and the ESP32 opens a 12V solenoid valve while a YF-S201 flow sensor counts pulses to measure what leaves the tap. The fare is deducted from the card and written back, and every transaction is pushed over Wi-Fi to a cloud operator dashboard tracking revenue, volumes, per-card balances and tank level. Suitable for B.E./B.Tech final-year projects in Electronics, IoT and Embedded Systems.

IoT & Embedded ESP32-WROOM-32YF-S201 flow sensorHTML · CSS · JS dashboardRC522 RFID · MIFARE Classic12V solenoid valve · relay16x2 LCD menuMQTT · HTTP JSON uplinkHC-SR04 tank sensingHybrid
IoT Water ATM with RFID Prepaid Card Dispensing using ESP32 — project thumbnail preview
More project photos (3)

The problem

Community water ATMs — coin or token operated RO-water kiosks — are common across Indian towns and housing clusters, yet the operator's side of the business is still cash-in-a-box. Coins jam the acceptor, unattended sales go unrecorded, and nobody knows how much water a kiosk actually dispensed on a given day. When the tank runs dry or a regular complains about a short fill, there is no log to check. This project replaces the cash box with prepaid RFID cards and a cloud log. A user taps a registered card, selects a volume preset on the LCD, and the ESP32 dispenses exactly that much water through a solenoid valve while a Hall-effect flow sensor meters every litre. The fare is deducted from the card's stored balance, and every transaction — card ID, volume, timestamp, remaining balance — is pushed over Wi-Fi to the operator's dashboard. The operator sees revenue, daily volumes, low-balance cards and tank level from anywhere, while the kiosk keeps dispensing on card balance even when the internet drops.

SYSTEM FLOW

8 components 11 connections

Live flow
Drag to explore
100%
userUser

Taps the RFID card on the reader, picks a volume preset on the LCD menu and confirms the fare.

Follow the working sequence

How it works

  1. The operator registers RFID cards from the kiosk admin menu and tops each one up with prepaid credit, stored in the card's value block.
  2. A user taps a card on the RC522 reader; the ESP32 authenticates the UID against its registered list and reads the balance.
  3. The LCD shows the balance and the user picks a volume preset (1, 2, 5, 10 or 20 litres); the ESP32 computes the fare at the configured ₹-per-litre rate and verifies the balance covers it.
  4. On confirmation the ESP32 energizes the 12V solenoid valve through a relay and water flows through the YF-S201 flow sensor toward the tap.
  5. The sensor's Hall pulses (approx. 450 per litre, datasheet) are counted on an ESP32 interrupt pin; when the count reaches the target volume the valve is de-energized.
  6. The fare is deducted, the new balance is written back to the card, and the LCD confirms the dispensed volume with the remaining balance.
  7. A JSON transaction record (card ID, volume, timestamp, remaining balance) is published over Wi-Fi via MQTT or HTTP to the cloud dashboard for the operator.

Tech stack:

  • ESP32-WROOM-32 (Arduino core, Wi-Fi uplink)
  • RC522 RFID reader · MIFARE Classic 1K cards
  • YF-S201 Hall-effect flow sensor
  • 12V solenoid valve · relay driver
  • 16x2 LCD · pushbutton menu
  • HC-SR04 ultrasonic sensor (tank level)
  • MQTT · HTTP JSON (cloud logging)
  • Operator dashboard (HTML · CSS · JS)
Parameter Value
Controller ESP32-WROOM-32, 240 MHz dual-core (datasheet)
RFID reader RC522, 13.56 MHz, MIFARE Classic 1K cards (datasheet)
Flow sensor YF-S201, approx. 450 pulses/litre (datasheet)
Dispense accuracy ±10% of volume, uncalibrated (datasheet); buyer-run calibration routine included
Volume presets 1 / 2 / 5 / 10 / 20 litres (menu-selectable)
Solenoid valve 12V DC, 1/2-inch port (design target)
Tariff ₹5 per 20 litres, configurable (design target)
Cloud uplink Wi-Fi 802.11 b/g/n; MQTT or HTTP JSON (design target)
Offline queue Approx. 500 transaction records in flash (design target)
Power 12V 2A adapter with 5V buck for logic (design target)

Project features

  • [RFID prepaid card billing] An RC522 reader authenticates MIFARE Classic cards by UID against the kiosk's registered list and reads the stored balance from a card value block — no coins and no cash handling at the machine.
  • [Pulse-metered dispensing] The ESP32 drives the 12V solenoid valve through a relay and counts YF-S201 Hall pulses (approx. 450 pulses per litre, datasheet value) on a hardware interrupt, closing the valve the moment the selected volume is reached.
  • [Volume menu with fare preview] A 16x2 LCD plus two pushbuttons offers 1/2/5/10/20-litre presets; the fare at the configured rate is shown before the user confirms, and the balance is checked against it.
  • [Balance write-back] After each dispense the fare is deducted and written back to the card, and the LCD shows the dispensed volume with the remaining balance — the card itself is the receipt.
  • [Cloud transaction log] Every dispense publishes a JSON record (card ID, volume, timestamp, remaining balance) over Wi-Fi via MQTT or HTTP; records queue locally when offline and sync on reconnect.
  • [Operator dashboard] A live dispense feed, daily volume and revenue totals, per-card balances with low-balance flags, kiosk online/offline status and a tank-level indicator — a working single-file demo of the dashboard is included.
  • [Tank-level alerting] An ultrasonic sensor watches the source tank and the dashboard flags low water so the operator refills before the kiosk runs dry. (Optional: GSM SMS fallback for the alert. Future scope: UPI-based card recharge.)

What is included

  • Assembled kiosk prototype (ESP32, RC522, YF-S201, solenoid valve, LCD, tank, dispensing tap)
  • ESP32 firmware (card authentication, pulse metering, valve control, MQTT/HTTP logging, offline queue)
  • Cloud operator dashboard (live log, daily totals, per-card balances, tank status)
  • Working single-file dashboard demo
  • Flow-sensor calibration procedure (measuring-jug method)
  • Project report PDF (background, design, methodology, results)
  • PPT presentation for final review
  • Viva Q&A preparation document

Limitations & prerequisites

  • The YF-S201 is rated ±10% (datasheet) uncalibrated; the included calibration routine tightens this, but billing-grade accuracy needs a certified meter.
  • With no internet there is no live cloud log — the kiosk keeps dispensing on card balance and queues approx. 500 records locally, syncing when Wi-Fi returns.
  • MIFARE Classic cards are clonable with cheap tools, which is acceptable for a campus prototype but not for real-money deployment.
  • The solenoid valve is on/off only, so flow rate follows inlet pressure (approx. 0.5–2 L/min from a gravity tank, expected); weak pressure means slow dispenses.
  • Balance lives on the card itself, so a lost card loses its credit — there is no central account recovery in the base build.
  • Tank sensing is a single low-water alert point, not a continuous level gauge, in the base build.

Frequently Asked Questions

How does the kiosk measure the water it dispenses?

The YF-S201 Hall-effect flow sensor emits approx. 450 pulses per litre (datasheet value); the ESP32 counts them on a hardware interrupt and shuts the 12V solenoid valve when the count matches the selected volume. The build ships with a calibration routine the buyer runs once against a measuring jug to tighten the ±10% uncalibrated figure.

What happens if the Wi-Fi drops during a dispense?

Nothing breaks: dispensing, fare deduction and the card write-back all run locally on the ESP32. The transaction record is queued in flash (approx. 500 records) and pushed to the cloud dashboard when the connection returns — only the live log pauses.

How are cards recharged?

From the kiosk's admin menu: the operator taps a card, enters an amount, and the new balance is written to the card's value block. UPI-based self-recharge is listed as future scope.

Can the tariff be changed?

Yes — the ₹-per-litre rate is a configuration value (default ₹5 per 20 litres, design target) changeable from the admin menu, so the operator can reprice all presets without touching the firmware.

How is this different from a prepaid water meter for a house?

A household prepaid meter sits on a home's pipeline and cuts supply when credit runs out. This is a public dispensing kiosk: walk-up users tap a card, choose a volume and fill a container, while the operator watches every sale on a dashboard. Different device, different buyer.

Is this project suitable for a final-year project?

Yes — for Electronics, E&TC and IoT/Embedded programs. It combines embedded firmware, sensor interfacing, power switching, RFID basics and a cloud dashboard, with honest calibratable measurement and a clear real-world operator story for the viva.

Components & software requirements
  • ESP32-WROOM-32 (Arduino core, Wi-Fi uplink)
  • RC522 RFID reader · MIFARE Classic 1K cards
  • YF-S201 Hall-effect flow sensor
  • 12V solenoid valve · relay driver
  • 16x2 LCD · pushbutton menu
  • HC-SR04 ultrasonic sensor (tank level)
  • MQTT · HTTP JSON (cloud logging)
  • Operator dashboard (HTML · CSS · JS)
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.

Get a quotation