With the emergence of single-edge nibble transmission (SENT) signals in the field of automotive sensors, equipping major vehicle manufacturing companies with a set of well-functioning SENT signal acquisition systems has become an essential requirement. At present, we have designed a SENT signal acquisition system to satisfy this requirement and provide a practical option for companies. The acquisition system is based on the SENT J2716 communication protocol. A master control circuit with an STM8AF6213 microcontroller as the core is used to capture the sensor output signal and apply C language programming to realize the decoding of the signal. Finally, the data are processed, extracted, and preserved by the LabVIEW program to achieve the purpose of data visualization. In order to ensure the accuracy of the data, a double Cyclic Redundancy Check (CRC) checksum mode is incorporated into the system. After completion, the system was applied to several sets of SENT signal acquisition and testing experiments, and the experimental results all showed that the system operated normally and could meet the requirements of companies.

With the increasing intelligence of the vehicle, the variety and quantity of in-vehicle sensors have been enriched,1,2 and the large amount of traditional sensors that output analog electrical signals has contributed to a significant growth in the workload of in-vehicle communication networks, while also leading to complex circuit wiring in vehicle control systems and an expansion of electronic elements space; the use of digital signals in in-vehicle sensors is gradually gaining attention. The Society of Automotive Engineers (SAE) has introduced the single-edge nibble transmission signal (SENT signal), which can be used as the output signal of new in-vehicle sensors to mitigate the issues mentioned above to a certain extent. In the process of sensor research and development, a new type of sensor based on the SENT protocol has become the priority of automotive sensor manufacturers in recent years. In the sensor development process, a specialized SENT signal acquisition system is required for performance testing, and in response to this actual market demand, it is essential to design a SENT signal acquisition system that satisfies industrial use standards.

The SENT signal, as a digital pulse signal, can be captured in a variety of ways. The pulse waveform of the SENT signal can be captured by a tabletop or virtual oscilloscope (OSC);3 however, the OSC is expensive and less portable, which does not correspond to the design demands. Microprocessors (MPUs) with an internally integrated SENT signal parsing module can also be used for the SENT signal capture, such as the RH850 and P1x series microcontrollers (MCU).4 However, since the MCU series is not designed specifically for SENT signal capturing, the price is relatively high, and other functions of the superfluous design will be unused, so it is not suitable as the first choice for specialized acquisition systems. Sensor output signal acquisition systems typically employ a combination of software and hardware.5,6 According to the feature that the falling edge of a pulse signal can trigger a timer to interrupt the response, the capture of SENT signals can also be achieved. Based on this principle, this paper designs a SENT signal acquisition system that is up to the standard for business use. The acquisition system fulfills the performance requirements of accuracy and stability, as well as being economical, practical, and portable while enabling data visualization and data export functions.7,8 The design utilizes an MCU as the main control circuit to capture the SENT signal, decodes the captured signal by C program language, then transmits the decoded data to the host computer through universal serial bus (USB) communication technology,9 further analyzes and processes it by combining with LabVIEW program to obtain the coded information carried in the SENT signal, and has the man–machine interaction function.10,11

The SENT signal acquisition system is divided into the analog circuit part responsible for signal acquisition and the LabVIEW program part for processing the signal. Therein, the signal acquisition part includes the main control circuit with the microcontroller as the core, the interface circuit for receiving signals, the USB to serial port circuit, the USB communicator port for supplying power and transmitting data, and the reserved port for backup power input. The signal treatment part is programmed by LabVIEW to realize, screen, and parse the received signals, and then display the real-time output SENT signals on the front screen through the visualization function. Meanwhile, the output data can be exported and stored to provide support for subsequent analysis. The overall structure of this acquisition system is shown in Fig. 1, which can achieve the design requirements in terms of both functionality and practicality.

FIG. 1.

Overall structure of the acquisition system.

FIG. 1.

Overall structure of the acquisition system.

Close modal

The SENT signal is a clock pulse signal, which transmits information by encoding data and pulse period; it does not require any start-up command in the transmission process; once the sensor is powered on, the signal transmitter starts to work and transmits information continuously in packets with a fixed structure. Figure 2 shows the actual output signal of a displacement sensor captured by the virtual OSC, and it can be seen that the output waveform of the SENT signal is a continuous pulse sequence. The SENT signal is measured in clock beats, and the developer can set a 1 tick time ts according to the demands of the target sensor, typically ranging from 3 to 10 µs. A complete SENT signal sequence is also called one frame of packets, as shown in Fig. 3. The synchronization pulse is used for time calibration and positioning; the state and data pulses carry the data information, each of which is 4 bit in size or 1 Nibble. The former constitutes the information DS for the slow channel, and the latter constitutes the information D1D6 for the fast channel; the CRC pulse contains the redundancy checking information DCRC, which is applied to verify whether the six data pulses transmitted by the packet are correct or not; this acquisition system utilizes the two checksum methods in the SENT protocol for data transmission, adding a double CRC verification situated in the microcontroller program and LabVIEW program separately; the pause pulse is an optional segment.

FIG. 2.

SENT signal captured by the virtual OSC.

FIG. 2.

SENT signal captured by the virtual OSC.

Close modal
FIG. 3.

A frame of the complete SENT signal packet.

FIG. 3.

A frame of the complete SENT signal packet.

Close modal

Under the comprehensive consideration of functional requirements and cost control, the STM8A series MCU is selected as the signal receiver, which is an automotive application type MCU produced by ST Microelectronics with two integrated timers that can respond to external interrupts and up to seven pins for external interrupt acquisition, which can be sufficient for regular testing in terms of quantity, and then use the CH340 series chip to establish USB communication with LabVIEW. The USB serial bus, as one of the communication standards for computer buses and peripheral devices, can greatly improve the adaptability of the acquisition system. The main control circuit is shown in Fig. 4. The system adopts a saturated design for the two timers TIM1 and TIM5 in STM8AF6213 and presets seven SENT signal capture interfaces, and the interface circuit is shown in the dotted box in Fig. 4. To ensure the stable operation of the sensor within the normal operating voltage, the circuit is additionally preset with a backup power input interface to prevent the USB supply voltage from failing to work for the sensor.

FIG. 4.

The main control circuit and the interface circuit.

FIG. 4.

The main control circuit and the interface circuit.

Close modal

1. MCU program

The decoding process of the SENT signal is done by the MCU program. Since the two timers TIM1 and TIM5 are configured for seven acquisition channels, it is required to realize the seven-way acquisition by cyclically switching each channel. The seven-way acquisition channels are not in a fully operational state at all times, and the program design is divided into two cases depending on whether there is sensor signal input or not. The program procedure is shown in Fig. 5: When there is an input signal, 23 interrupt responses are completed to enter a decoding program. Since the pause pulse of the previous frame and the synchronization pulse of the next frame are adjacent to each other and their beat sizes are 12–768 ticks and 56 ticks, respectively, there is a possibility that the pulse periods of the pause pulse and the synchronization pulse of adjacent frames are the same; thus, to avoid the packet extraction error caused by this special situation, the decoding program takes 21 pulse periods as one set of original data. When there is no input signal, the timer cannot capture any interrupt, enabling the internal timer TIM6 in STM8AF6213 as a timing clock and adding timeout judgment to avoid the channel being in an endless loop.

FIG. 5.

MCU program produce chart.

FIG. 5.

MCU program produce chart.

Close modal

A flag bit for communication with LabVIEW is added before the data after decoding are complete so that the transmitted data can be interpreted by the upper computer. The naming rule of the flag bit is 71 + AA + acquisition channel number + 08, as shown in the data sequence in Fig. 6.

FIG. 6.

Serial debugging tool.

FIG. 6.

Serial debugging tool.

Close modal

2. Decoding principle

Based on the theoretical tick value ts provided by the target sensor, the theoretical period value TS of the synchronization pulse is obtained from Eq. (1), and the starting synchronization pulse of the packet is located by sequentially comparing the actual received period sequence Tm within a difference of ±20%,
(1)
To avoid the potential errors on the subsequent data decoding, after positioning the first synchronization pulse, the actual beat value tr is obtained from the actual pulse period value Tr of this synchronization pulse according to Eq. (2), and the number of beats Nm of the collected period sequence Tm are calculated sequentially, as shown in Eq. (3),
(2)
(3)

Check Table I to obtain a set of data information sufficient to constitute a complete data packet: status pulse DS, six data pulses D1D6, checksum pulse DCRC, of which the synchronization pulse and pause pulse do not carry the valid information of the sensor and are not analyzed. At this time, the set of data for the CRC checksum is ready; if the checksum passes, then output; if the checksum errors, then re-open the interrupt capture.

TABLE I.

The number of beats corresponds to the data.

NmHexBin
12 0000 
13 0001 
⋯ ⋯ ⋯ 
26 1110 
27 1111 
NmHexBin
12 0000 
13 0001 
⋯ ⋯ ⋯ 
26 1110 
27 1111 

3. CRC checksum

The first CRC checksum is a table look-up method, which is used to exclude packets with errors in the decoding process. The six data pulses of each frame signal are taken to form the array data [Eq. (4)],
(4)
By reviewing the array CRC4_Table given in the SENT protocol, the theoretical value of the checksum pulse is obtained according to the logic demonstrated in the following code, and the checksum is compared with the actual received DCRC value for the purpose of the checksum. The code is as follows:

uint8_t CRC4_Table[16] = {0, 13, 7, 10, 14, 3, 9, 4, 1, 12, 6, 11, 15, 2, 8, 5};

/* len: the length of array data */

uint8_t crc4_cal(uint8_t *data, uint8_t len)

{

uint8_t result = 0x03;

uint8_t tableNo = 0;

int i = 0;

for(; i < len; i++)

{

tableNo = result ^ data[i];

result = CRC4_Table[tableNo];

}

return result;

}

Table II gives seven frames of SENT signal packets output by a pressure sensor under atmospheric pressure operation. It can be seen that the array data consisting of D1D6 obtain a theoretical value after the above CRC checksum procedure and compare it with the actual captured DCRC value to determine whether it is consistent, and if the result is in agreement, it means that the data frame is transmitted correctly.

TABLE II.

CRC checksum instance.

Data packetD1D2D3D4D5D6DCRCCRC checksumT/F
#1 
#2 
#3 
#4 
#5 
#6 
#7 
Data packetD1D2D3D4D5D6DCRCCRC checksumT/F
#1 
#2 
#3 
#4 
#5 
#6 
#7 

4. Serial debugging

Considering the difference in output characteristics of different target sensors, the redundant design is adopted when writing the MCU program, allowing the upper computer to configure the corresponding parameters, such as the theoretical beat value ts and the number of channels open. Using the serial debugging tool, the debugging window is shown in Fig. 6. The adjustable parameters are written to the MCU via the “string input box,” and the writing rules are given in Table III.

TABLE III.

Serial debugging tool parameter writing rules.

Number of stringName of stringInputWriting rules
#01 Communication 70 Used for communication with microcontroller 
#02 Communication 55 Used for communication with microcontroller 
#03 Write/read 01/02 01 for write, 02 for read 
#04 Combination 03 Data combination 
#05 Channel 01–07 Number of open channels: 1–7 
#06 Data 06 6 data pulses 
#07 Clock 03–90 Theoretical tick value ts 
Number of stringName of stringInputWriting rules
#01 Communication 70 Used for communication with microcontroller 
#02 Communication 55 Used for communication with microcontroller 
#03 Write/read 01/02 01 for write, 02 for read 
#04 Combination 03 Data combination 
#05 Channel 01–07 Number of open channels: 1–7 
#06 Data 06 6 data pulses 
#07 Clock 03–90 Theoretical tick value ts 

The decoding process is only done in the microcontroller for the acquired signal, and the output data are still not visualized enough to directly extract the output information of the sensor through the data sequence. After the configuration of the serial communication of the computer, the pre-processed data sequence is read by the VISA function of LabVIEW, and the data information carried in the SENT signal is displayed on the front panel in real time by a series of data visualization functions. The function “Write Delimited Spreadsheet.vi” is adopted to realize the real-time data storage.

The “wait(ms).vi” function is applied to wait for the MCU to send a certain amount of data sequences before data processing, as shown in Fig. 7, to ensure that all channels have multiple frames of data packets when entering the parsing program as backup frames in case of verification errors to avoid unnecessary errors in the main program.

FIG. 7.

Data sequence received in the different scenarios.

FIG. 7.

Data sequence received in the different scenarios.

Close modal

As shown in Fig. 7 (right), in the data sequence received by LabVIEW, there are invalid data and dropped packets of data. The causes and treatment methods for generating these two types of interfering data are as follows: The empty channels with no input signal are given a full 0 value and output normally in the MCU program. When all channels are placed in the open state, such invalid empty data columns will also be transmitted to the upper computer, and they will be excluded from the screening program. If only the data signal of the corresponding acquisition channel is set to be sent in the serial port configuration, there is no such situation (Fig. 7, left). The presence of dropped packet data is caused by the rapid data transfer frequency, and this type of interfering data is eliminated by the CRC checksum.

According to the communication rules established by the MCU program, the while loop function is utilized to compare the characters of the original data column one by one, positioning the flag bit, and extracting the corresponding channel's data information, as shown in Fig. 8. When the number of normally operating acquisition channels is greater than 1, it should wait until all channels have completed data screening before exporting and saving the data synchronously to accomplish the goal of having all channels output the same amount of data. If there is a channel that cannot output a valid value, it will immediately report an error and stop the program from running.

