The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
Thread Tools Display Modes
Old 10-12-2007, 11:47 AM   #1
Maximum Bitrate
Robby BMW's CarPC Specs
 
Robby BMW's Avatar
 
Join Date: Aug 2005
Location: Italy
Vehicle: BMW 320i
Posts: 485
My Photos: (1)
Lightbulb Custom USB tyre pressure monitoring interface

This threads explains how I've made my custom USB tyre pressure monitoring system by hacking this aftermarket kit bought on eBay.
Name:  kit.jpg
Views: 18350
Size:  82.3 KB

The first step was to detect the RF transmission encoding method used by the sensors.
To do this it would have been required a very expensive logic analyzer, but fortunately I found this nice program that allows to simulate it (albeit with many restrictions) through the LPT port.

So the first thing was to open the display/receiver unit provided with the kit and, after having identified the receiver, start analyzing the data sent by the sensors.

Name:  front.jpg
Views: 8778
Size:  39.4 KB
- the display unit -

Name:  opened.jpg
Views: 8745
Size:  35.7 KB
- the display unit opened -

Name:  cut_part.jpg
Views: 8730
Size:  70.8 KB
- the receiver part -

After many samples, I deduced that the encoding method used from the system is a sort of PWM format (Differential Manchester) with dT (basic pulse element) time of about 50 μs and a bit period of 2xdT (about 100 μs).
Name:  pwm.jpg
Views: 8664
Size:  14.5 KB
Discovered this, I’ve noticed that the whole data packet consist of 14 bytes (112 bits) organized in this way:

Preamble (16 bits) - The preamble is a series of 15 logic ‘1’ bits followed by a single logic ‘0’ bit (FFFE in hexadecimal), used to recognize the RF transmission as a valid TX message.

Transmitter ID (32 bits): The 32 transmitter ID bits are used to uniquely identify each sensor.

Pressure (8 bit): The tire pressure in kPa is obtained by multiplying the unsigned binary value of this byte by 2.5 and subtracting 100 (the atmospheric pressure) from the result.

Temperature (8 bits): The temperature in °C is obtained by subtracting 40 from this unsigned binary value.

Battery (8 bits): The 7 least significant bits indicates the battery condition as percentage (100 indicate the 100% of charge).

Sensor state (8 bits): The bits 0 and 1 of this byte contains the following information:
00 = Storage mode (Pressure is measured every 60 seconds but no data is sent)
01 = Normal mode (Pressure is measured every 3.4 seconds and data is transmitted every 60 seconds)
10 = Pressure alert mode (Pressure is measured every 0.85 seconds and data is sent every 0.85 seconds. This sequence is repeated 256 times)
11 = Temperature alert mode (If the temperature exceeds 120°C, the sensor device enters into the same measurement and transmitting pattern as the pressure alert mode)

CRC (16 bits): Implement according to CCITT (0xFFFF) standards.

Name:  digital.jpg
Views: 8671
Size:  58.2 KB
- the whole data packet -
__________________
_______________________________________
Car installation 95% [■■■■■■■■■■■■■■■■■■■]
Current project: Parking sensor USB interface

Last edited by Robby BMW : 03-03-2008 at 10:01 AM.
Robby BMW is online now   Reply With Quote
Sponsored Links
Old 10-12-2007, 11:48 AM   #2
Maximum Bitrate
Robby BMW's CarPC Specs
 
Robby BMW's Avatar
 
Join Date: Aug 2005
Location: Italy
Vehicle: BMW 320i
Posts: 485
My Photos: (1)
After a relatively long time elapsed analyzing the data, the goal was to develop a device able to perform some operation such as:
- Learn the univocal sensor ID (like when a pairing is established between two Bluetooth devices). To be used during the first installation in the car or if a sensor is replaced with a new one.
- Read the data sent from every sensor and after an analysis to verify the validity (correct sensor ID and correct CRC), store them waiting a PC request. Since there is no way to know when a transmission happens, it is essential do this in real time.
- Handle the communication with the PC.
In addition, the device should have been easy to connect to the PC, small enough to be comfortably placed everywhere in the car and possibly be self-powered.
My choice was to use a PIC 18F2550, a Microchip microcontroller whit USB 2.0 compliant features, internal E2PROM memory and able to work with a clock oscillator up to 48 MHz.
The first attempt has been to use an SMD hybrid module operating on the frequency of 433,92 MHZ, but after various tests with some modules available on the market, I've noticed that the best result was with the original receiver embedded in the original display module provided with the TPMS kit, so I've decided to cut out it and use it in my hardware.

Name:  part.jpg
Views: 8483
Size:  70.8 KB
- the display unit with the reciver part removed -

The schematic of the circuit is relatively simple and doesn't need further explanation, only a brief note about the transistor used to boost the signal coming out from the receiver, I've used a BC547 (European), but it isn't critical and can be replaced with an equivalent general purpose transistor like a 2N5818 (USA).

Name:  schematic.jpg
Views: 6779
Size:  49.3 KB
- schematic -

Name:  cs.jpg
Views: 8402
Size:  68.5 KB
- copper side -

Name:  board.jpg
Views: 8393
Size:  160.9 KB
- components side -

Name:  3D.jpg
Views: 865
Size:  120.6 KB
- 3D view of the PCB -
__________________
_______________________________________
Car installation 95% [■■■■■■■■■■■■■■■■■■■]
Current project: Parking sensor USB interface

Last edited by Robby BMW : 06-26-2008 at 08:52 AM.
Robby BMW is online now   Reply With Quote
Old 10-12-2007, 11:49 AM   #3
Maximum Bitrate
Robby BMW's CarPC Specs
 
Robby BMW's Avatar
 
Join Date: Aug 2005
Location: Italy
Vehicle: BMW 320i
Posts: 485
My Photos: (1)
Name:  circuit.jpg
Views: 8524
Size:  71.4 KB
- the real device -

Name:  pcb.jpg
Views: 8125
Size:  77.7 KB
- the real device (copper side) -

The most difficult (and funny) part of the whole work was the development of the firmware for the microcontroller that, as described above, it should have analyzed the data received from the sensors in real time and, at the same time, to handle the data exchange with the PC.
This has led at the creation of an USB HID device, a particular device that doesn't require a driver installation on the PC where it will be connected, like a keyboard or a PS/2 mouse.
A Plug & Play device that make easy the development of software (stand-alone programs or plug-ins for the various Front Ends available on this forum) without the aid of special APIs.

In order to facilitate the communication between the device and PC, I have developed a simple communication protocol.
Basically the device waits for a request from the PC (1 byte) and returns the information required (4 byte).
The following table shows the protocol details:

00H (0) Abort any pairing request (see below) --> Returns: Nothing

01H (1) Sensor 1 pairing request --> Returns: Nothing
02H (2) Sensor 2 pairing request --> Returns: Nothing
03H (3) Sensor 3 pairing request --> Returns: Nothing
04H (4) Sensor 4 pairing request --> Returns: Nothing
05H (5) Sensor 5 pairing request --> Returns: Nothing

10H (16) State of a pairing request --> Returns: X,0H,0H,0H
Where X is the number of the sensor to be paired, or 0 if the pairing has been completed.

21H (33) Sensor 1 data request --> Returns: P,T,B,S
22H (34) Sensor 2 data request --> Returns: P,T,B,S
23H (35) Sensor 3 data request --> Returns: P,T,B,S
24H (36) Sensor 4 data request --> Returns: P,T,B,S
25H (37) Sensor 5 data request --> Returns: P,T,B,S
Where:
P is the pressure in kPa obtained by multiplying the unsigned binary value of this byte by 2.5 and subtracting 100 (the atmospheric pressure) from the result.
T is the temperature in °C obtained by subtracting 40 from this unsigned binary value.
B is the battery condition, the first seven bits of this byte indicate the percentage of charge.
S is the operating state of the sensor, 00H is storage mode, 01H normal mode, 02H pressure allert mode or 03H for temperature allert mode.

As example of how to use this device in your code, you can download a RoadRunner plugin and its source code here.
It is also in development a plugin for Centrafuse (thanks Wolfgang). For more information, see here.

Name:  unit.jpg
Views: 8020
Size:  50.5 KB
- the final result-


Related downloads:
Schematic & PCB (created with Eagle CAD)
Parts list & PCB scaled 1:1 (PDF - Adobe Reader)

RoadRunner PlugIn (Bynary and source code)
Centrafuse PlugIn (Developed by Wolfgang)
__________________
_______________________________________
Car installation 95% [■■■■■■■■■■■■■■■■■■■]
Current project: Parking sensor USB interface

Last edited by Robby BMW : 05-02-2008 at 08:21 AM.
Robby BMW is online now   Reply With Quote
Old 10-12-2007, 12:02 PM   #4
_
RedGTiVR6's CarPC Specs
 
Join Date: Mar 2004
Location: Little Elm, Texas
Vehicle: VW GTi VR6 / Ducati 900 SS & S4R / Dakota R/T Supercharged
Posts: 13,221
My Photos: (73)
You have another PM.
__________________
Jan Bennett
FS: VW MKIV Bezel for 8" Lilliput - 95% Finished

If you're needing someone to tell you what to buy, how to install it, or how to make it sound good, I charge a consulting fee.
RedGTiVR6 is offline   Reply With Quote
Old 10-12-2007, 12:55 PM   #5
Laptop, Tablets, UMPC Moderator
turbocad6's CarPC Specs
 
turbocad6's Avatar
 
Join Date: Oct 2004
Location: NY
Vehicle: 2002 pontiac montana
Posts: 5,946
My Photos: (71)
friggin awesome subscribed
__________________
MY NEWEST INSTALL:modded infiniti fx with big screen - "If my typing sucks it's probably because I'm driving....................."

first windows carpc install........my liquid cooled LVDS screen :D
turbocad6 is offline   Reply With Quote
Old 10-12-2007, 01:07 PM   #6
Confusion Master
Enforcer's CarPC Specs
 
Enforcer's Avatar
 
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Vehicle: 1997 BMW E36 328I
Posts: 9,726
My Photos: (1)
Enforcer is offline   Reply With Quote
Old 10-12-2007, 02:02 PM   #7
Newbie
 
Join Date: Sep 2007
Posts: 8
My Photos: (0)
you are ******* awesome. Thank you
BrianCheung is offline   Reply With Quote
Old 10-12-2007, 03:22 PM   #8
Low Bitrate
ilyassx's CarPC Specs
 
ilyassx's Avatar
 
Join Date: Oct 2005
Location: Belgium, Denmark
Vehicle: 1999/VW/Golf4
Posts: 110
My Photos: (13)
Great man!!
__________________
The old setup http://flickr.com/photos/ilyassx
The new setup http://my.opera.com/ilyassx/albums/show.dml?id=110701
Jetway J7F2WE VIA C7 1.5 GHz
512 DDRII 533
3.5" SATA2 H.D.D 200GB
M1-ATX
ELM327MS OBDII
Creative Audigy 4
PROGRESS:[########-]90%
ilyassx is offline   Reply With Quote
Old 10-12-2007, 04:44 PM   #9
Maximum Bitrate
Nomader's CarPC Specs
 
Nomader's Avatar
 
Join Date: Apr 2006
Location: Greece
Vehicle: Citroen Xsara 2002
Posts: 871
My Photos: (0)
robby do you think you can somehow market those?
i am sure there will be huge interest..
Nomader is offline   Reply With Quote
Old 10-12-2007, 05:31 PM   #10
Maximum Bitrate
Sal R.'s CarPC Specs
 
Sal R.'s Avatar
 
Join Date: Aug 2006
Location: Sun Diego
Vehicle: 2001 A4 1.8TQMS
Posts: 865
My Photos: (36)
Damn, I wish I could integrate my SmartTire monitoring system like that.

Awesome. Just plain awesome.
__________________
MicroXP / RR v11/04/2007 / Winamp v5.13 / MMIv2
RR Album Art Browser
Sal R. is offline   Reply With Quote
Sponsored Links
Old 10-12-2007, 06:14 PM   #11
FLAC
 
shotgunefx's Avatar
 
Join Date: Apr 2005
Location: Boston, MA
Vehicle: 2002 Chrysler Sebring Coupe LXI
Posts: 1,747
My Photos: (30)
Subscribed!

Quote: Originally Posted by Sal R. View Post
Damn, I wish I could integrate my SmartTire monitoring system like that.
Awesome. Just plain awesome.

Does the one you have, have the option for the remote display? I think it was the 2nd gen of it that had this and the first had the lcd integrated. I wouldn't be surprised if it communicated with the lcd head via serial communication. I've been meaning to check it out forever but my money/time has been taken up elsewhere.

update
Check out this thread. Maybe ask pastypyro how he made out. It appears to use a serial comm chip for communicating with the display.
shotgunefx is offline   Reply With Quote
Old 10-13-2007, 01:05 AM   #12
Newbie
 
Join Date: Dec 2004
Location: Athens Greece
Vehicle: CLK
Posts: 49
My Photos: (0)
I would suggest to open a donation thread via paypal.
An open source product is allways better .

What do you think?
sstylos is offline   Reply With Quote
Old 10-13-2007, 05:13 AM   #13
Newbie
 
Join Date: Dec 2006
Posts: 4
My Photos: (0)
that bloody awesome, id love to get me some of them, they'd make tyre pressure monitoring and changing so much easier for 4x4 on sand drivin
fatman1121 is offline   Reply With Quote
Old 10-13-2007, 09:19 PM   #14
inh
Maximum Bitrate
 
Join Date: Jan 2007
Location: Fort Riley KS
Vehicle: 91 CRX Si
Posts: 514
My Photos: (0)
Sooo cool Robby! Im seriously contemplating buying one of those same exact kits and putting it together, provided you would share your PIC and PC code =]

I can only imagine how long it took to decipher the data stream...
__________________
Space Navigator - 6 Axis input device: Take it apart - Driver App
RRCam - Video/webcam capture, text overlay, and recording: 2.0 Stable
inh is offline   Reply With Quote
Old 10-14-2007, 12:51 AM   #15
Laptop, Tablets, UMPC Moderator
turbocad6's CarPC Specs
 
turbocad6's Avatar
 
Join Date: Oct 2004
Location: NY
Vehicle: 2002 pontiac montana
Posts: 5,946
My Photos: (71)
yeah man, I've been trying to find that same kit in the us but haven't found anything like it, I don't know if the vendor you bought from will ship to the us, do you have any manufacture info or any other info of where I could find that same tpms setup?

I think if you just build the interface & sell it a lot would want it, I would buy it for sure
__________________
MY NEWEST INSTALL:modded infiniti fx with big screen - "If my typing sucks it's probably because I'm driving....................."

first windows carpc install........my liquid cooled LVDS screen :D
turbocad6 is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Duo / Core 2 Duo Mini-ITX boards RedGTiVR6 General Hardware Discussion 80 07-16-2008 12:42 PM
USB self powered hub, which one htsource General Hardware Discussion 5 07-26-2007 03:31 PM
Will this layout with a remote USB hub work? NoPistonPC General Hardware Discussion 14 08-21-2005 03:24 PM
USB Earthmate - patch for gpsd support dignome GPS 4 04-05-2005 10:44 AM
Looking for feedback on initial components, USB vs. PCI, power related mostly S4Per Newbie 4 04-06-2004 09:52 AM


All times are GMT -5. The time now is 02:36 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics