Collector module of single-wire pulse counting type communication temperature sensor

By designing a data acquisition module with an interrupt function MCU and a resistor-capacitor reset circuit, the problem of inaccurate pulse count acquisition in a single-wire pulse counting communication temperature sensor under continuous power-on state was solved, and the accurate assessment of the sensor's working status was achieved.

CN224004543UActive Publication Date: 2026-03-17JIANGSU YINHEXIN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing single-wire pulse counting temperature sensors cannot accurately count pulses when continuously powered on, leading to temperature reading errors and degraded system performance.

Method used

Design a data acquisition module for a single-line pulse counting communication temperature sensor. Use an STM8L152K4T6 MCU with interrupt function, combined with an RC reset circuit and external interrupt function, to achieve accurate acquisition of the pulse count.

Benefits of technology

With the sensor continuously powered on, the number of pulses can be accurately and efficiently acquired at any time to assess the sensor's working status, avoiding the problem of inaccurate pulse counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224004543U_ABST
    Figure CN224004543U_ABST
Patent Text Reader

Abstract

The utility model relates to a collector module of a single-wire pulse counting type communication temperature sensor, which comprises an MCU (Microprogrammed Control Unit) with an interruption function and a single-wire pulse counting type communication temperature sensor, a pin 1 of the single-wire pulse counting type communication temperature sensor is connected to a pin 26 of the MCU through a pull-up resistor, and a pin 2 of the single-wire pulse counting type communication temperature sensor is connected to a pin 26 of the MCU through a pull-up resistor. Meanwhile, a pin 1 of the single-wire pulse counting type communication temperature sensor is also connected to a pin 25 of the MCU; the collector module further comprises a power supply interface, a serial port communication interface and a downloading interface, and pins 4 and 5 of the power supply interface, the serial port communication interface and the downloading interface are program downloading interfaces. According to the collector module of the single-wire pulse counting type communication temperature sensor, the power-down reset operation of the single-wire pulse counting type communication temperature sensor can be omitted in the application process of the single-wire pulse counting type communication temperature sensor, and meanwhile it is guaranteed that the number of pulses sent by the sensor can be accurately and efficiently obtained at any time; therefore, the working state of the sensor when the sensor is electrified for a long time is evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to a data acquisition module for a single-line pulse counting communication temperature sensor. Background Technology

[0002] Single-wire pulse counting temperature sensors are widely used due to their simple structure and low cost. These sensors send a set of pulses to the bus at regular intervals after power-on. The number of pulses follows a mathematical relationship with temperature, and the measured temperature can be obtained by converting the number of pulses in each set using a formula. Typically, the sensor needs to be powered off and reset before acquiring temperature data, and then the first set of pulses sent by the sensor is collected. This is not conducive to evaluating the sensor's operating status when powered on for extended periods. Furthermore, the timing of pulse transmission by the sensor while continuously powered on is not controlled by the host computer. Therefore, the host computer's sampling start time may occur during pulse transmission, leading to inaccurate pulse counting, incorrect temperature readings, and consequently, system performance degradation and equipment failure. Summary of the Invention

[0003] To address the above issues, a data acquisition module for a single-wire pulse counting communication temperature sensor was designed. This module can accurately and efficiently acquire the number of pulses sent by the sensor at any given time, provided the sensor is continuously powered on, thereby obtaining the measured temperature.

[0004] The purpose of this utility model is achieved as follows:

[0005] A data acquisition module for a single-wire pulse counting communication temperature sensor includes an MCU with interrupt function, specifically an STM8L152K4T6. Pin 1 of the MCU is a reset pin, used to connect a resistor-capacitor type reset circuit. The resistor-capacitor type reset circuit has a reset button. Pins 4-6, 10-24, and 27-28 of the MCU are connected to pins 1-20 of an LCD segment code screen, respectively. One end of the first decoupling capacitor and the second decoupling capacitor are connected to pins 8 and 9 of the MCU, and the other end is grounded.

[0006] The data acquisition module also includes a single-wire pulse counting communication temperature sensor. Pin 2 of the single-wire pulse counting communication temperature sensor is connected to ground, and pin 1 of the single-wire pulse counting communication temperature sensor is connected to pin 26 of the MCU through a pull-up resistor to power the single-wire pulse counting communication temperature sensor. At the same time, pin 1 of the single-wire pulse counting communication temperature sensor is also connected to pin 25 of the MCU.

[0007] The data acquisition module also includes power supply, serial communication, and download interfaces. Pins 1 and 6 of the power supply, serial communication, and download interfaces are connected to power and ground, respectively. Pins 2 and 3 of the power supply, serial communication, and download interfaces are serial communication pins, which are connected to pins 31 and 30 of the MCU. Pins 4 and 5 of the power supply, serial communication, and download interfaces are program download interfaces.

[0008] Compared with the prior art, the beneficial effects of this utility model are:

[0009] This utility model relates to a data acquisition module for a single-line pulse counting communication temperature sensor. It can eliminate the need for power-off reset during the application of the single-line pulse counting communication temperature sensor, while ensuring that the number of pulses sent by the sensor can be accurately and efficiently acquired at any time, thereby obtaining the measured temperature and evaluating the working status of the sensor when it is powered on for a long time. Attached Figure Description

[0010] Figure 1 This is a circuit diagram of the data acquisition module of a single-wire pulse counting communication temperature sensor according to this utility model.

[0011] Figure 2 This is a pulse signal diagram of the present invention.

[0012] Figure 3 This is a flowchart of the present invention.

[0013] The components include: MCU U1, resistor R2, capacitor C1, reset button K1, LCD segment display U3, first decoupling capacitor C2, second decoupling capacitor C3, single-wire pulse counting communication temperature sensor U2, pull-up resistor R1, power supply, serial communication and download interface P1. Detailed Implementation

[0014] See Figures 1 to 3 This utility model relates to a data acquisition module for a single-wire pulse counting communication temperature sensor, such as... Figure 1 The circuit diagram shown is for this module, which includes an MCU U1 with interrupt functionality. The specific model of MCU U1 is STM8L152K4T6. The STM8L152K4T6 is a low-power 8-bit microcontroller from STMicroelectronics (ST), using an 8-bit STM8 core and featuring a rich instruction set. Its pin 1 is the reset pin, used to connect to a resistor-capacitor (RC) reset circuit consisting of resistor R2 and capacitor C1. The RC reset circuit has a reset button K1. Pins 4-6, 10-24, and 27-28 of MCU U1 are connected to pins 1-20 of the LCD segment display U3, respectively. One end of decoupling capacitors C2 and C3 is connected to pins 8 and 9 of MCU U1, and the other end is grounded.

[0015] The data acquisition module also includes a temperature sensor U2 with single-wire pulse counting communication. Pin 2 of U2 is connected to ground, and pin 1 of U2 is connected to pin 26 of U1 via pull-up resistor R1 to power the sensor U2. At the same time, pin 1 of U2 is also connected to pin 25 of U1 to obtain the pulse count through the interrupt function of the MCU.

[0016] The data acquisition module also includes a power supply, serial communication, and download interface P1. Pins 1 and 6 of P1 are connected to the power supply and ground to power the entire module. The power input range is 2.7V~5.5V. Pins 2 and 3 of P1 are serial communication pins, which are connected to pins 31 and 30 of U1, respectively. This module can communicate with other devices and host computers through these two interfaces. Pins 4 and 5 of P1 are the program download interface.

[0017] The pulse signal of the acquisition module of this single-wire pulse counting communication temperature sensor is as follows: Figure 2 As shown, the temperature sensor U2, using single-wire pulse counting communication, sends a set of pulse signals to the bus every T1 time interval after power-on. The number of pulses follows a mathematical relationship with the measured temperature; by obtaining the number of pulses in each set, the measured temperature can be calculated using a formula. Here, T1 is the data frame time, T2 is the sensor sampling and conversion time, T3 is the pulse communication time, and T4 is the single-pulse high-level time. When the MCU reads data, if the initiation time happens to fall within the T3 time interval, some pulses will be lost, leading to inaccurate pulse counting.

