Inspiration
The kitchen is one of the most dangerous rooms in any home. Gas supplies, open flames, electrical appliances, and flammable materials all share the same space, and conditions there can change within seconds. Most homes still depend on standalone smoke detectors or gas alarms that use fixed thresholds. These devices often go off during normal frying or boiling (studies report false alarm rates of 20–30%). They only react once a hazard is already serious, and they alert only the people who are physically in the room.
We also noticed that cooking apps like Tasty and Yummly know nothing about what is actually happening in your kitchen, while gas-monitoring apps offer nothing beyond alerts. No product combined kitchen safety and cooking assistance. We wanted to build one that did both: it keeps you safe and also helps you decide what to cook.
What it does
Smart Kitchen is an IoT and AI platform that watches over the kitchen in real time and doubles as a personal cooking assistant.
On the safety side, it continuously monitors gas concentration, flame presence, temperature, humidity, and motion. When it detects danger, it acts on its own: a servo motor shuts off the gas valve, the buzzer sounds, warning LEDs turn on, and a push notification goes to the user's phone even if they're away from home. A Random Forest model classifies the kitchen into one of four states: Normal, Cooking, Gas Leak, or Fire. This lets the system tell normal cooking smoke apart from a real emergency, and it grades the risk as Safe, Low Warning, High Warning, or Critical Danger.
On the automation side, an ultrasonic sensor turns the lights on when someone enters the kitchen and off when they leave, which saves energy. An IR sensor drives a touchless waste bin that opens its lid automatically when a hand approaches, which keeps things hygienic.
On the cooking side, the Flutter mobile app shows live sensor readings, alerts, and activity logs. It also recommends recipes based on the ingredients you already have, your dietary preferences, and your allergens. If you're missing an ingredient, it suggests substitutes. Recipes are labeled Easy, Medium, or Hard, you can save your favorites, and an AI chatbot answers cooking questions as you go.
How we built it
We designed Smart Kitchen as a modular, multi-layer system:
- IoT layer: An ESP32 microcontroller programmed in Arduino IDE reads data from an MQ-2 gas/smoke sensor, a flame sensor, a DHT22 temperature and humidity sensor, an HC-SR04 ultrasonic sensor, and an IR sensor. It controls servo motors (for the gas valve and the waste bin), a buzzer, and LEDs. Sensor data and device states are transmitted to the backend over MQTT.
- Backend: ASP.NET Core (C#) with SQL Server and Entity Framework handles authentication, sensor readings, safety alerts, activity logs, gas valve state, recipes, favorites, and diet and allergen classifications. The RESTful APIs are documented and tested with Swagger.
- Cloud: Firebase handles real-time data sync, and Firebase Cloud Messaging delivers push notifications even when the app is closed.
- AI (Python): We built two models.
- The hybrid recipe recommender combines content-based ingredient matching with a knowledge base of ingredient substitutes and fuzzy string matching. Each recipe is scored as S = 0.5 × Precision + 0.5 × Recall, where Precision measures how much of the recipe you can make with what you have and Recall measures how much of your inventory the recipe uses up. We trained it on the Food.com dataset.
- The safety model is a Random Forest classifier with 300 trees and a max depth of 10. We trained it on real time-series sensor data covering the Normal, Cooking, Gas Leak, and Fire states, using StandardScaler, random oversampling, and a stratified 80/20 split. We then serialized it with Joblib so it could be deployed.
- Mobile app: Built in Flutter (Dart) with screens for home, search and filters, categories, recipe details with step-by-step instructions, sensors, saved recipes, diet and allergen preferences, and the AI chat assistant.
Challenges we ran into
- Reducing false alarms. Cooking naturally produces smoke, heat, and humidity spikes that trip ordinary threshold-based detectors. We had to train the model to recognize a separate "Cooking" state so the system doesn't panic every time someone fries something.
- Class imbalance. The four kitchen-state datasets had uneven sample counts. We fixed this with random oversampling and balanced class weights.
- Messy recipe data. The raw dataset contained 231,637 recipes with missing values, duplicates, and inconsistent text. Cleaning it brought the count down to 194,517 usable records.
- Exact ingredient matching is too strict. "Tomato" and "tomatoes" wouldn't match. We added ingredient normalization, fuzzy string matching, and a substitution knowledge base to make recommendations more flexible.
- Hardware limits. The ESP32 has limited memory and processing power, low-cost sensors are sensitive to environmental interference, and the whole system depends on stable Wi-Fi.
- False triggers on the bin. The IR sensor sometimes opened the bin by accident, so we added a short confirmation delay before the lid opens.
- Connecting everything. Getting sensors, the ESP32, MQTT, the ASP.NET backend, SQL Server, Firebase, the Python models, and the Flutter app to talk to each other reliably was the hardest part of the project.
Accomplishments that we're proud of
- Our kitchen-state classifier reached 99% accuracy. It correctly classified 3,999 Normal, 4,878 Cooking, 4,111 Gas Leak, and 4,088 Fire samples, with an average inference time of 87 ms.
- The recommendation engine searches over 194,517 recipes and responds in 0.85 seconds on average.
- We built a complete, working end-to-end system that combines real hardware, automated gas shutoff, remote alerts, and personalized cooking help in a single app.
- Our research paper, "Smart Kitchen System Using IoT and Artificial Intelligence for Gas Monitoring and Recipe Recommendation," was accepted at ITC-Egypt 2026 (the International Telecommunications Conference, Track 3: IoT, M2M, Sensor & Ad-Hoc Networks), and it is set to appear in the conference proceedings on IEEE Xplore.
What we learned
We learned how to design a scalable multi-layer architecture that connects embedded hardware, backend services, the cloud, AI models, and a mobile app. On the hardware side, we worked through sensor calibration, actuator control, and real-time communication with MQTT and Firebase. On the AI side, we saw how much data cleaning, class balancing, and feature scaling affect a model's results. We also learned that standard metrics like precision and recall can be adapted to a real-world problem such as reducing food waste. Finally, the project taught us how to work as a team across very different technologies, from C# and Python to Dart and Arduino, and how to turn a graduation project into a published research paper.
What's next for Smart Kitchen
- Computer vision: cameras that can detect unattended cooking and other unusual activity in the kitchen.
- Voice control: hands-free control of kitchen functions and recipe steps through virtual assistants.
- More sensors: carbon monoxide, air quality, and air pressure sensors for more complete safety monitoring.
- Full smart home integration: compatibility with external home automation platforms and connected devices.
- More platforms: support for iOS and a web-based management dashboard.
The report doesn't have a dedicated "Challenges" or "What we learned" section, so I drew those two parts from its system constraints, data preprocessing steps, and design decisions. You may want to add your team's own personal experiences to them.
Built With
- .net
- android-studio
- arduino
- firebase
- jupyter
- sql-server
Log in or sign up for Devpost to join the conversation.