Skip to content

Commit 6ed57fb

Browse files
committedFeb 22, 2025·
Fix Steelmate pressure formula
1 parent 5cae16f commit 6ed57fb

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed
 

‎src/devices/steelmate.c

+22-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
Copyright (C) 2016 Benjamin Larsson
55
Copyright (C) 2016 John Jore
6+
Copyright (C) 2025 Bruno OCTAU (ProfBoc75)
67
78
This program is free software; you can redistribute it and/or modify
89
it under the terms of the GNU General Public License as published by
@@ -12,7 +13,23 @@
1213
/**
1314
Steelmate TPMS FSK protocol.
1415
15-
Packet payload: 9 bytes.
16+
Reference:
17+
18+
- model TP-S15
19+
20+
Brand:
21+
22+
- Steelmate
23+
- R-Lake
24+
25+
S.a. issue #3200 Pressure issue :
26+
27+
- The originally guessed formula was : Pressure in PSI scale 2, but more the pressure is important more the value diverged between the TPMS display and rtl_433.
28+
- New analysis : Based on data collected by \@e100 + the technical specification ( 0~7.9Bar ) + analysis by \@e100 and refined by \@ProfBoc75, the pressure is given in Bar at scale 32.
29+
30+
Packet payload:
31+
32+
- 9 bytes.
1633
1734
Bytes 2 to 9 are inverted Manchester with swapped MSB/LSB:
1835
@@ -24,7 +41,7 @@ Bytes 2 to 9 are inverted Manchester with swapped MSB/LSB:
2441
- S = sync, (0x00)
2542
- A = preamble, (0x01)
2643
- I = id, 0xc3f0
27-
- P = Pressure as double the PSI, 0x14 = 10 PSI
44+
- P = Pressure in Bar, scale 32, 0xA0 / 32 = 5 Bar, or 0xA0 * 3.125 = 500 kPA, see issue #3200
2845
- T = Temperature in Fahrenheit, 0x4a = 74 'F
2946
- B = Battery as half the millivolt, 0x8e = 2.84 V
3047
- C = Checksum, adding bytes 2 to 7 modulo 256 = byte 8,(0x01+0xc3+0xf0+0x14+0x4a+0x8e) modulus 256 = 0xa0
@@ -56,7 +73,7 @@ static int steelmate_callback(r_device *decoder, bitbuffer_t *bitbuffer)
5673
uint8_t id1 = ~reverse8(b[3]);
5774
uint8_t id2 = ~reverse8(b[4]);
5875

59-
//Pressure is stored as twice the PSI
76+
//Pressure is stored as 32 * the Bar
6077
uint8_t p1 = ~reverse8(b[5]);
6178

6279
//Temperature is stored in Fahrenheit. Note that the datasheet claims operational to -40'C, but can only express values from -17.8'C
@@ -72,7 +89,8 @@ static int steelmate_callback(r_device *decoder, bitbuffer_t *bitbuffer)
7289
continue; // DECODE_FAIL_MIC
7390

7491
int sensor_id = (id1 << 8) | id2;
75-
float pressure_psi = p1 * 0.5f;
92+
float pressure_kpa = p1 * 3.125f; // as guessed in #3200
93+
float pressure_psi = pressure_kpa * (1.0f / 6.89475729f); // Keep the PSI value to not Break the decoder after new formula, #3200.
7694
int battery_mV = tmpbattery_mV * 2;
7795

7896
char sensor_idhex[7];

0 commit comments

Comments
 (0)
Please sign in to comment.