IoT Petrol Tank Monitor
ATmega 2560C++fluttermake-filepio-ide
Overview
This project addresses the critical issue of fuel levels and contamination in remote storage tanks. By utilizing ultrasonic sensors, Bluetooth module, LEDS, buzzer an Atmega2560 microcontroller, the system provides real-time data visualization on an app dashboard.

Hardware Architecture
The system is built on the Arduino Mega 2560 and HC-04 bluetooth module for bluetooth USART communication capabilities.
- HC-SR04 Ultrasonic Sensor: Measures the distance to the fuel surface to calculate volume.
- Water Sensor: Detects conductivity changes at the bottom of the tank to identify water contamination.
- Bluetooth Module: Transmits telemetry data to mobile devices.
Status Indicators
I implemented a strict LED coding system for immediate visual feedback:
- 🔴 Red LED: Critical Contamination Detected (Water in fuel).
- 🟡 Yellow LED: Tank is at 50% capacity.
- 🟢 Green LED: Near overflow.
Software Logic
The firmware uses a distance sampling to smooth out noisy sensor data caused by liquid rippling. The Flutter mobile app connects via bluetooth to display live gauges and historical usage logs.