connecting the oscilloscope
After installing solar panels on the roof of the campervan I wanted to see whether the solar voltage regulator was providing electrical potential and current data at the solar panel and battery side. The Votronic MMP solar regulator is connected to the LIN bus of the campervan. So I build a “sniffer” for the LIN bus and did some programming on an ESP32 board. To get it all working the oscilloscope came in handy. For example to figure out the baud rate of the LIN-bus.
The baud rate appears to be 19200 and it appears to be a repeating pattern every 360ms. Zooming in on the data reveals that
- There is a single “spike” of about 3ms
- After 47ms it is followed by a train of 10 frames
- After 82ms it is followed by a second train of frames
- Finally after 47ms the single spike is detected again.
Individual frames
The short frames (called spikes before) are requests from the master on the LIN bus that remain unanswered, because the device is offline or just not build into the campervan. They contain typically the byte sequence 00 55 xx
where xx = the Protected ID:
The frame always start at nice 10ms time slots,. An example of a regular frame comes form the campervan living part batteries intelligent battery sensor:
The Hella IBS sensor LIN bus protocol is well documented in those github repositories:
https://github.com/frankschoeniger/LIN_Interface
https://github.com/mestrode/IBS-Sensor-Library
Frame identity
Finally, the complete overview of the frames with Protected and normal ID’s:
start time / ms | PID (hex) | ID (hex) | comment |
0 (=360) | C1 | 01 | |
10 | 42 | 02 | |
20 | C4 | 04 | |
30 | 85 | 05 | |
40 | FB | 3B | |
50 | 0C | 06 | no response |
60 | 97 | 17 | no response |
70 | D8 | 18 | no response |
80 | 99 | 19 | no response |
130 | 5B | 1B | isolated spike, no response |
180 | C1 | 01 | called a second time |
190 | 42 | 02 | called a second time |
200 | 20 | 20 | |
210 | E2 | 22 | Hella IBS |
220 | 25 | 25 | Hella IBS |
230 | A6 | 26 | Hella IBS |
240 | 78 | 38 | no response |
250 | 39 | 39 | |
260 | BA | 3A | |
270 | 4C | 0C | no response |
Several Frame IDs do not have a response. Device ID 01 and 02 are called twice in a cycle and three of the ID’s are known to be from the Hella IBS and for the better part the data is decoded. More posts will appear among others on the LINBUS listener based on an ESP32 and decoding of the frames of some of the connected devices.