[0018] The flowchart of the data acquisition module of this single-wire pulse counting communication temperature sensor is as follows: Figure 3 As shown, the MCU's external interrupt function accurately acquires the pulse count at any given time. When the MCU captures a pulse signal, it enters an external interrupt service function and increments the pulse count value CNT by 1. When the MCU initiates a temperature read operation, it first enables the MCU's external interrupt function and clears the pulse count value CNT to zero, preparing for the subsequent acquisition of the pulse count.

[0019] Next, the MCU enters loop 1, waiting for the sensor to finish acquiring and converting data. The criterion for this is that the pulse count value CNT > 0. If the MCU initiates the process within the T2 time period, it will continuously check whether CNT is greater than 0 within the timeout period Tout. If it is greater than 0, it means that the sensor has completed the T2 stage and started the T3 stage. Then, the MCU exits loop 1 and enters loop 2. It should be noted that the timeout period Tout is set to prevent the MCU from getting stuck due to an open circuit on the bus. The value of Tout should be greater than T2 and have a certain margin. If the MCU initiates the process within the T3 time period, it will directly exit loop 1 and enter loop 2.

[0020] After the MCU enters Loop 2, it continuously counts the pulses until the sensor finishes transmitting the current pulses. The judgment criterion is that the high-level duration Th > T, where the value range of T is T4 << T << T2. Since the MCU clears the high-level duration Th each time it enters the external interrupt service function, once the MCU detects that the high-level duration Th > T, it indicates that the sensor has completed the current T3 stage and starts to execute the next T2 stage.

[0021] The number of pulses in a group captured by the MCU after executing the above two loops may not be complete. Then the MCU discards this data and clears the pulse count value CNT again. At this time, it can be ensured that the sensor is exactly in the T2 stage. Then it executes Loop 1 and Loop 2 again. After Loop 2 ends, a complete set of data pulse numbers can be obtained. Then the external interrupt function is turned off and the data is returned.

[0022] Whenever the host wants to obtain sensor data at any time after the single-wire pulse counting communication sensor is powered on, performing the above operations once can accurately obtain the number of pulses sent by the sensor, thereby obtaining the measured temperature.

Claims

1. A collector module for a single-wire pulse-counting communication temperature sensor, characterized by The MCU (U1) with an interrupt function is included, and the specific model of the MCU (U1) is STM8L152K4T6; a 1-pin of the MCU (U1) is a reset pin, and is used for being connected with a resistor (R2) and a capacitor (C1) to form a resistor-capacitor reset circuit; the resistor-capacitor reset circuit is provided with a reset button (K1); 4-6 pins, 10-24 pins and 27-28 pins of the MCU (U1) are connected with 1-20 pins of an LCD segment code screen (U3) respectively; one end of a first decoupling capacitor (C2) and a second decoupling capacitor (C3) is connected with 8 and 9 pins of the MCU (U1), and the other end is grounded; The collector module further includes a single-wire pulse counting type temperature sensor (U2); a 2-pin of the single-wire pulse counting type temperature sensor (U2) is connected with the ground; a 1-pin of the single-wire pulse counting type temperature sensor (U2) is connected with a 26-pin of the MCU (U1) through a pull-up resistor (R1), and is used for supplying power for the single-wire pulse counting type temperature sensor (U2); and the 1-pin of the single-wire pulse counting type temperature sensor (U2) is further connected with a 25-pin of the MCU (U1); The collector module further includes a power supply, serial communication and download interface (P1); 1 and 6 pins of the power supply, serial communication and download interface (P1) are connected with a power supply and the ground; 2 and 3 pins of the power supply, serial communication and download interface (P1) are serial communication pins, and are connected with 31 and 30 pins of the MCU (U1) respectively; and 4 and 5 pins of the power supply, serial communication and download interface (P1) are program download interfaces.