Abstract
This thesis explores the Internet of Things (IoT) technology, a prominent technological trend with the capability to connect devices via wireless networks. The objective of the research is to develop an IoT application model for educational purposes that is cost-effective, highly expandable, and suitable for students. The research includes the study of popular microcontrollers such as ESP32, ESP8266, Arduino, and Raspberry Pi; data transmission protocols like MQTT, CoAP; and functional modules and sensors. This model not only helps students gain a deeper understanding of IoT technology but also supports the development of practical applications under the guidance of Dr. Phan Anh Cang. The study emphasizes the flexibility, replaceability, and expandability of the model, enabling learners to easily access and practice advanced technologies in the field of IoT.
Introduction
In the context of the growing popularity and widespread application of the Internet of Things (IoT), the demand for research in this technology is also increasing. However, the high cost of equipment has made it difficult for students to access and study IoT. The project titled “Exploring the Internet of Things and Building an Application Model” was chosen with the aim of creating a standardized, easily expandable, and integrated learning model. This model will help students easily research and apply IoT in practice, while also supporting a more effective learning process
The objectives of the project include gaining knowledge about embedded programming, sensors, functional modules, and wireless communication methods. The model will be designed to have good expandability, with standardized, easily classified, and user-friendly connectors. The project also focuses on studying popular microcontrollers such as ESP32, ESP8266, Arduino, and Raspberry Pi, along with the application of the C++ programming language. The practical significance of the project not only helps students grasp IoT knowledge but also lays the foundation for further research and IoT applications.
Proposed Method
Build an overview model: The model consists of 20 sensors and functional modules, divided into three areas: the sensor area, the functional module area, and the microcontroller area.
Develop an IoT model for educational and research applications:
Display light sensor parameters on an LCD screen:
Connect the ESP32 microcontroller to the Blynk IoT platform:
Smart home model using the Blynk IoT platform:
The smart home model includes a fire alarm sensor, a door lock sensor, and a high-power electrical device controlled by a relay. When the fire alarm sensor is triggered, a notification will be displayed on the phone
The working principle of the magnetic sensor is that a magnet is always mounted on the door parallel to the sensor. When the door is closed, the magnet will be next to the sensor, and the sensor will detect the presence of the magnet.
Write and upload the code to the ESP32 microcontroller, and connect it to the mobile application. Design the control interface and receive device parameters sent to Blynk, including the fire detection sensor, the magnetic sensor for detecting door open/closed status, and the relay for switching high-power devices on and off.
Results
Test turning the device on and off:
Start the application and test turning the relay device on and off. Using a relay is necessary when controlling high-power devices such as fans, ceiling lights, or pumps. Controlling these devices without a relay can cause damage or overheating of the microcontroller.
When pressing the on/off button, the text will change according to the current state of the relay, and the delay when toggling is very low.
Test opening and closing the door: Take the magnet and test it with the magnetic sensor; the Blynk application will indicate that the door is closed. The Blynk application immediately reports that the door is closed.
Test fire alarm:b Proceed to use a lighter at a distance of about 20 cm from the sensor.
Conclusions
All devices are consolidated into a single model, saving time on searching for equipment during practical lessons or research. Fixing the devices onto the model reduces the risk of losing them and makes it easy to repair or customize according to teaching or research needs. When changing sensors, functional modules, or microcontrollers, simply remove the screws, replace the device, and screw it back in. Interaction between devices is straightforward, such as designing a car reverse warning system using ultrasonic sensors, LEDs, and alarms. The connectors are robust with large pins, minimizing damage and allowing easy replacement if broken. Connections are standardized in Digital, Analog, and I2C formats, utilizing Grove Seeed's standard libraries for sensor integration and usage.
References
- S. Monk, Programming Arduino: Getting Started with Sketches, Second Edition, 2016.
- S. Spanulescu, ESP32 Programming for the Internet of Things - Second Edition, 2018.
- S. Studio, Ultimate Guide to Grove Creator Kit, 2021.
- G. Hallberg, Wireless Communications with Arduino and the ESP32: Book 7 of the Arduino Short Reads Series, 2921.
- P. Seneviratne, Hands-On Internet of Things with Blynk: Build on the power of Blynk to configure smart devices and build exciting IoT projects, 2018.
- E. J. Upton, Raspberry Pi 4 Ultimate Guide: From Beginner to Pro: Everything You Need to Know: Setup, Programming Theory, Techniques, and Awesome Ideas to Build Your Own Projects (Raspberry Master Series), 2019.