FIG. 8.

Signal screening program.

FIG. 8.

Signal screening program.

Close modal
The second CRC checksum is the modulo-two division and is situated in the signal screening section of the LabVIEW program. For SENT signals, the divisor is drawn from the polynomial G(x) given in the SENT protocol [Eq. (5)], i.e., 11 101,
(5)
The six data pulses D1D6 of each frame signal are assembled as Xdata according to Eq. (6), and X2 (0101B) and X0 (0000B) are added before and after, respectively, that is, a 32-bit divisor X is obtained. The calculation process is shown in Eq. (7), and Fig. 9 illustrates the data combination,
(6)
(7)
FIG. 9.

Schematic diagram of data pulse combination.

FIG. 9.

Schematic diagram of data pulse combination.

Close modal

The theoretical CRC value is calculated using the modulo-two division method, and the calibration purpose is achieved by comparing it with the actual received DCRC value in the original data packet. The implementation process in the LabVIEW program is shown in Fig. 10.

FIG. 10.

CRC checksum procedure for modulo-two division.

FIG. 10.

CRC checksum procedure for modulo-two division.

Close modal
From Table I, it can be seen that a 4-bit size of data can only represent values 0–15, so the quantity of information that can be transmitted by each of the six data pulses output independently is very limited, and developers usually combine the six data pulses to conduct more information according to the output features of the target sensor. Therefore, data processing is required to represent the information transmitted by the sensor, and the array data displayed in Eq. (8) is part of a frame of SENT signal with information,
(8)
There are various combinations of data, taking a common combination as an example: the front and back three data pulses are combined according to Eqs. (9a) and (9b), respectively, and the two new data points S1 and S2 are obtained as the data information output by the sensor,
(9a)
(9b)

The information of the slow channel cannot be read out by a single-frame packet, which is directly outputted here without any processing and subsequently further analyzed by the exported data. The final data after processing are displayed in the “Sensor Output Signal” area on the front panel, which includes three main parts: the selection of the acquisition channel, the valid data packets, and the corresponding output information. The corresponding indicator lights up when the selected channel is working properly. The actual output sensor information includes slow channel data Ds, sensor output data S1, S2, and checksum data DCRC. The design of the front panel of the LabVIEW program is shown in Fig. 11.

FIG. 11.

The design of the front panel of LabVIEW program.

FIG. 11.

The design of the front panel of LabVIEW program.

Close modal

To demonstrate the functionality of the SENT signal acquisition system, two sets of performance tests were performed on a pressure sensor to be used in an automotive engine (Fig. 12), both of which were conducted at ambient temperature (25 °C).

FIG. 12.

Acquisition system test process.

FIG. 12.

Acquisition system test process.

Close modal
The SENT output signal of this pressure sensor contains two data points, and the sum of these two values is a constant of 4095. What is presented in Eqs. (9a) and (9b) is the way to combine the sensor’s output signal. The output property equation is given in Eqs. (10a) and (10b),
(10a)
(10b)

First, the accuracy of the acquisition system was tested. The pressure sensor has a linear pressure sensing range of −3 to 72 bars, and a pressurization test is performed on it, taking one test point every 10 bars in the pressure range of 0–70 bars for a total of seven pressure values. When the given test pressure in the pressurized equipment reaches the set value, the output data are recorded, and the sensor output value of one of the channels is shown in Fig. 13(a), and the output characteristic curve is plotted in Fig. 13(b). Without excluding the accuracy of the sensor, the trends of the two curves overlap completely, the sum of the two data captured at each pressure point is 4095, and the pressure calculated by the output property formula is the same. The pressure value calculated by the output property formula is also the same, so it can be seen that the data are correct and the collection system is free of misleading data and meets the requirements of this design.

FIG. 13.

Pressure sensor output curve–accuracy test: (a) acquisition system output data and (b) pressure sensor output property curve.

FIG. 13.

Pressure sensor output curve–accuracy test: (a) acquisition system output data and (b) pressure sensor output property curve.

Close modal

Then, the stability of the system was tested. The sensor was installed in a stable environment with no additional pressure value applied, and its output signal was collected continuously for 15 days with the signal acquisition system and virtual oscilloscope designed in this paper. The output data of any one of the channels for 1 h continuously are shown in Fig. 14(a). Comparing the acquisition of the virtual oscilloscope in Fig. 14(b), the acquisition system was also stable and error-free during the work, and the acquisition error rate was 0. It is also seen that the stability requirements of the design are met.

FIG. 14.

Pressure sensor output curve–stability test: (a) acquisition system output data and (b) virtual oscilloscope output data.

FIG. 14.

Pressure sensor output curve–stability test: (a) acquisition system output data and (b) virtual oscilloscope output data.

Close modal

The SENT signal acquisition system designed in this paper adopts a combination of hardware circuits and software programs to satisfy the design requirements: (1) the SENT signal is captured by the MCU, which effectively controls the manufacturing cost; (2) the CRC checksum procedure is added to the MCU and LabVIEW programs, respectively, which reduces the false acquisition rate to 0 and realizes the accurate SENT signal acquisition; (3) a time delay function is invoked in the LabVIEW program to avoid system errors caused by transmission issues when data are processed, which ensures that the acquisition system can operate stably for a long period of time; (4) the USB communication makes the acquisition circuit adaptable to any computer for work, which improves portability; (5) the function of communication with the upper computer is added to the MCU program to support real-time adjustment of the corresponding sensor parameters, which enhances the reliability of the system; and (6) the LabVIEW program realizes the storage and export of data, which provides support for the subsequent analysis of the sensor performance.

After its completion, the acquisition system has been applied to a number of test items in the laboratory of a car company and has completed the acquisition tasks of a plurality of long-period experiments. The acquisition system works normally during the test, but there is still room to improve the sampling frequency, and the subsequent improvement work can start from the decoding procedure of the MCU to improve the efficiency of the acquisition system.

The authors have no conflicts to disclose.

Fan Chen: Conceptualization (equal); Data curation (equal); Investigation (equal); Methodology (equal); Resources (equal); Software (equal); Validation (equal); Visualization (equal); Writing – original draft (equal); Writing – review & editing (equal). Ruting Xia: Formal analysis (equal); Funding acquisition (equal); Investigation (equal); Methodology (equal); Project administration (equal); Supervision (equal); Validation (equal).

The data that support the findings of this study are available from the corresponding author upon reasonable request.

1.
X. T.
Ji
, “
Intelligent car into the sensor enterprise layout focus
,”
China Electronics News
(
2021
).
2.
C. Y.
Wu
, “
Application of intelligent sensor technology in automobile
,”
Agric. Mach. Using Maint.
2021
(
08
),
32
33
(
2021
).
3.
Z. J.
Hua
,
F. C.
Huang
,
Z.
Chen
et al, “
A SENT interface design for sluice meter
,”
Ind. Control Comput.
31
(
11
),
26
27
(
2018
).
4.
Z. Q.
Zhou
, “
Automotive SENT protocol decoding and realization
,”
China Integr. Circuit
28
(
04
),
50
52+69
(
2019
).
5.
Q. J.
Wang
,
J. H.
Zhang
,
Q.
Wang
et al, “
Design of resistive type semiconductor gas sensor measurement system based on LabVIEW
,”
Transducer Microsyst. Technol.
37
(
11
),
118
120
(
2018
).
6.
J. M.
Tian
,
C.
Huang
,
L. H.
Ji
et al, “
Design of smart wheel speed sensor test system based on LabVIEW
,”
Electron. Meas. Technol.
45
(
01
),
153
158
(
2022
).
7.
A. L.
Zhang
,
Z. Y.
Shi
,
M. B.
Fan
et al, “
Design of wireless motion sensor node monitoring system based on LabVIEW
,”
Foreign Electron. Meas. Technol.
41
(
01
),
81
86
(
2022
).
8.
G.
Ding
, “
Study on the data acquisition system of displacement sensors based on LabVIEW and serial communication
,”
China Stand.
2019
(
21
),
214
218
(
2019
).
9.
H.
Li
,
Q.
Zhang
, and
S. J.
Hou
, “
Practice of USB protocol analysis in course of ‘computer principles and interface technology
,’”
Exp. Technol. Manage.
38
(
08
),
169
172
+178 (
2021
).
10.
W.
Hou
,
X. J.
Zhang
,
F. N.
Geng
et al, “
Design of real-time monitoring system for soil temperature and humidity based on LabVIEW
,”
Electron. Meas. Technol.
42
(
04
),
141
145
(
2019
).
11.
H.
Zhang
,
J. F.
Xu
, and
B.
Wu
, “
Multi channel wind speed and direction test system based on LabVIEW serial communication
,”
Foreign Electron. Meas. Technol.
39
(
07
),
137
140
(
2020
).