Self-introduction: Yang Jiakang has a strong interest in electronic product production and the Internet of Things. His main research directions are: embedded and hardware circuit design. He has participated in college student electronic design competitions, "Blue Bridge Cup" competitions, and "Freescale" smart cars Competition, "Challenge Cup" competition and many other electronic competitions. Shi Feng has in-depth research on equipment networking communications, including wireless NB Bluetooth communications, wired optical fiber communications, etc.
Project Introduction: The lifestyle gradually shifts from outdoor to indoor, which makes the indoor environment attract people's attention. As a learning environment for students, classrooms should pay special attention to air quality issues. Due to the dense population in the classroom and poor gas circulation, it is easy to cause the carbon dioxide concentration to exceed the standard. Secondly, due to decoration and other reasons, the formaldehyde content may also exceed the standard. Therefore, I thought of detecting these two main gas indicators in the classroom and combining them with Internet technology has developed a real-time monitoring system for classroom air quality, which can effectively reduce the concentration of carbon dioxide and formaldehyde in the classroom, and improve the learning status of students and the learning and working status of teachers. Project details: The classroom air quality monitoring system based on NB-IOT consists of an offline hardware detection part and an online remote monitoring software part. The main control chip of the hardware part is Fudan Micro FM33LC046 chip, and the carbon dioxide detection sensor is Sense Air S8 series, with With the advantages of high precision and low power consumption, the formaldehyde detection sensor is the WZ-S formaldehyde detection module of Dart Company. The SHT20 sensor completes the temperature and humidity measurement. The NB-IOT module uses the mobile M5311 communication module for offline detection part and Data communication between servers. The system collects the concentration of carbon dioxide and formaldehyde gases in the classroom through carbon dioxide sensors and formaldehyde sensors respectively. The main control chip further processes the original data, displays the real-time monitoring data through the TFT color LCD screen, and then displays the data through the M5311 NB module. Sent to the Alibaba Cloud server, the server can transmit the data to monitoring terminals such as mobile phones and computers to complete the function of scanning the mobile phone code to display the monitoring data, and the system sets a threshold for the gas. When the gas concentration is too high, the main control chip issues an alarm response. And turn on relays to control high-power equipment for ventilation and other operations. In addition, the server can complete mobile phone text messages and voice alarm functions. The alarm function in the DingTalk group is used to remind parents, teachers and other classrooms of abnormal air quality, and make timely decisions. Responses. The power part is powered by lithium battery and can realize charging function. The overall block diagram of the project is shown in Figure 1-1.
Figure 1-1 Overall project block diagram
Challenges faced by the project and problems solved: This project can effectively and accurately measure the carbon dioxide concentration and formaldehyde concentration in the classroom, and can provide real-time alarms to promptly remind the classroom and students to ventilate the classroom, ensuring that students in the classroom are fresh learning environment. Since one of the measurement indicators of classroom parameters in this project is carbon dioxide concentration, the modified equipment can also be promoted to agricultural greenhouses. At the same time, artificial intelligence algorithms can be used in the background to analyze the carbon dioxide concentration data uploaded by the equipment to predict the growth of crops. Effective regulation can be found, and this issue can be gradually completed in subsequent research.
Project Hardware Introduction: The hardware circuit system design of the classroom air quality monitoring system based on NB-IOT includes the minimum system circuit of the main control part, carbon dioxide detection circuit, formaldehyde detection circuit, SHT20 temperature and humidity detection circuit, NB-IOT module circuit, and button detection circuit , buzzer circuit, lithium battery charging and discharging circuit, system power supply circuit and other parts. The main control chip adopts Fudan Micro FM33LC046 series microcontroller, the NB-IOT module adopts mobile M5311_LV low voltage full Netcom NB module, and the power circuit adopts Type -C interface and lithium battery power supply mode.
Project software introduction: After the system program starts running, the system initialization is first performed, including clock initialization, serial port initialization, LCD initialization, IIC initialization, etc. After the initialization is completed, the system executes the NB-IOT program. In order to ensure the smoothness of program execution, the NB module program After using the state machine, the NB module starts to query the network. After the network connection is successful, it enters the data sending program. During this period, the carbon dioxide detection program, the formaldehyde detection program, the temperature and humidity detection program, the time display program, etc. are executed in sequence. The M5311 NB module interacts with the main control chip through serial port 4. Therefore, before executing the NB module program, first initialize the serial port 4 and configure the baud rate to 115200. After the serial port configuration is completed, execute the NB reset program. After the reset is completed, execute In the boot process, after the boot is completed, the network is automatically configured. When the main control chip receives the IP address, it means that the NB module is connected successfully. After the connection is successful, the signal quality is checked through "AT+CSQ" and displayed. Through "AT+ CCLK?" command obtains the network time and uses it to calibrate the system clock. Use the MQTTCFG command to set parameters to configure the MQTT client user name and password. After receiving the configuration success message, use the MQTTOPEN command to open the connection. After returning the successful command, the NB module MQTT network is successful. At this time, the topic subscription through MQTTSUB begins again. And send message data such as carbon dioxide concentration, formaldehyde concentration, temperature and humidity, etc. To send the data, you need to convert the C language data into json format data that can be recognized by the Alibaba Cloud server. Among them, SMS, voice, DingTalk alarm and other functions are completed through the Alibaba Cloud server by calling SMS, voice, DingTalk and other API interfaces and subscribing to services.
If the carbon dioxide concentration exceeds the standard, an alarm will be issued, and the indicator light on the cloud interface will light up. For
formaldehyde detection, the equipment is placed in a gas distribution box. The gas distribution box is connected by colloid, so the formaldehyde concentration in the gas distribution box is relatively high, and the national standard is 0.08mg/m3.
Scan the QR code on your mobile phone to enter the monitoring interface, SMS voice alarm, and DingTalk group alarm
. The main control circuit design includes the minimum system circuit of the main control chip, carbon dioxide concentration circuit, formaldehyde detection circuit, LCD screen circuit and other circuit components.
The NB-IOT module uses the mobile M5311 NB module. The NB card uses a patch card to reduce the size of the PCB board. The NB module power supply adds tantalum capacitors to provide the required high current for the moment the module is launched. The NB module uses lithium for power supply. The battery supplies power directly, which can effectively ensure sufficient current during the operation of the module.
The power circuit includes lithium battery charge and discharge circuit, boost circuit, lithium battery protection circuit, and Type-C interface.
Partial device table
Bilibili video link https://www.bilibili.com/video/BV1r54y1y7fD/
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet