GithubHelp home page GithubHelp logo

ra6070 / ble-tpms Goto Github PK

View Code? Open in Web Editor NEW
76.0 7.0 8.0 22 KB

ESP32 BLE Tire Pressure Management System

License: MIT License

C++ 100.00%
esp32 arduino ble tpms tp630 decoder pressure sensors zeepin automotive

ble-tpms's Introduction

ESP32 BLE Tire Pressure Management System

Arduino code (ESP32) to read the tire pressures, temperatures, battery levels and alarms from the BLE ZEEPIN TPMS Sensors, TP630, etc.

The TPMS BLE "manufacturer data" format

The devices cannot be connected or paired to and the devices do not receive any incoming BLE data. All data is broadcast as part of the "Manufacturer data" portion of the BLE advertisement. Manufacturer data looks like this:

000180EACA108A78E36D0000E60A00005B00

And now let's analyze in depth the received data:

bytes 0 and 1
0001 Manufacturer (see https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/)

byte 2
80 Sensor Number (80:1, 81:2, 82:3, 83:4, ...)

bytes 3 and 4
EACA Address Prefix

bytes 5, 6 and 7
108A78 Sensor Address

bytes 8, 9, 10 and 11
E36D0000 Tire pressure (in kPA)

bytes 12, 13, 14 and 15
E60A0000 Tire Temperature (in Celsius)

byte 16
5B Battery Percentage

byte 17
00 Alarm Flag (00: Ok, 01: No pressure)

Extract Tire pressure and temperature

Bytes 8,9,10 and 11 are a representation of the air pressure in kPA; Bytes 12,13,14 and 15 represent the temperature in Celsius. To get the values we need to do a little-endian conversion.

long result = byte0|byte1<<8|byte2<<16|byte3<<24

The pressure (Bytes 8,9,10,11) in kPA is obtained by dividing by 1000 the value obtained from the conversion:
kPA=result/1000.0

The pressure (Bytes 8,9,10,11) in bar is obtained by dividing by 100000 the value obtained from the conversion:
bar=result/100000.0

The temperature (Bytes 12,13,14,15) in Celsius is obtained by dividing by 100 the value obtained from the conversion:
temp=result/100.0

Battery Percentage

Byte 16 return the battery Percentage

Alarm Flag

Byte 17 return the Alarm Flag
00 Normal condition
01 No Pressure

ble-tpms's People

Contributors

ra6070 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ble-tpms's Issues

Compatibility?

Hello and thank you for your work!

I'm looking around for the Zeepin TPMS and they are sold out everywhere and I can't find what the TP630 means. Can you tell me which devices are compatible with TPMS BLE "manufacturer data" format that you are describing? There are a lot of clones, such as the Deelife TPMS sensors, and others, like:

https://www.aliexpress.com/item/1005004544828112.html?spm=a2g0o.cart.0.0.620938dakmh5Oy&mp=1

https://www.aliexpress.com/item/32823818142.html?spm=a2g0o.cart.0.0.620938dakmh5Oy&mp=1

https://www.aliexpress.com/item/33025442514.html?spm=a2g0o.cart.0.0.5ac138dauaI2Gm&mp=1

Are any of these compatible? I'm interested in reading the data in a python/bash script, in linux/Debian.

excessive use of memory

Hello

first of all I thank you for the excellent work, but I realized that the scanBLE after some time takes up all the esp32 memory, which then freezes. To solve the problem I used a different library (https://github.com/h2zero/NimBLE-Arduino) which also possesses the function "pBLEScan-> setMaxResults (0)" which do not store the scan results, use callback only.
By doing this the program is more stable. If you are interested, I'll post the sketch

Pressure not reading

Hi,
First, thank you for writing this. It works great, however the pressure reading is always 0.0kPa when tested between 0-30psi. When at 0, sometimes it shows "0.2" for a moment. I'm thinking maybe that conversation isn't the same for these from Amazon? All of the other readings are correct.

Any suggestions on what I should try?
Thank you!

WISTEK Bluetooth Tire Pressure... https://www.amazon.com/dp/B09D8S36XD?ref=ppx_pop_mob_ap_share

Reading TPMS

Hi.
I'm working on a project in which i need to use TPMS to get some info from a car.
which model did you use? and how can i get the address of the sensor?
thanks.

trying with 4 sensors

i have my code done, from your file butt using platformio and 4 sensors
but i can read the date from them, with android app its ok..
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.