IoT Group Project: Instruction Sheet
Remote Monitoring of Coke Cans in a Fridge using ESP32 and MQTT Protocol,
with Real-time Updates on Smartphones
Maximum members per group: 5.
Upload the finalized group details to the excel sheet given in LMS before April 7th 2023.
Overview:
In this project, you will build a system that monitors the temperature of Coke cans in a fridge and sends
real-time updates to a smartphone using MQTT protocol. The system will also notify if Coke is available
and its temperature is below a specified threshold.
Materials Required:
● ESP32 development board (Or any other except Arduino)
● Temperature sensor (e.g. DS18B20, AHT21)
● Ultrasonic Sensor/IR Sensor
● Jumper wires
● Breadboard
● USB cable
● Coke (or any other) cans and a fridge
Preferred Programming Languages:
● Micropython
● C++
Step-by-Step Instructions:
1. Connect the temperature sensor and the Ultrasonic or IR sensor to the ESP32 board.
2. Connect the ESP32 board to your computer.
3. Download and install a suitable IDE (e.g. uPyCraft).
4. Upload the necessary libraries to the ESP32.
5. Implement the MQTT protocol in ESP32 that publishes the temperature readings on the
“esp/temperature" topic every 5 seconds.
6. Add to the above code in ESP32 a code to publish a text message on the “esp/notification”
topic every 30 mins considering the following conditions.
i. Coke is available.
ii. Temperature in the fridge is below a threshold (e.g. 8 °C).
The text output should be “Coke is Available”, if both the following conditions are met. Otherwise
it should be “Coke is Not Available”
7. Implement a MQTT broker in a Mosquitto Server.
8. Upload the sensor readings to the MQTT broker.
9. Connect the MQTT broker to a Mobile App on a Smartphone.
10. Use the mobile app to view temperature readings as a graph of temperature vs time.
11. Receive text message notifications in the App regarding the status of Coke bottles in the fridge.
Project Presentation and Report:
At the completion of the project,submit a report and a video presentation in a zip folder to the LMS before
the deadline specified. The report should include the following sections:
● Introduction:
● Define IoT and provide context for the project.
● Clearly state the problem that the project aims to solve.
● Explain how the project contributes to the field of IoT.
● Literature Survey:
● Provide a brief overview of the sensors, hardware boards, and MQTT protocol
used in the project.
● Discuss any relevant IoT mobile applications related to the project.
● Methodology:
● Include the algorithm of the overall system using a flow chart.
● Hardware Implementation:
● Include specifications for the hardware and software used in the design.
● Include and explain the coding used at the ESP32.
● Explain the procedure of setting up the MQTT broker.
● Explain the method used in connecting ESP 32 and the smart phone to the
MQTT broker
● Results and Discussion:
● Present two plots that show the variation of temperature against time and availability of
Coke against time.
● Discuss the results and the performance of the project.
● Video Presentation:
● Create a 3-minute video presentation in MP4 format that covers the main points of the
project, including the problem statement, methodology, results, and discussion.
Reference links
1. https://www.youtube.com/watch?v=P8DnANWusrM
2. https://www.youtube.com/watch?v=hyJhKWhxAxA
3. https://microcontrollerslab.com/esp32-micropython-mqtt-publish-subscribe
4. https://randomnerdtutorials.com/micropython-mqtt-esp32-esp8266