Hi everyone! Since this is my first post, a little intro. Front-end dev, Arduino enthusiast, long time reader of this forum.
I bought cheap TPMS bluetooth 5.0 sensors from Aliexpress which comes with their app. Had an idea of building own dedicated display using arduino, bluetooth module and small display. Issue is that I can't decode values from bluetooth raw data. I'm using BLE Scanner app on Android phone and I got reading from sensor in form of raw data, for example:
0x0303A5270308425208FF281E11014D8511 (App data: 1.3 bar, 17 celsius deg, 3.0 volt) 0x0303A5270308425208FF401E1501FA0FF8 (App data: 2.5 bar, 21 celsius deg, 3.0 volt)
So I figure out that I need to look manufacturerData (for example 0x281E11014D8511, where byte 0x1E is volt divided by 10 and 0x11 is temperature in Celsius deg.) but I'm not sure where and how to get tire pressure from the rest.
Any new ideas, suggestions where and how to look?
Thank you!
My best guess is that byte 10 is the pressure:
0x28 -> 40 -> 1.3 bar
0x40 -> 64 -> 2.5 bar
It's not a direct ratio: 1.3 / 40 is not equal to 2.5 / 64. If you find the slope between 40/1.3 and 64/2.5 (1.2 / 24) it's 0.05. The line with that slope passing through 0,0 is 2.0 at 40 and 3.2 at 64. Those two numbers are 0.7 higher than the desired answers so to get pressure in bar, multiply by 0.05 (a.k.a "divide by 20") and subtract 0.7.
Did some more research using NodeJS and Noble library to discover sensors. Attached sensors and started deflating tire slowly to see the changes in values. Now I'm even more confused
I'll paste just last 7 bytes (Uint8Array(7)):
<20 1e 0f 01 ec e0 75> | 2.4 bar
<10 1e 0f 01 d8 06 56> | 2.3 bar
<22 1e 0e 01 d6 e0 a7> | 2.2 bar
<42 1e 0e 01 c5 96 79> | 2.1 bar
<42 1e 0e 01 b9 0f be> | 2.0 bar
<12 1e 0f 01 ac f5 5d> | 1.8 bar
<42 1e 0e 01 8e 6f 2e> | 1.7 bar
<40 1e 0f 01 7a 55 a2> | 1.6 bar
And if I take down sensor off the tire I get:
<00 1d 1a 00 90 ad 70> | 0.0 bar
I'm thinking, maybe first byte here represents event type (temperature change, volt change, pressure change etc.), second is volt, third is temperature, fourth could be sensor attached/detached (0 or 1)?
I'm using app as a reference for bar/temp/volt values. I agree that app is making some kind of a number rounding adjustment. fifth byte is somehow related to pressure for sure but if you convert kPa to bar (I would expect linear difference at least ):
actually if you have excel and you plotted the values, you might notice that the 'read' and 'displayed' values seem to follow a trend and you could either fit a line or an order2 polynomial quite nicely to those points.
also they seem to be less deviating at the higher pressures!
but then again that's only for the corrected displayed values! wonder if they would match more accurately if compared with and actual pressure gauge as you inflate/deflate your tyre....
@maxterr Have you determined that these assignments, from the link in post #5, are NOT correct? That would be useful for others to know.
I've been working on what I think is the same system. Here's my code;
https://github.com/ricallinson/tpms
Bytes 8 to 11 as a unit32 are pressure in kPa (divide by 1000).
Bytes 12 to 15 as a unit32 are temperature in Celsius (divide by 100).