Fresh food box positioned and detected by internet of things
By locating and detecting fresh food boxes through the Internet of Things, integrating multi-mode positioning and multiple sensors, the problem of multi-dimensional environmental perception and positioning faults in the fresh food supply chain is solved, seamless positioning and data penetration throughout the entire process are achieved, equipment power consumption and costs are reduced, and the operational efficiency of the supply chain is improved.
Patent Information
- Application Number
- CN202511203380.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-10-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack multi-dimensional environmental perception in the fresh food supply chain, suffer from severe data fragmentation, have gaps in indoor and outdoor positioning, and have high equipment power consumption and high costs, making it impossible to achieve full-process environmental data tracking and optimization.
The IoT is used to locate and detect fresh food boxes, integrating multi-mode positioning technology, multiple sensors and low-power communication modules to achieve seamless positioning in all scenarios, precise tracking at the item level and data connectivity, thereby reducing costs.
It achieves seamless positioning throughout the entire process, supports precise tracking at the item level, reduces equipment power consumption and costs, and improves the location tracking capabilities and operational efficiency of the supply chain.
Smart Images

Figure CN120751344A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of Internet of Things terminal equipment, intelligent cold chain logistics and positioning and navigation technology, and specifically to an Internet of Things positioning and detection fresh food box. Background Art
[0002] In the fresh food supply chain, traditional technologies present numerous challenges that need to be addressed. In environmental monitoring, while temperature and humidity sensors are relatively mature, existing solutions often focus on a single parameter and lack the ability to perceive multi-dimensional environmental factors like gas concentration and light, making it difficult to comprehensively assess the risk of fresh food spoilage. Furthermore, data fragmentation is a serious issue, with independent monitoring systems used for each stage of transportation, warehousing, and sales. This prevents integrated data analysis and hinders full-process environmental data tracking and optimization.
[0003] In terms of positioning technology, there is a gap between outdoor and indoor positioning. In existing technologies, transport vehicles use outdoor GPS positioning, but indoor environments such as warehouses lack effective continuous positioning methods, making it impossible to achieve continuous tracking of the entire scene from transport vehicles to warehouses and retail terminals. In addition, traditional solutions can only track the location of entire vehicles or boxes, and cannot locate the real-time location of individual fresh food boxes. The problem of missing single-item-level positioning is prominent. In terms of equipment performance and cost, existing 4G / GPS equipment has high power consumption and a battery life of less than 72 hours, making it difficult to support long-distance transportation; professional cold chain monitoring equipment has a unit price of over US$50, which is too expensive to be popularized to single-item-level applications, seriously restricting large-scale application.
[0004] There are two main existing technical solutions that are most similar to the present invention: Solution 1 deploys a GPS positioning module + temperature and humidity sensor in the transport vehicle, uploading the entire vehicle's environmental data to the cloud via the 4G network. The disadvantages of this solution are its reliance on high-power 4G modules, insufficient battery life, and limited vehicle positioning, inability to track individual fresh produce boxes. Solution 2 is an RFID temperature-sensitive tag solution, which attaches RFID tags and integrates temperature sensors to fresh produce packaging, and batch reads the tag data using a fixed reader. This solution has problems such as reliance on fixed readers for indoor positioning, fragmented positioning technology (Bluetooth beacons have an accuracy of 2 to 5 meters, UWB is expensive, and RFID requires a fixed reader), lack of a multi-mode fusion positioning solution, and the ability to monitor only a single parameter, temperature. Summary of the Invention
[0005] The purpose of the present invention is to provide an Internet of Things positioning and detection fresh food box to solve the problems raised in the above background technology.
[0006] To achieve the above-mentioned objectives, the present invention provides the following technical solutions: an Internet of Things positioning and detection fresh food box, comprising a hardware architecture and a software architecture, wherein the hardware architecture comprises a main control chip, a communication module, a sensor module and a power module; the main control chip adopts Espressif ESP32-C3FH4, which is used for control and data processing of the overall system; the communication module comprises a 4GCat1 module and an antenna, which are used to realize remote transmission of data and reception of positioning signals; the sensor module comprises a temperature and humidity sensor, a magnetoresistive sensor and a vibration sensor, which are respectively used to monitor temperature and humidity, box switch status and vibration conditions; the software architecture comprises a transport layer, a business layer, a functional module layer and a hardware driver layer; the transport layer adopts MQTT and HTTP protocols for data communication; the business layer comprises data acquisition service, communication service and wake-up service; the functional module layer comprises an EG800K control module, an OTA module, a history record module, a log module, an AHTX module, a GNSS module, a battery module and a parameter configuration module; the hardware driver layer provides driver support for the hardware interface.
[0007] Preferably, the communication module supports multi-mode positioning technology, including GPS positioning, WiFi base station positioning and 4G base station positioning, to achieve seamless positioning switching from outdoor to indoor.
[0008] Preferably, the communication module uses the Quectel EG800KCNGC-I03-SGNSA4GCat1 module to communicate with the main control ESP32-C3FH4 through the UART interface. The communication module is equipped with a GNSS antenna, a 4G antenna and a SIM card, which are used to receive satellite signals to realize positioning function and enhance the reception capability of 4G network signals.
[0009] Preferably, the temperature and humidity sensor is connected to the main control chip via an IIC interface, and the magnetoresistive sensor and the vibration sensor are connected to the GPIO pin of the main control chip for detecting the switch state of the box.
[0010] Preferably, the data acquisition service is responsible for integrating data information from temperature and humidity sensors, magnetoresistive sensors, and vibration sensor hardware devices, and uniformly managing and preprocessing the collected temperature and humidity, switch box status, and vibration condition data to provide a basis for subsequent data transmission and processing.
[0011] Preferably, the communication service processes the communication with the server, including establishing an MQTT connection with the server through the 4G network to realize data reporting and instruction reception. The business module is responsible for encapsulating and parsing MQTT messages to ensure that data is accurately and efficiently transmitted between the device and the server. At the same time, it also supports HTTP request sending for some specific data interaction scenarios; the wake-up service triggers corresponding operations according to different wake-up sources.
[0012] Preferably, the EG800K control module is responsible for interacting with the EG800K4GCat1 module and controlling the module by sending AT commands, including registering the network, detecting the SIM card status, and obtaining the network status operations; the OTA module is used to implement the over-the-air upgrade function of the device by interacting with the server to check whether there is a new firmware version available for download.
[0013] Preferably, the history recording module is mainly responsible for recording data that fails to be sent by the device, the AHTX module is used to drive and process data specifically for the temperature and humidity sensor, and provide an interface for obtaining temperature and humidity data; the battery module is used to monitor the battery power of the device, read the battery voltage value through the ADC interface, and convert it into intuitive information of the power percentage.
[0014] Preferably, the GNSS module is used to cooperate with the GNSS antenna to realize the positioning function of the device; the parameter configuration module is responsible for managing the configuration parameters of the device, such as data reporting interval, heartbeat interval, and server address; the log module is responsible for recording the operating status of the device, various event information that occurs, and error information that occurs.
[0015] Preferably, the hardware driver layer directly interacts with the hardware device and provides driver support for GPIO, IIC, ADC, and UART hardware interfaces.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention achieves seamless positioning in all scenarios: integrating multi-mode positioning technology to achieve continuous tracking from outdoor to indoor, solving the positioning fault problem of existing technology and improving the location tracking capabilities of each link in the supply chain.
[0017] The present invention enables precise tracking of individual items: Each fresh food box has a built-in independent positioning module, which supports simultaneous tracking of the real-time locations of multiple items. This fills the gap that traditional solutions cannot monitor individual packages, and enables full-process tracking of individual fresh food boxes.
[0018] The multi-dimensional environmental perception of the present invention integrates multiple sensors such as temperature, humidity, and switch box to construct a composite spoilage factor analysis model. Compared with the single parameter monitoring of the existing technology, it can more comprehensively assess the spoilage risk of fresh food and provide more accurate data support for shelf life prediction and environmental control. This invention features low power consumption and low cost: it adopts low-power designs such as NB-IoT+Bluetooth dual-mode communication to extend device life. At the same time, through reasonable hardware selection and architecture design, it reduces costs and breaks through the barriers to large-scale applications. The data-driven decision-making of this invention achieves data integration and fusion throughout the entire process, provides data support for decisions such as shelf replenishment and cold chain regulation, reduces manual dependence, and improves supply chain operation efficiency and transparency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is the front structure of the mainboard of the fresh food box for IoT positioning detection of the present invention; Figure 2 This is the back structure of the mainboard of the fresh food box for IoT positioning detection in the present invention; Figure 3 This is a block diagram of the hardware architecture system of the present invention; Figure 4 This is a system block diagram of the software architecture of the present invention; Figure 5 This is a schematic diagram of WiFi base station positioning in the present invention; Figure 6 This is a schematic diagram of GPS positioning of the present invention; Figure 7 This is a schematic diagram of 4G base station positioning in the present invention; Figure 8 This is a schematic diagram of the anti-shake mechanism of the present invention filtering out false touches; Figure 9 A schematic diagram of the publish-subscribe model of the present invention; Figure 10 This is the pin definition diagram of the EG800K chip of the present invention; Figure 11 This is a circuit diagram of the ESP32-C3 chip of the present invention; Figure 12 This is the power supply circuit diagram of the EG800K of the present invention; Figure 13 This is the circuit diagram of the lithium battery input interface of the present invention; Figure 14 This is a circuit diagram of a low-dropout linear regulator (LDO) according to the present invention; Figure 15 This is the circuit diagram of the temperature and humidity sensor of the present invention; Figure 16 is a circuit diagram of MH251 of the present invention; Figure 17 This is the ADC (analog-to-digital conversion) sampling circuit diagram of the present invention; Figure 18 This is a circuit diagram of the SIM card interface of the present invention; Figure 19 This is the PWM and reset (RST) control circuit diagram of the present invention; Figure 20 This is a serial communication circuit diagram of the present invention; Figure 21 This is the LED driving circuit diagram of the present invention; Figure 22 This is the radio frequency circuit diagram of the GPS and 4G antenna of the present invention; Figure 23 This is the 40MHz crystal oscillator circuit diagram of the present invention; Figure 24 This is the wake-up circuit diagram of the present invention; Figure 25 This is the 2.4G antenna radio frequency circuit diagram of the present invention; Figure 26 A circuit diagram of the USB interface and control signals of the present invention; Figure 27 This is the USB1 Type-C interface circuit diagram of the present invention; Figure 28 This is the USB2 Type-C interface circuit diagram of the present invention.
[0020] In the figure: 1. 4GCat1 module; 2. 4G antenna; 3. SIM card slot; 4. GNSS antenna; 5. Main control chip; 6. 2.4G antenna; 7. Magnetoresistive sensor interface; 8. LED indicator; 9. Temperature and humidity snap interface; 10. Battery interface; 11. Temperature and humidity sensor; 12. Magnetoresistive sensor; 13. Vibration sensor; 14. Power module. DETAILED DESCRIPTION
[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0022] See also Figure 1-28 The present invention provides a technical solution for positioning and detecting fresh food boxes in the Internet of Things: it includes a hardware architecture and a software architecture. The hardware architecture includes a main control chip 5, a communication module, and a sensor module; the main control chip 5 adopts Espressif's ESP32-C3FH4, which is used for overall system control and data processing; the hardware architecture also includes a main control, and the main board is provided with a 4GCat1 module 1, a 4G antenna 2, a SIM card slot 3, a GNSS antenna 4, an ESP32C3 main control chip 5, a 2.4G antenna 6, a magnetoresistive sensor interface 7, an LED indicator light 8, a temperature and humidity buckle interface 9, and a battery interface 10.
[0023] The communication module includes a 4GCat1 module 1 and an antenna, which are used to realize remote transmission of data and reception of positioning signals; the sensor module includes a temperature and humidity sensor 11, a magnetoresistive sensor 12 and a vibration sensor 13, which are respectively used to monitor temperature and humidity, box switch status and vibration conditions; the software architecture includes a transport layer, a business layer, a functional module layer and a hardware driver layer; the transport layer uses MQTT and HTTP protocols for data communication; the business layer includes data acquisition services, communication services and wake-up services; the functional module layer includes an EG800K control module, an OTA module, a history record module, a log module, an AHTX module, a GNSS module, a battery module and a parameter configuration module; the hardware driver layer provides driver support for the hardware interface.
[0024] The main control chip ESP32-C3FH4 is connected to each hardware component according to the schematic diagram to ensure reliable electrical connections. During device startup, the main control chip 5 first initializes and configures its own clock and peripheral interfaces, setting the corresponding operating mode and parameters, such as the UART baud rate and GPIO input and output modes, to prepare for communication and collaboration with other hardware modules.
[0025] Furthermore, the communication module supports multi-mode positioning technology, including GPS positioning, WiFi base station positioning and 4G base station positioning, to achieve seamless positioning switching from outdoor to indoor.
[0026] Furthermore, the communication module uses the Quectel EG800KCNGC-I03-SGNSA4GCat1 module 1 to communicate with the main control ESP32-C3FH4 through the UART interface to realize remote data transmission. The module supports multiple network standards, which can ensure that the device can be stably connected to the Internet in different network environments and realize data interaction with the server, including reporting the status information of the fresh food box and receiving instructions issued by the server.
[0027] Initialize the 4G module EG800KCNGC-I03-SGNSA by sending a specific AT command sequence to complete module startup, network registration, and connection operations. During the initialization process, check the SIM card status to ensure that it is properly inserted and usable. Also, configure the appropriate APN and other parameters based on the network environment to ensure the 4G module can successfully connect to the mobile network.
[0028] Furthermore, the communication module is equipped with a GNSS antenna 4, a 4G antenna 2 and a SIM card, which are respectively used to receive satellite signals to realize positioning function and enhance the reception capability of 4G network signals, ensuring that the device can obtain accurate location information and stable network connection even in complex environments.
[0029] Furthermore, the sensor module integrates multiple sensors to realize the collection and processing of multi-dimensional environmental parameters such as temperature, humidity, and switch box status; the temperature and humidity sensor 11 is connected to the main control chip 5 through the IIC interface, and can monitor the temperature and humidity changes inside the fresh food box in real time. The sensor transmits the collected temperature and humidity data to the main control chip 5 for processing, so as to timely understand the temperature and humidity conditions of the environment in which the fresh products are located and ensure that they are stored in a suitable environment.
[0030] Furthermore, the magnetoresistive sensor 12 and the vibration sensor 13 are connected to the GPIO pins of the main control chip 5 to detect the box's open / close status. When the box is opened, the sensors generate corresponding signal changes. The main control chip 5 can capture these signals and process them accordingly, handling the box opening and closing events and ensuring the safety of fresh produce during transportation and storage.
[0031] After the hardware connection is complete, the main control chip 5 initializes the temperature and humidity sensor 11, magnetoresistive sensor 12, and vibration sensor 13, configuring the sensor's operating mode, sampling frequency, and other parameters, putting them into normal operation and preparing to collect data. For example, for the temperature and humidity sensor 11, an initialization command is sent via the IIC interface to set its measurement accuracy and data update frequency.
[0032] The temperature and humidity sensor 11 collects data at set intervals or trigger conditions (such as the expiration of the data reporting period or a change in the box status). The sensor converts the collected analog signals into digital values and transmits them to the main control chip 5 via the IIC interface. Upon receiving the data, the main control chip 5 processes the data based on the sensor's characteristics and calibration parameters, converting the digital values into actual temperature and humidity values. It also performs data validity checks and handles outliers, including those that deviate from the normal digital range or are damaged during data transmission, to ensure the accuracy and reliability of the collected data.
[0033] like Figure 8 As shown, magnetoresistive sensor 12 and vibration sensor 13 monitor the box's status in real time. Detecting opening and closing of the box or vibration generates a level signal, which is quickly captured by the main control chip 5 via GPIO interrupts. To ensure accuracy, a built-in anti-shake mechanism filters out false touches. Once a valid signal is captured, detailed event information is immediately recorded, including the time of occurrence and event type (box opening, closing, or vibration), providing a reliable basis for device status tracking.
[0034] Specifically, when the Hall effect signal for opening and closing a door is generated, due to the elasticity of the device, a detection switch will not immediately and stably connect when closing, nor will it immediately disconnect when opening. Consequently, there will be a series of jitters at both the closing and opening moments. Debounce is a measure to prevent this phenomenon. The duration of this jitter is determined by the mechanical characteristics of the device. This is a critical time parameter used in many situations. The stable closing time is determined by the operator's keystrokes and generally ranges from a few tenths of a second to several seconds. Debounce is necessary to ensure that the CPU processes each door closing only once. The state of the door is read when the closure is stable, and processing must be performed only after the release is stable.
[0035] MQTT: MQTT (Message Queuing Telemetry Transport) is a lightweight instant messaging protocol based on a publish / subscribe model, suitable for IoT device communication in low-bandwidth, unstable network environments. In this software architecture, the communication service module uses the MQTT protocol to establish a connection with the server over a 4G network, enabling device data reporting and server command reception. It is responsible for encapsulating and parsing MQTT messages, ensuring accurate and efficient data transmission between devices and servers, meeting device real-time performance and low power consumption requirements.
[0036] HTTP: HTTP (Hypertext Transfer Protocol) is an application-layer protocol for distributed, collaborative, and hypermedia information systems. In this architecture, the communication service module supports sending HTTP requests, primarily for specific data exchange scenarios, such as initial device configuration (obtaining configuration information from a server via HTTP) and firmware upgrades (downloading new firmware versions from a server). Using HTTP provides a reliable communication method for devices in scenarios requiring complex data exchange with servers.
[0037] Furthermore, the data acquisition service is responsible for integrating data information from hardware devices such as temperature and humidity sensors 11, magnetoresistive sensors 12, and vibration sensors 13, and uniformly managing and preprocessing the collected temperature and humidity, switch box status, vibration conditions and other data to provide a basis for subsequent data transmission and processing.
[0038] Communication between the device and the server is primarily based on the MQTT protocol. During startup, the main control chip 5 sends AT commands to the 4G module via the EG800K control module, configuring MQTT connection parameters such as the server address, port number, client ID, username, and password, and then initiates an MQTT connection request. After successfully connecting to the server, the device can subscribe to and publish MQTT topics, reporting data and receiving commands.
[0039] Furthermore, the communication service mainly handles communication with the server, including establishing an MQTT connection with the server through the 4G network to realize data reporting and instruction reception. The business module is responsible for encapsulating and parsing MQTT messages to ensure accurate and efficient transmission of data between the device and the server. At the same time, it also supports HTTP request sending for some specific data interaction scenarios.
[0040] When reporting data, the main control chip 5 encapsulates the collected information, such as temperature and humidity, switch box status, power consumption, and location, according to the pre-defined MQTT message format and then sends it to the designated reporting data topic via the 4G module. After receiving the data, the server parses and processes it, stores it in a database, or performs further analysis and application.
[0041] like Figure 9 As shown, the device subscribes to the command topic of the server and receives the instructions issued by the server in real time. When receiving the instruction, the main control chip 5 parses the instruction content and performs the corresponding operation according to the instruction, such as adjusting the data collection frequency, modifying configuration parameters, and starting a specific function.
[0042] Furthermore, the wake-up service triggers corresponding operations according to different wake-up sources (such as timer wake-up, magnetoresistive sensor 12 wake-up, etc.). When the device is awakened from the sleep state, the service module will start a series of initialization and detection processes to ensure that the device is operating normally and is ready for data collection and communication.
[0043] Furthermore, the EG800K control module is responsible for interacting with the EG800K4GCat1 module 1, controlling the module by sending AT commands. This includes operations such as registering with the network, detecting SIM card status, and obtaining network status. This module encapsulates the underlying details of communicating with the 4G module and provides a simple interface for the main control chip 5, making it easy to call at the application layer and realize the device's networking functions.
[0044] Furthermore, the OTA module is used to implement the device's over-the-air (OTA) upgrade function. It interacts with the server to check whether a new firmware version is available for download. If a new version is detected, the module is responsible for downloading and updating the device firmware, ensuring that the device can obtain new features and fix known problems in a timely manner, thereby improving the device's performance and stability.
[0045] The OTA module periodically sends requests to the server to check for new firmware versions available for upgrade. The server determines whether a new version is available based on the device model, current firmware version, and other information. If a new version is available, it returns a firmware download link and related information. After receiving the upgrade notification from the server, the device uses HTTP to request the new firmware file from the specified link. After the download is complete, the device performs a firmware integrity check to ensure that the downloaded file has not been corrupted or tampered with. After confirming that the firmware file is correct, the device triggers the upgrade operation, and the main control chip 5 boots from the new firmware file and updates. After the upgrade is complete, the device restarts and runs the new firmware version.
[0046] Furthermore, the history module is primarily responsible for recording data that failed to be transmitted by the device. During the device data transmission process, data transmission failures may occur due to various factors such as network instability and signal interference. This module stores these failed data in the local file system and retransmits them when the network condition is good, thus ensuring data integrity and preventing data loss from affecting subsequent analysis and application.
[0047] Furthermore, the AHTX module is specifically designed to drive and process the temperature and humidity sensor 11, providing an interface for acquiring temperature and humidity data. This module is responsible for initializing the sensor, reading sensor data, calibrating and converting the data, and converting the raw data into actual temperature and humidity values for use by upper-layer service modules.
[0048] Furthermore, the battery module is used to monitor the battery power of the device, read the battery voltage value through the ADC interface, and convert it into intuitive information such as power percentage.
[0049] Furthermore, the GNSS module is used to cooperate with the GNSS antenna 4 to realize the positioning function of the device. The module obtains the current geographical location information (longitude and latitude) of the device by receiving satellite signals and provides it to the upper layer application.
[0050] The GNSS module receives satellite signals via GNSS antenna 4, analyzes the positioning data contained in the signals, and obtains the device's current geographic location (latitude and longitude). The main control chip 5 periodically obtains location data from the GNSS module, processes it, and transmits it along with other collected data. When reporting data, this location information is added to the reported data, enabling the server to track the location of the fresh food box in real time. Furthermore, the device can set a location update frequency based on business needs. This allows for timely updates of location information when the device moves or in specific circumstances (such as when reaching a critical node or when an abnormal event occurs), ensuring the timeliness and accuracy of location data.
[0051] Furthermore, the parameter configuration module is responsible for managing the configuration parameters of the device, such as data reporting interval, heartbeat interval, server address, etc. These parameters are stored in the local Preferences and can be updated through configuration instructions issued by the server.
[0052] Furthermore, the logging module plays a crucial role in recording and monitoring the entire device's operation. It records the device's operating status, various events, and errors. This log information provides detailed data support for subsequent troubleshooting, system maintenance, and performance optimization, helping technicians quickly locate the root cause of problems and analyze system performance, thereby ensuring stable and reliable device operation.
[0053] Furthermore, the hardware driver layer directly interacts with hardware devices, providing driver support for hardware interfaces such as GPIO, IIC, ADC, and UART. This layer implements basic operations such as hardware device initialization, data reading and writing, and interrupt handling, providing a unified hardware access interface for upper-layer functional modules and business logic.
[0054] The power module 14 filters and stabilizes the input power, providing a stable operating voltage for the device. Furthermore, through a combination of hardware circuitry and software control, device power consumption is managed. When the device is idle or in low-power mode, the main control chip 5 can control some hardware components to enter sleep or standby mode, reducing overall power consumption. When there are no data collection or transmission tasks, unnecessary sensors or peripherals are powered off, leaving only necessary wake-up sources in a listening state to conserve power.
[0055] The software process and logic of the present invention are as follows: when the device is started, a series of initialization operations are performed, including hardware initialization, sensor calibration, loading configuration parameters, connecting to the network, etc. After the initialization is completed, the corresponding business operations are triggered according to different wake-up sources. For example, when the timer wakes up, the data collection, processing and reporting tasks are performed; when the magnetoresistive sensor 12 triggers the wake-up, it is determined whether it is an opening or closing event, and the corresponding records and processing are performed. During the entire software operation process, the operating status, event information and error information of the device are recorded through the log module to facilitate troubleshooting and system maintenance. The functional modules work together through reasonable interface design and data interaction mechanism. For example, the network status information provided by the EG800K control module can be used by the data transmission module to determine whether to report data, and the parameter changes of the parameter configuration module will affect the working frequency of the data acquisition module. The software design follows the principles of modularization and layering to improve the readability, maintainability and scalability of the code, and facilitate the upgrade and optimization of subsequent functions.
[0056] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0057] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An IoT positioning and detection system for fresh food boxes, characterized by: The invention comprises a hardware architecture and a software architecture, wherein the hardware architecture comprises a main control chip (5), a communication module, a sensor module and a power module (14); the main control chip (5) adopts Espressif ESP32-C3FH4, which is used for the control and data processing of the whole system; the communication module comprises a 4GCat1 module (1) and an antenna, which is used for realizing the remote transmission of data and the reception of positioning signals; the sensor module comprises a temperature and humidity sensor (11), a magnetoresistive sensor (12) and a vibration sensor (13), which are used for monitoring temperature and humidity, the switch state of the box and the vibration respectively; the software architecture comprises a transport layer, a business layer, a functional module layer and a hardware driver layer; the transport layer adopts MQTT and HTTP protocols for data communication; the business layer comprises data acquisition business, communication business and wake-up business; the functional module layer comprises an EG800K control module, an OTA module, a history record module, a log module, an AHTX module, a GNSS module, a battery module and a parameter configuration module; the hardware driver layer provides driver support for the hardware interface.
2. The IoT positioning detection fresh food box according to claim 1, characterized in that: The communication module supports multi-mode positioning technology, including GPS positioning, WiFi base station positioning and 4G base station positioning, to achieve seamless positioning switching from outdoor to indoor.
3. The IoT positioning detection fresh food box according to claim 2, characterized in that: The communication module uses the Quectel EG800KCNGC-I03-SGNSA4GCat1 module (1) to communicate with the main control ESP32-C3FH4 through the UART interface. The communication module is equipped with a GNSS antenna (4), a 4G antenna (2) and a SIM card, which are respectively used to receive satellite signals to realize the positioning function and enhance the reception capability of 4G network signals.
4. The IoT positioning detection fresh food box according to claim 3, characterized in that: The temperature and humidity sensor (11) is connected to the main control chip (5) via an IIC interface, and the magnetoresistive sensor (12) and the vibration sensor (13) are connected to the GPIO pins of the main control chip (5) for detecting the switch state of the box.
5. The IoT positioning detection fresh food box according to claim 4, characterized in that: The data acquisition service is responsible for integrating data information from the temperature and humidity sensor (11), the magnetoresistive sensor (12), and the vibration sensor (13) hardware devices, and uniformly managing and pre-processing the collected temperature and humidity, switch box status, and vibration data to provide a basis for subsequent data transmission and processing.
6. The IoT positioning detection fresh food box according to claim 5, characterized in that: The communication service handles communication with the server, including establishing an MQTT connection with the server through the 4G network to realize data reporting and command reception. This business module is responsible for encapsulating and parsing MQTT messages to ensure accurate and efficient transmission of data between the device and the server. At the same time, it also supports HTTP request sending for some specific data interaction scenarios; the wake-up service triggers corresponding operations according to different wake-up sources.
7. The IoT positioning detection fresh food box according to claim 6, characterized in that: The EG800K control module is responsible for interacting with the EG800K4GCat1 module (1) and controlling the module by sending AT commands, including registering the network, detecting the SIM card status, and obtaining the network status. The OTA module is used to implement the over-the-air upgrade function of the device by interacting with the server to check whether there is a new firmware version available for download.
8. The IoT positioning detection fresh food box according to claim 7, characterized in that: The history record module is mainly responsible for recording data that the device fails to send, and the AHTX module is used to drive and process data specifically for the temperature and humidity sensor (11), providing an interface for obtaining temperature and humidity data; the battery module is used to monitor the battery power of the device, read the battery voltage value through the ADC interface, and convert it into intuitive information of the power percentage.
9. The IoT positioning detection fresh food box according to claim 8, characterized in that: The GNSS module is used to cooperate with the GNSS antenna (4) to realize the positioning function of the device; the parameter configuration module is responsible for managing the configuration parameters of the device, such as data reporting interval, heartbeat interval, and server address; and the log module is responsible for recording the operating status of the device, various event information that occurs, and error information that occurs.
10. The IoT positioning detection fresh food box according to claim 9, characterized in that: The hardware driver layer directly interacts with the hardware devices and provides driver support for GPIO, IIC, ADC, and UART hardware interfaces.
Citation Information
Patent Citations
Cold chain ecological temperature and humidity intelligent monitor
CN113295204A
High-voltage cable joint monitoring device
CN114236307A
Intelligent interconnection system based on multiple communication modes
CN120151388A
Robot for data logging pertaining to tampering protection and physical handling of portable server seriously massive storage system
US20190362080A1