当前位置:网站首页>Deep discussion on the decoding of sent protocol
Deep discussion on the decoding of sent protocol
2022-07-05 12:14:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
author :Ben
In the course of work , I have the opportunity to carefully study some of the latest sensor technologies in modern vehicles . Although these special sensors have existed for some time , however SENT Technology is increasingly appearing in vehicles . In the auto forum , I find that the problems and discussions about using these sensors have increased . These phenomena urge me to study how to use Hongke Pico The oscilloscope obtains as much information as possible from these sensors .
I won't be here SENT Spend too much time on the agreement , Because there are a lot of information about how the protocol works on the network . however , I will briefly introduce this network .
SENT Represents unilateral half byte transmission , And follow J2716 standard . It is low-cost and one-way ( Only one direction ), This means that the sensor can only send data .SENT The difference between sensors and other sensors is , Through a wire “ send out ” Multiple data . for example , One SENT The sensor can use a wire to send pressure and temperature measurements at the same time . This makes it cheap , And reduces cabling requirements , And this is what manufacturers have always wanted to do . This means that you are likely to see MAF The sensor has only three wires , When measurement is needed , There will be one. 5V power cord , One GND And a signal line .
As mentioned above ,SENT Multiple data can be transferred , It can be achieved by FAST From the message “ Half byte ” establish SLOW Message to achieve this . To establish a SLOW news , It requires multiple FAST news . The important point here is , have access to PicoScope 6 Automotive The serial decoding function in the software decodes these two messages .
that ,SENT What does a packet look like ?
chart 1
Pictured 1 Shown ,SENT The packet is easily mistaken for a pulse width modulated signal (PWM), This is because its voltage is 0-5V, The work cycle is constantly changing . You may also notice in this article ,SENT There seems to be a reversal signal . It was not intentional , This is just another feature of the sending protocol , The polarity of the signal can be changed , But the data remains the same .
chart 2
I will introduce how to set the parameters of the decoder , But in order for everyone to see SLOW How signals are formed , I have already set up the decoder in advance . From the figure 2 so , Form a SLOW The message needs several FAST Data packets . Please pay attention to this , because SLOW Messages contain very useful information about the sensor . But notice , To ensure that you collect all the data , It usually takes long enough to capture the signal waveform . If we continue to use the waveform above , The most practical way is to start with SLOW The decoder starts .
chart 3
Click Tools > Serial decoding > establish > SENT Slow
I suggest you start with SLOW The reason why the message started is , Usually you can find information about sensors in this data , This is the setup SENT Fast Necessary for the decoder , For example, the type of Sensor . In order to complete the decoding , The software will automatically set the threshold and hysteresis according to the selected channel . You will notice that the signal is not “ The perfect ” The signal , There is some interference . You can use the low-pass filter in the channel options to “ eliminate ” interference signal , I find 300 kHz The filtering effect of is very good . You can also customize the setting of voltage threshold and hysteresis , The following settings are completed after the low-pass filter is activated , The voltage threshold can be set to 3 V, The minimum hysteresis is set to 40mv( chart 4). After completion , single click “ determine ” And make sure to click again “ determine ” Check the decoder before ( chart 5). Some readable data will be generated at the bottom of the waveform . Unfortunately , We still lack some other sensor information . If you capture more time on the screen , We can get more information about the sensor , This also means that we can create more accurately SENT Fast Decoder .
chart 4
chart 5
We could have continued this capture and guessed the type of Sensor , But it takes longer capture time to decode it with other information . Pictured 6 Shown , I applied it to the captured waveform Slow Decoder , The sensor is EGR Pressure sensor in cooler , Capture fast when the engine starts WOT Test signal .
chart 6
The more packets , The more chance we have to find in SLOW Some other information transmitted in the signal . chart 6 pass the civil examinations 8 Packets are the packets we are interested in , As you can see , It gives us information about the type of sensor . Set up FAST When the decoder , One thing is very important , We can see that pressure can be selected among sensor types / Safety sensor ( chart 8). But other data are equally important , Especially the manufacturer's code ( chart 7). news ID It can be used to determine which manufacturer made the sensor , Can be in Internet Do a quick search on , The following is a list of what I have found so far , For reference only :
chart 7
Let's go back to PicoScope 6 Software , chart 8 in A The channel blue waveform is measured on the signal line of the fuel rail high pressure sensor , The sensor passes through SENT towards ECU Sending signal . In serial decoding , We choose... From the list SENT FAST, Then configure the parameters ( chart 8).
chart 8
You will find it important for us to know the type of Sensor , You can select a specific sensor type from the list ( chart 8), Here we know from an early time that it is pressure / Safety sensor . I won't introduce this too much , Because this is not the purpose of this article , It is important that the format of the data field changes according to the type of Sensor .PicoScope Allows you to start from the standard J2716 Select the desired format type from the list .
chart 9
Pictured 9 Shown , The decoding table also contains Slow data and Fast data. To switch between the two , Please click the tab of each table at the bottom of the screen , It shows SENT Slow and SENT Fast The label of . In order to better understand the function of the sensor , The next step is to use PicoScope Export function in . In the decoding table , Make sure... Is selected “SENT Fast ” tab , And only view the decoding data of the current buffer , And then click “ export ”( chart 10). Then save the file in an easy to find location , Find the saved file , And in Excel Open it in .
chart 10
chart 11 Exported is EGR Pressure sensor in cooler SENT Fast Decoded data , You will see PicoScope Decoding table of , However, further data processing is still needed .
chart 11
So much data seems a little complicated , But we will do some very simple operations in a familiar way to visualize the working condition of the sensor .SENT The packets of messages will be split according to the type of Sensor , Mark them as channels 1 And channel 2. chart 12 It's an example , This is explained in more detail .
chart 12
stay PicoScope Application in SENT Fast Serial decoder , Will tell the software how to segment data . In the figure 12 in , Common even number splitting of data fields , Split into channels 1 Of 12 Bits and channels 2 Of 12 position . We know that PicoScope The type of sensor viewed in is pressure / Safety sensor . according to J2716 standard , Knowable channel 1 Pressure data is stored on . return Excel On the worksheet , We can visualize data by creating charts , Select the channel ch1 Column D( chart 13).
chart 13
After selecting data , single click “ Insert ” And find “ Broken line diagram ” Options , Pictured 14 Sum graph 15.
chart 14
chart 15
Now we have from SENT A graphical image of the data captured by the sensor . We can enlarge the figure , Selecting the data source and modifying the range can focus the graph on the data area we want to focus on . In the figure 16 Sum graph 17 in , I choose to view D5625 and D12140 Data between .
chart 16
chart 17
In the figure 18 in , I modify the data range to D5625 and D6625 Between , The image is somewhat similar to the exhaust pulsation waveform .
chart 18
chart 19 It's right MAF sensor SENT Fast The decoded data is processed in the same way ,MAF This SENT Sensors send airflow and temperature signals . I use PicoScope Captured data , Decode it and Export . then , I follow the passage 1 The data on creates a chart . stay WOT Before the quick test , I also conducted a similar test when the engine was idling .
chart 19
chart 20 It's the graph we get by modifying the range .
chart 20
But so far , I have a little problem . I can't explain the passage correctly 1 or 2 Value , And convert it into units of measurement that we can associate , Such as pressure units and temperature units . How the sensor converts data and SENT Slow The characteristics in the message are related , I haven't successfully correlated measurements . That being the case , But I think this is an unprecedented method , It can help us visualize sensor signals . For exhaust pressure sensors and MAF sensor , I find it best to set the time base to 1s/div to 2s/div To capture for a long time , While maintaining a high sampling rate ( The goal is 10MS), To ensure correct decoding . Otherwise, a yellow warning triangle will appear after decoding , Tips “ The sampling rate may be too low ”, besides , There are no other problems in decoding . You can avoid data loss by adding a trigger , But you must be ready to perform quick tests , We will also continue to study the function of triggers , Because this is a thorny problem I encountered when capturing .
I hope the content in this article is helpful to you , Please provide any relevant suggestions , If I have other ideas later , Will continue to update .
The inspiration of this article comes from a case study on the relevant Forum , Links are as follows : case Case study : The public V8 High pressure fuel sensor is not grounded (SENT The signal )
Some files used in this article are shared with you , Welcome to click here Download learning !
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/149180.html Link to the original text :https://javaforall.cn
边栏推荐
- Ncp1342 chip substitute pn8213 65W gallium nitride charger scheme
- Select drop-down box realizes three-level linkage of provinces and cities in China
- The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
- 【yolov5.yaml解析】
- Redis master-slave mode
- Principle of persistence mechanism of redis
- 只是巧合?苹果 iOS16 的神秘技术竟然与中国企业 5 年前产品一致!
- 【PyTorch预训练模型修改、增删特定层】
- Pytorch MLP
- How can beginners learn flutter efficiently?
猜你喜欢
Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle
Get all stock data of big a
[loss functions of L1, L2 and smooth L1]
codeforces每日5题(均1700)-第五天
Pytorch softmax regression
Codeworks 5 questions per day (1700 average) - day 5
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
Network five whip
Simple production of wechat applet cloud development authorization login
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter
随机推荐
Wireless WiFi learning 8-channel transmitting remote control module
语义分割实验:Unet网络/MSRC2数据集
How can beginners learn flutter efficiently?
Want to ask, how to choose a securities firm? Is it safe to open an account online?
Linux Installation and deployment lamp (apache+mysql+php)
Seven polymorphisms
Principle and performance analysis of lepton lossless compression
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter
信息服务器怎么恢复,服务器数据恢复怎么弄[通俗易懂]
MySQL regular expression
Multi table operation - Auto Association query
Principle of redis cluster mode
【TFLite, ONNX, CoreML, TensorRT Export】
Halcon 模板匹配实战代码(一)
一类恒等式的应用(范德蒙德卷积与超几何函数)
Sentinel sentinel mechanism of master automatic election in redis master-slave
MySQL function
Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle
Embedded software architecture design - message interaction
MySQL basic operation -dql