A data monitoring system applied to an electronic cigarette aging cabinet
Patent Information
- Application Number
- CN202610960824.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]鉴于此,本发明提出了一种应用于电子烟老化柜的数据监控系统,旨在解决响应延迟、通信异常或数据帧校验失败时,导致后续采集的数据读取阻塞,影响批量老化测试过程中的数据实时性,且缺少对老化测试过程数据的整理,不利于统计分析和异常追溯的问题
[0015]与现有技术相比,本发明的有益效果在于:通过上位机、多路RS-485数据传输总线、并发轮询线程、数据采集处理模块,使得电子烟老化柜能够在多测试位场景下实现流水线式启动、并发状态轮询、分布式参数采集、本地滤波处理和云端追溯。上位机通过异步发送启动指令使多个数据采集处理模块同步进入测试状态,微控制器明确采集时序采集充电电压、充电电流、工作温度、静态电流和按键电流,并采用去极值滑动平均滤波生成平滑处理后的测试参数,若读取超时或CRC16校验失败,上位机触发超时重发机制并重新发送当前轮询请求,从而避免重复启动造成数据覆盖,边缘计算对平滑处理后的测试参数进行降采样并提取平均温度和最大电流峰值,从而用于云端进行实时监控,提高了批量电子烟老化测试的数据采集效率、测试参数稳定性、通信可靠性和云端追溯能力。
Smart Images

