The Smart Misfuel Detection System is designed to prevent misfueling incidents by identifying fuel types (Diesel or Petrol) using a TCS3200 color sensor. The system incorporates real-time monitoring, error detection, and automated alerts to ensure operational efficiency and safety in fuel stations or similar environments.
- Accurate Fuel Detection: Identifies Diesel and Petrol based on pre-calibrated sensor thresholds.
- Misfuel Prevention: Alerts users with a buzzer if the detected fuel type mismatches.
- Automated Alerts:
- Plays a warning buzzer if Diesel is detected.
- Issues an error notification if the system is left open for more than 1 minute.
- Energy-Efficient Operation: Automatically powers down the sensor when idle.
- Real-Time Monitoring: Outputs sensor readings via Serial Monitor for live debugging and analytics.
- Relay Integration: Controls external devices like pumps based on the detected fuel type.
- TCS3200 Color Sensor: Detects the color properties of the fuel.
- Arduino (Microcontroller): Processes data and controls the connected components.
- Magnetic Door Sensor: Detects when the system is opened or closed.
- Relay Module: Activates external devices based on the fuel type.
- Buzzers: Alerts users in case of misfueling or errors.
- LED Indicators (Optional): Provides visual feedback for system status.
- The system activates the TCS3200 sensor when the door is opened.
- Reads Red, Green, and Blue pulse width values from the fuel.
- Determines the fuel type using pre-set thresholds.
- Actions:
- Diesel Detected: Activates the relay and sounds a buzzer.
- Petrol Detected: Keeps the relay inactive, no buzzer sound.
- No Fuel Detected: Outputs an error message and turns off the relay.
- Plays a warning tune if the door remains open for 1 minute.
- Assemble the components as described in the
setup()
function. - Upload the code to the Arduino using the Arduino IDE.
- Use the Serial Monitor (baud rate: 9600) to view real-time sensor readings.
- Adjust the color thresholds in the
detectFuelType()
function if required.
- Initialization:
- Pins, sensors, and communication are configured in
setup()
.
- Pins, sensors, and communication are configured in
- Core Logic:
- The
loop()
continuously monitors the door state, reads color values, and determines the fuel type.
- The
- Functions:
getRedPW()
,getGreenPW()
,getBluePW()
measure the color pulse widths.detectFuelType()
identifies the fuel type and activates relevant components.playErrorTune()
sounds a warning buzzer if the door is open too long.
- Customization:
- Change the time interval for the warning in
errorBeepInterval
.
- Change the time interval for the warning in
- Fuel Stations: Prevents misfueling incidents automatically.
- Industrial Automation: Detects and categorizes liquids in production lines.
- Smart Monitoring Systems: Provides real-time analytics and error alerts.
- Add a digital display for visual feedback of fuel type.
- Integrate IoT features for remote monitoring and control.
- Expand the system to detect additional fuel or liquid types.
- Enable data logging for analytics.
License This project is licensed under the Apache License 2.0. .