Figure CN122802813A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a data monitoring system for use in electronic cigarette aging cabinets. Background Technology
[0002] Before leaving the factory, e-cigarettes typically undergo aging tests to verify their electrical performance and operational stability under charging, standby, button triggering, and heat-generating conditions. As batch testing equipment, e-cigarette aging cabinets require simultaneous long-term testing of multiple e-cigarette samples. Current data monitoring for these cabinets employs centralized acquisition, with a host computer connected to multiple acquisition boards or test stations via a communication bus. Due to the large number of test stations within the aging cabinet, and the different voltage, current, and temperature acquisition channels for each station, the current host computer often uses single-threaded polling or sequential polling to access data sequentially. When a particular acquisition board experiences response delays, communication anomalies, or data frame verification failures, it can easily lead to data reading blockages in subsequent acquisitions, reducing overall acquisition efficiency and affecting the real-time performance of data during batch aging tests. Furthermore, with the increasing volume of aging test data, local storage is insufficient to meet the needs of production traceability, quality analysis, and remote monitoring. The lack of data organization during the aging test process hinders statistical analysis and anomaly tracing.
[0003] Therefore, it is necessary to design a data monitoring system for electronic cigarette aging cabinets to solve the problems existing in the current technology. Summary of the Invention
[0004] In view of this, the present invention proposes a data monitoring system for electronic cigarette aging cabinets, which aims to solve the problems of response delay, communication abnormality or data frame verification failure, which cause subsequent data reading to be blocked, affecting the real-time data in the batch aging test process, and lacking data organization of the aging test process, which is not conducive to statistical analysis and anomaly tracing.
[0005] This invention proposes a data monitoring system for electronic cigarette aging cabinets, comprising: The host computer is configured to communicate with several data acquisition and processing modules based on a multi-channel RS-485 data transmission bus. The host computer is configured with a concurrent polling thread corresponding to the multi-channel RS-485 data transmission bus. The host computer asynchronously sends a start command to the data acquisition and processing module based on the concurrent polling thread. The data acquisition and processing module includes a microcontroller and a hardware sensor array connected to the microcontroller. After receiving the start command, the microcontroller enters the test state and controls the hardware sensor array to acquire test parameters, and smooths the test parameters based on a moving average filtering algorithm. The host computer polls the status register of the data acquisition and processing module based on the concurrent polling thread. If the test completion status flag is read, the smoothed test parameters are read and uploaded to the cloud. The cloud is configured to record the test parameters of the electronic cigarette aging cabinet after smoothing during the aging test process.
[0006] Furthermore, the data monitoring system applied to the electronic cigarette aging cabinet includes: The multi-channel RS-485 data transmission bus includes several independent RS-485 branches, and each RS-485 branch is connected to the data acquisition and processing module. The host computer is configured with several serial port interfaces, and each concurrent polling thread is bound to one of the serial port interfaces.
[0007] Furthermore, when asynchronously sending a start command to the data acquisition and processing module, the following steps are included: The host computer sends the start command based on the Modbus RTU protocol's write single-coil function code.
[0008] Furthermore, when collecting test parameters, the following are included: The timing sequence for collecting the test parameters is as follows: charging voltage, charging current, operating temperature, quiescent current, and button current. When collecting the quiescent current, the microampere-level current is amplified by an instrumentation amplifier and converted from analog to digital. When collecting the button current, the analog button-pressed level signal is output and the power consumption current is collected simultaneously.
[0009] Furthermore, when smoothing the test parameters based on the moving average filtering algorithm, the following steps are included: N data points are continuously collected within the sampling window, and the maximum and minimum values are removed. The arithmetic mean of the remaining N-2 data points is calculated, and the arithmetic mean is used as the smoothed test parameter for the current period.
[0010] Furthermore, when polling the status register of the data acquisition and processing module based on the concurrent polling thread, the following steps are included: Polling is performed based on the function code of the Modbus RTU protocol. If the read times out or the CRC16 check fails, the host computer triggers the timeout retransmission mechanism and resends the current polling request.
[0011] Furthermore, the host computer is also configured to compare the smoothed test parameters with a standard parameter threshold, determine the number of tests exceeding the standard parameter threshold, determine the test deviation rate based on the ratio of the number of tests to the total number of smoothed test parameters, generate a test report based on the deviation rate, and send it to the cloud.
[0012] Furthermore, after receiving the start command, the microcontroller starts a timer. When the timer reaches the aging test cycle and all data acquisitions are completed, the microcontroller generates the test completion status identifier.
[0013] Furthermore, the data monitoring system applied to the electronic cigarette aging cabinet also includes: An edge computing gateway, which is connected to the host computer and the cloud; The edge computing gateway is configured to receive smoothed test parameters uploaded by the host computer, downsample the test parameters, extract the maximum current peak value from the downsampled charging current, static current and button current, use the average temperature and the maximum current peak value as feature data, and encrypt and report the feature data to the cloud via the MQTT IoT protocol.
[0014] Furthermore, when uploading the smoothed test parameters to the cloud, the process includes: When the host computer reads the smoothed test parameters, it generates a test data table and uploads it to the cloud.
[0015] Compared with existing technologies, the advantages of this invention are as follows: Through a host computer, a multi-channel RS-485 data transmission bus, concurrent polling threads, and a data acquisition and processing module, the electronic cigarette aging cabinet can achieve pipelined startup, concurrent status polling, distributed parameter acquisition, local filtering, and cloud traceability in multi-test-position scenarios. The host computer asynchronously sends a startup command to synchronize multiple data acquisition and processing modules into the test state. The microcontroller explicitly acquires charging voltage, charging current, operating temperature, static current, and button current in the specified timing sequence, and uses extreme value removal and moving average filtering to generate smoothed test parameters. If a read times out or CRC16 check fails, the host computer triggers a timeout retransmission mechanism and resends the current polling request, thereby avoiding data overwriting caused by repeated startups. Edge computing downsamples the smoothed test parameters and extracts the average temperature and maximum current peak value for real-time monitoring in the cloud, improving the data acquisition efficiency, test parameter stability, communication reliability, and cloud traceability capabilities of batch electronic cigarette aging tests. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a functional block diagram of a data monitoring system for an electronic cigarette aging cabinet, provided as an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] See Figure 1 As shown in some embodiments of this application, a data monitoring system applied to an electronic cigarette aging cabinet includes: The host computer is configured to communicate with several data acquisition and processing modules based on a multi-channel RS-485 data transmission bus. The host computer is configured with a concurrent polling thread corresponding to the multi-channel RS-485 data transmission bus. The host computer asynchronously sends start commands to the data acquisition and processing modules based on the concurrent polling thread. The data acquisition and processing module includes a microcontroller and a hardware sensor array connected to the microcontroller. After receiving the start command, the microcontroller enters the test state and controls the hardware sensor array to acquire test parameters. The test parameters are smoothed based on the moving average filtering algorithm. The host computer polls the status register of the data acquisition and processing module using a concurrent polling thread. If the test completion status flag is read, the smoothed test parameters are read and uploaded to the cloud. The cloud is configured to record test parameters after smoothing during the aging test of the e-cigarette aging cabinet.
[0021] Specifically, the electronic cigarette aging cabinet in this embodiment is used for batch testing of battery components, atomization components, control boards, and PCBA boards. The aging test involves placing the electronic cigarette or circuit board under test in charging, standby, simulated button triggering, or simulated operating states within a set test cycle, and continuously or periodically collecting its electrical and temperature parameters to determine whether the product under test exhibits abnormal charging, power consumption, temperature rise, static leakage, or button triggering power consumption. The electronic cigarette aging cabinet typically includes multiple test layers, each with multiple test positions, each corresponding to one product under test or a group of products under test. Each test position is equipped with a data acquisition and processing module, which receives test control commands from the host computer and locally completes the acquisition of test parameters, filtering, status register updates, and test data caching for the corresponding test position.
[0022] Each data acquisition and processing module has a unique communication address, which serves as the slave address in Modbus RTU communication, enabling the host computer to accurately distinguish between different data acquisition and processing modules. The communication address can be determined via a DIP switch, configuration programming, or a host computer configuration file. The multi-channel RS-485 data transmission bus comprises several independent RS-485 branches. Each RS-485 branch can connect to at least one data acquisition and processing module, preferably multiple modules with different slave addresses. The host computer is configured with several serial ports, each communicating with its corresponding data acquisition and processing module via an RS-485 branch. Each concurrent polling thread is bound to a serial port, allowing polling tasks on different RS-485 branches to execute in parallel, while data acquisition and processing modules within the same RS-485 branch poll according to their slave address order or the order configured by the host computer. Since the RS-485 bus typically allows only one master station to complete one frame of communication with one slave station at a time, this embodiment does not send data frames to multiple slave stations simultaneously within the same RS-485 tributary. Instead, it achieves tributary-level parallelism through multiple independent RS-485 tributaries and multiple concurrent polling threads, and achieves efficient scheduling through pipelined startup and status polling within the same tributary.
[0023] When a single aging cabinet includes multiple test layers, each test layer corresponds to one RS-485 tributary. For example, a single aging cabinet can be configured with ten test layers, each test layer with eight test bits, and each test bit corresponding to a data acquisition and processing module. Therefore, a single aging cabinet has a total of eighty data acquisition and processing modules. Each concurrent polling thread is bound to a serial port interface and independently maintains the transmit queue and receive buffer on the corresponding RS-485 tributary. Even if a data acquisition and processing module on a certain RS-485 tributary experiences a communication delay, it will not block the startup, status reading, and data reading of data acquisition and processing modules on other RS-485 tributaries, thereby reducing the impact of a single tributary failure on the overall cabinet testing efficiency.
[0024] Asynchronous start command sending means that after the host computer sends a start command to a data acquisition and processing module, it does not wait for that module to complete the entire aging test cycle. Instead, after receiving a start confirmation message or completing the start frame transmission, it continues to send start commands to the next data acquisition and processing module within the same RS-485 tributary, allowing different data acquisition and processing modules to enter the test state in parallel under the control of their respective microcontrollers. Therefore, the test time of a single data acquisition and processing module will not become a blocking factor for other data acquisition and processing modules to begin testing. Compared to the method of starting sequentially, waiting for the test to complete, and then starting the next module, this embodiment enables multiple data acquisition and processing modules to be tested simultaneously within the same aging test cycle, with the host computer polling the status of each module in the background.
[0025] The host computer sends a start command based on the Modbus RTU protocol's write-single-coil function code. The start command data frame includes the slave address, write-single-coil function code, start coil address, start write value, and CRC16 checksum. The start coil address represents the start control bit within the data acquisition and processing module, and the start write value represents the start test. After sending the start command, the host computer verifies the function code, coil address, and CRC16 checksum. If verification is successful, the microcontroller writes the start control bit to a valid state and updates its status register from idle to test execution state. If verification fails, the microcontroller does not enter the test state and retains its original status register.
[0026] The data acquisition and processing module includes a microcontroller and a hardware sensor array connected to the microcontroller. The hardware sensor array is used to acquire test parameters during the e-cigarette aging test, including charging voltage, charging current, operating temperature, quiescent current, and button current. Depending on the actual aging test requirements, test parameters may also include battery voltage, output voltage, atomizing load current, charging cut-off current, ambient temperature, humidity inside the aging chamber, gas pressure, or other parameters related to the e-cigarette aging test. The hardware sensor array includes a voltage sampling circuit, a current sampling circuit, a temperature sensor, an instrumentation amplifier, an analog switch, an electronic load interface, a button simulation circuit, and an analog-to-digital converter circuit.
[0027] When collecting test parameters, the microcontroller sequentially collects charging voltage, charging current, operating temperature, quiescent current, and button current according to the acquisition sequence. When collecting charging voltage and charging current, the microcontroller controls the charging circuit to connect, putting the e-cigarette under test into a charging state. After the charging state stabilizes, the microcontroller collects the charging voltage and charging current. The charging voltage is sampled through a resistor divider and then input to the analog-to-digital converter (ADC). The charging current is converted into a voltage signal through a sampling resistor, Hall effect current sensor, or current detection chip and then input to the ADC. The operating temperature is determined by a thermistor, digital temperature sensor, thermocouple, or other temperature acquisition device. The temperature sensor is placed near the heating area of the e-cigarette under test or at a temperature measurement location specified for the aging test. When collecting the operating temperature, the microcontroller reads the digital or analog output from the temperature sensor and converts it into the corresponding temperature value.
[0028] When acquiring quiescent current, the microcontroller controls the tested electronic cigarette or PCBA to disconnect its charging circuit and maintain it in standby mode. Since quiescent current is typically in the microampere or low milliampere range, the signal amplitude is small and easily affected by sampling resistor thermal noise, line contact resistance, and analog-to-digital conversion quantization errors. Therefore, an instrumentation amplifier amplifies the voltage signal corresponding to the microampere current and inputs the amplified voltage signal into the analog-to-digital conversion circuit. The gain of the instrumentation amplifier can be determined based on the quiescent current range, ensuring that the output voltage corresponding to the normal quiescent current range falls within the range of the analog-to-digital conversion circuit. If multiple quiescent current ranges exist, the sampling resistor or amplification factor can be switched via an analog switch to avoid transient effects on the sampling results.
[0029] When collecting button current data, the microcontroller outputs a simulated button press level signal and simultaneously collects the power consumption current. The simulated button press level signal can be implemented through a general-purpose input / output port. If the e-cigarette under test uses a low-level trigger mode, the microcontroller outputs a low level; if it uses a high-level trigger mode, the microcontroller outputs a high level. After the button trigger signal is output, the microcontroller collects the power consumption current and releases the button trigger signal after collection, restoring the e-cigarette to its default state. By simultaneously outputting a simulated button level signal while collecting the button current, it ensures that the button current corresponds to the actual trigger state, rather than the current value in standby or charging states.
[0030] When acquiring test parameters, the microcontroller switches between corresponding test states based on the object being sampled. Specifically, sampling charging voltage and charging current constitutes a charging test state, sampling static current constitutes a standby test state, and sampling button current constitutes a button-triggered test state. After each state switch, the microcontroller waits for a preset stabilization time before starting the sampling window. The stabilization time is used to eliminate transient interference caused by relay activation, analog switch conduction, power circuit switching, current surges, and sensor response delays. The stabilization time can be set according to the type of test parameter. For example, the stabilization time for charging voltage and charging current can be 50ms to 300ms, the stabilization time for static current can be 100ms to 1000ms, and the stabilization time for button current can be 50ms to 500ms. Adjustments can be made based on the actual response time for different e-cigarette specifications, sampling circuits, and test cycles.
[0031] The microcontroller smooths the test parameters using a moving average filtering algorithm. Specifically, it continuously collects N data points within a sampling window, removes the maximum and minimum values, calculates the arithmetic mean of the remaining N-2 data points, and uses this arithmetic mean as the smoothed test parameter for the current cycle. A data point refers to multiple raw instantaneous sampled values continuously collected within the same sampling window for a given test parameter. For example, when collecting charging voltage, the N data points are N consecutively collected charging voltage samples; when collecting charging current, the N data points are N consecutively collected charging current samples. Here, N is an integer greater than or equal to 5. When N is less than 5, the remaining data points after removing the maximum and minimum values are too few, making it difficult to effectively reflect the stability level within the sampling window. When N is too large, it prolongs the sampling time for a single parameter, affecting the overall testing cycle of the aging chamber. Therefore, in voltage, current, and temperature sampling, N is set to 5 to 25, while in sampling weak signals such as static current, N can be set to 10 to 50. The specific value can be determined based on the aging test cycle.
[0032] The microcontroller collects N data points within the current sampling window and stores these N raw data points in a temporary sampling buffer. After sampling, it searches for the maximum and minimum values in the temporary sampling buffer and removes them from the current average calculation. If multiple identical maximum or minimum values exist, only one maximum and one minimum value are removed. The remaining N-2 data points are summed and their arithmetic mean is calculated. Finally, this arithmetic mean is written into the data register of the corresponding test parameter and used as the smoothed test parameter for the current cycle. This embodiment uses a moving average filter after removing extreme values, instead of directly averaging all data points, because short-term anomalies such as power ripple, switching transients, contact jitter, sensor noise, and communication interference may exist in the electronic cigarette aging test environment. A single peak or trough value can easily skew the average result. By removing the maximum and minimum values, the influence of isolated outliers on the test results can be suppressed without increasing the data calculation complexity.
[0033] The aging test cycle is the time from when the data acquisition and processing module enters the test state to when it completes one aging test task. The aging test cycle can be written into the configuration register of the data acquisition and processing module by the host computer before sending the start command, or it can be issued by the host computer based on the test batch, product model, or test plan. After the microcontroller enters the test state, it updates the status register to the test execution state. The microcontroller then sequentially executes charging voltage acquisition, charging current acquisition, operating temperature acquisition, static current acquisition, and button current acquisition. When the timer reaches the aging test cycle, and all test parameters within the current sampling cycle have been acquired and smoothed, the microcontroller generates a test completion status flag. If a sampling item is being executed when the timer reaches the aging test cycle, the microcontroller first completes that sampling item and its filtering processing before generating the test completion status flag to avoid incomplete data in the last sampling cycle. When the host computer reads the status register, it can identify not only the test completion status flag but also the test execution state, thus distinguishing and processing different situations.
[0034] The host computer uses concurrent polling threads to poll the status registers of the data acquisition and processing modules. Each concurrent polling thread is responsible for polling all data acquisition and processing modules within the RS-485 tributary corresponding to a serial interface. After the thread starts, it polls each data acquisition and processing module in the order of slave addresses, that is, using the Modbus RTU protocol's read holding register function code. If a timeout, CRC16 check failure, or data segment loss occurs during the read process, the host computer resends the current polling request instead of resending the start command. This avoids the risk of data acquisition and processing modules repeatedly starting, test timers being cleared, or acquired data being overwritten due to communication anomalies during the status polling process. To further avoid communication anomalies blocking the bus, this embodiment uses a skip mechanism for the concurrent polling threads. When a data acquisition and processing module experiences consecutive communication failures reaching a preset retransmission threshold, the thread no longer waits for that module in the current polling cycle, but marks it as a communication anomaly and continues polling the next data acquisition and processing module on the same RS-485 tributary. In the next polling cycle, the thread can try to read the status register of the anomaly module again. If the faulty module recovers its response, the communication fault flag is cleared and the test continues. If it fails to respond for several consecutive polling cycles, the host computer can display the communication fault of the test bit on the interface, ensuring that the communication fault of a single module will not cause other modules in the same branch to be blocked for a long time, nor will it affect the parallel polling of other RS-485 branches.
[0035] Standard parameter thresholds are pre-set acceptable ranges for different e-cigarette models, test items, and test conditions. Standard parameter thresholds may include upper and lower limits for charging voltage, charging current, operating temperature, quiescent current, and button current. These thresholds can be determined by product specifications, test process documents, or quality standards and are bound to the e-cigarette product model in the host computer configuration interface. During comparison, the host computer uses smoothed test parameters read within the same test cycle as the comparison object. The total number of test parameters participating in the comparison is the number of test parameters included in the threshold comparison.
[0036] For example, if a test station completes 10 sampling cycles within an aging test period, with each sampling cycle including five test parameters: charging voltage, charging current, operating temperature, quiescent current, and button current, then the total number of test parameters involved in the comparison is 50. If two operating temperature values exceed the upper limit, one quiescent current value exceeds the upper limit, and one button current value is below the lower limit, then the number of tests is 4, and the test deviation rate is 4 / 50, or 8%. The test deviation rate characterizes the degree of abnormality of the test station in this aging test. A test report is generated based on the test deviation rate, including the aging cabinet number, test layer number, test station number, and test deviation rate. After generating the test report, it is sent to the cloud. Through the test report, the test data can be traced, allowing production personnel to query historical data based on the aging cabinet number and test station number.
[0037] An edge computing gateway is an industrial gateway, embedded gateway, or edge server with network communication capabilities installed at the aging cabinet site. The edge computing gateway communicates with the host computer via Ethernet, serial port, USB, or LAN, and with the cloud via wired network, wireless network, or dedicated IoT network. To avoid conflicts of responsibility between direct data uploads from the host computer and feature data uploads from the edge computing gateway, this embodiment divides the upload path into a data upload path and a feature data upload path. The data upload path is used to upload test data tables and test reports, facilitating traceability and quality auditing in the cloud. The feature data upload path is used to upload downsampled features, facilitating real-time monitoring and batch statistics in the cloud.
[0038] When the edge computing gateway performs downsampling, it groups the smoothed test parameters according to a preset downsampling time window. The downsampling time window can be set to 1 minute, 2 minutes, or 3 minutes, which can be adjusted according to network bandwidth. For multiple operating temperature values of the same test position within the same downsampling time window, the edge computing gateway calculates their arithmetic mean and uses it as the average temperature. For charging current, quiescent current, and button current within the same downsampling time window, the edge computing gateway reads the corresponding smoothed current values and extracts the maximum value from these current values as the maximum current peak. In this embodiment, to reduce the amount of real-time monitoring data in the cloud, the average temperature and the maximum current peak are preferably used as feature data. The average temperature is used to reflect the temperature rise status of the test position of the product under test or the aging cabinet, and the maximum current peak is used to reflect the risk of abnormal current surges or abnormal power consumption.
[0039] When the host computer reads the smoothed test parameters, it generates a test data table and uploads it to the cloud. The test data table is organized by test position as rows and test parameters as columns to distinguish different products under test. Test parameters in the table are preferably expressed in engineering units; for example, charging voltage is expressed in volts, charging current, quiescent current, and button current in milliamps or microamps, and operating temperature in degrees Celsius. The test data table is read and written using a pipelined testing method, meaning that after the first e-cigarette completes data acquisition and smoothing for charging voltage, charging current, operating temperature, quiescent current, and button current, subsequent e-cigarettes are recorded sequentially.
[0040] In one specific embodiment, a single electronic cigarette aging cabinet includes ten test layers, each with eight test positions, totaling eighty test positions. Each test position corresponds to a data acquisition and processing module, and each data acquisition and processing module is configured with a unique slave address. Each serial port interface corresponds to an RS-485 branch, and each RS-485 branch connects to eight data acquisition and processing modules. After the host computer starts the test batch, it starts ten concurrent polling threads for each of the ten RS-485 branches. Each thread first sends a start command sequentially according to the slave address order, causing the eight data acquisition and processing modules on the same branch to enter the test state sequentially. Different threads execute in parallel, so that all eighty data acquisition and processing modules in the entire cabinet enter the test state in a short time. After the start command is sent, each thread enters the status polling phase, reading the status register according to the slave address order.
[0041] In this embodiment, the aging test cycle is set to 30 minutes, and the sampling cycle is set to 1 minute. Within each sampling cycle, the microcontroller sequentially collects charging voltage, charging current, operating temperature, quiescent current, and button current. Before collecting charging voltage and charging current, the microcontroller connects the charging circuit and waits for 200ms; before collecting quiescent current, the microcontroller disconnects the charging circuit and waits for 500ms; during button current collection, the microcontroller outputs a simulated low-level button signal and waits for 100ms before collecting the power consumption current, releasing the button after collection. For charging voltage, charging current, operating temperature, and button current, the sampling window N is 10; for quiescent current, the sampling window N is 20. Within each sampling window, the microcontroller continuously collects N data points, removes the maximum and minimum values, calculates the average value of the remaining data points, and writes this average value into the corresponding data register.
[0042] The standard parameter thresholds are set as follows: the acceptable range for charging voltage is 4.8V to 5.2V, the acceptable range for charging current is 80mA to 500mA, the upper limit for operating temperature is 60℃, the upper limit for static current is 50μA, and the acceptable range for button current is 100mA to 800mA. For a single test position, 150 valid test parameters are obtained in 30 sampling cycles. Among these, one operating temperature value exceeds 60℃, two static current values exceed 50μA, and one button current value is below 100mA. Therefore, the number of tests is 4, the total number of test parameters participating in the comparison is 150, and the test deviation rate is 2.67%. After the test batch is completed, the host computer generates a test data table based on the test data from eighty test positions. The test data table includes the charging voltage, charging current, operating temperature, static current, and button current for each test position. The host computer saves this test data table locally and uploads it to the cloud. Meanwhile, the edge computing gateway downsamples the smoothed test parameters sent by the host computer in 5-minute downsampling windows, calculates the average temperature of each test position within each 5-minute window, and extracts the maximum current peak from the charging current, quiescent current, and button current within that window. The edge computing gateway then encrypts and reports the average temperature and maximum current peak to the cloud via the MQTT IoT protocol, enabling administrators to trace and analyze the test parameters.
[0043] In summary, through a host computer, a multi-channel RS-485 data transmission bus, concurrent polling threads, and data acquisition and processing modules, the e-cigarette aging cabinet enables pipelined startup, concurrent status polling, distributed parameter acquisition, local filtering, and cloud traceability in multi-test-position scenarios. The host computer asynchronously sends startup commands to synchronize multiple data acquisition and processing modules into the test state. The microcontroller explicitly acquires charging voltage, charging current, operating temperature, static current, and button current in the specified timing sequence, and uses extreme value removal and moving average filtering to generate smoothed test parameters. If a read times out or CRC16 check fails, the host computer triggers a timeout retransmission mechanism and resends the current polling request, thus avoiding data overwriting caused by repeated startups. Edge computing downsamples the smoothed test parameters and extracts the average temperature and maximum current peak value for real-time monitoring in the cloud. This improves the data acquisition efficiency, test parameter stability, communication reliability, and cloud traceability capabilities of batch e-cigarette aging tests.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A data monitoring system for electronic cigarette aging cabinets, characterized in that, include: The host computer is configured to communicate with several data acquisition and processing modules based on a multi-channel RS-485 data transmission bus. The host computer is configured with a concurrent polling thread corresponding to the multi-channel RS-485 data transmission bus. The host computer asynchronously sends a start command to the data acquisition and processing module based on the concurrent polling thread. The data acquisition and processing module includes a microcontroller and a hardware sensor array connected to the microcontroller. After receiving the start command, the microcontroller enters the test state and controls the hardware sensor array to acquire test parameters, and smooths the test parameters based on a moving average filtering algorithm. The host computer polls the status register of the data acquisition and processing module based on the concurrent polling thread. If the test completion status flag is read, the smoothed test parameters are read and uploaded to the cloud. The cloud is configured to record the test parameters of the electronic cigarette aging cabinet after smoothing during the aging test process.
2. The data monitoring system for electronic cigarette aging cabinets according to claim 1, characterized in that, include: The multi-channel RS-485 data transmission bus includes several independent RS-485 branches, and each RS-485 branch is connected to the data acquisition and processing module. The host computer is configured with several serial port interfaces, and each concurrent polling thread is bound to one of the serial port interfaces.
3. The data monitoring system for electronic cigarette aging cabinets according to claim 2, characterized in that, When asynchronously sending a start command to the data acquisition and processing module, the following is included: The host computer sends the start command based on the Modbus RTU protocol's write single-coil function code.
4. The data monitoring system for electronic cigarette aging cabinets according to claim 3, characterized in that, When collecting test parameters, the following should be included: The timing sequence for collecting the test parameters is as follows: charging voltage, charging current, operating temperature, quiescent current, and button current. When collecting the quiescent current, the microampere-level current is amplified by an instrumentation amplifier and converted from analog to digital. When collecting the button current, the analog button-pressed level signal is output and the power consumption current is collected simultaneously.
5. The data monitoring system for electronic cigarette aging cabinets according to claim 4, characterized in that, When smoothing the test parameters based on the moving average filtering algorithm, the following steps are included: N data points are continuously collected within the sampling window, and the maximum and minimum values are removed. The arithmetic mean of the remaining N-2 data points is calculated, and the arithmetic mean is used as the smoothed test parameter for the current period.
6. The data monitoring system for electronic cigarette aging cabinets according to claim 5, characterized in that, When polling the status register of the data acquisition and processing module based on the concurrent polling thread, the following is included: Polling is performed based on the function code of the Modbus RTU protocol. If the read times out or the CRC16 check fails, the host computer triggers the timeout retransmission mechanism and resends the current polling request.
7. The data monitoring system for electronic cigarette aging cabinets according to claim 6, characterized in that, The host computer is also configured to compare the smoothed test parameters with a standard parameter threshold, determine the number of tests exceeding the standard parameter threshold, determine the test deviation rate based on the ratio of the number of tests to the total number of smoothed test parameters, generate a test report based on the deviation rate, and send it to the cloud.
8. The data monitoring system for electronic cigarette aging cabinets according to claim 7, characterized in that, After receiving the start command, the microcontroller starts a timer. When the timer reaches the aging test cycle and all data acquisitions are completed, the microcontroller generates a test completion status identifier.
9. The data monitoring system for electronic cigarette aging cabinets according to claim 8, characterized in that, Also includes: An edge computing gateway, which is connected to the host computer and the cloud; The edge computing gateway is configured to receive smoothed test parameters uploaded by the host computer, downsample the test parameters, extract the maximum current peak value from the downsampled charging current, static current and button current, use the average temperature and the maximum current peak value as feature data, and encrypt and report the feature data to the cloud via the MQTT IoT protocol.
10. The data monitoring system for electronic cigarette aging cabinets according to claim 9, characterized in that, When uploading the smoothed test parameters to the cloud, the following steps are included: When the host computer reads the smoothed test parameters, it generates a test data table and uploads it to the cloud.