According to the requests of some users, I've developed this new interface that allows to connect an ultrasonic parking sensor to the PC through the USB port, like I've alredy done for the TPMS kit (Hoops! I did it again

).
The whole project is based on a cheap parking sensor kit (see the picture below) which can be purchased from many online retailers as well as on eBay and a simple interface based on the PIC microcontroller 18F2550.
- the Prking Sensor kit used in the project -
The Parking Sensor used is wireless, this means that it doesn't need a wired connection between the main unit and the LED display and that it uses a serial protocol for the communication, so, once identified the transmitter located inside the main unit, it has been relatively easy to analyze the data structure.
- the main unit opened with the transmiter highlighted -
Basically the whole data packet is composed by 24 periods where the logical "0" has a time duration of about 600 µS and the logical "1" is about 1200 µS, so when the Parking Sensor is powered, typically through the reversing lights, it starts to transmit a series of 3 bytes (24 bits) many times per second.
- periods time duration -
The 3 bytes sequence contains the address and the data (distance from the obstacle) detected from each ultrasonic sensor, so, since the ultrasonic sensors are 4, we will have 4 sequences of 3 bytes repeated over time, one for each ultrasonic sensor.
- the whole data packet -
The first byte is composed by 2 nibble (4 bits), the first nibble identifies the ultrasonic sensor (0 = A, 1 = B, 2 = C and 3 = D) and the second nibble is complementary to the first, in order to verify the integrity of the data received.
The second byte, as for the second nibble of the first byte, is complementary to the third byte.
The third byte contains the distance detected expressed in centimeters.
So, if the ultrasonic sensor B detects an obstacle at 83 cm, the sequence is: 30 - 172 - 83 (0001 1110 - 10101100 - 01010011).
In order to allow the use of other types of Parking Sensors kits, I also looked into a second model produced by a different manufacturer (a special thanks to Enforcer who has provided both kits for the development of this project).
This last is wireless like the first one, but it has an LCD screen instead of a LED display.
- the other Prking Sensor kit -
The main unit of this Parking Sensor kit is different from the previous one, but the main difference is in the data sent to the display.
- the main unit opened with the transmiter highlighted -
The whole data packet of this second kit is composed by 10 half periods where the logical "0" has a time duration of about 2 mS and the logical "1" is about 5 mS, so when it is powered, a series of 10 bits will be transmitted to the display many times per second.
- half periods time duration -
The 10 bits sequence contains the data (distance from the obstacle) detected from all the ultrasonic sensors, this means that with this Parking Sensor kit each data sequence carries all the distances detected from the four ultrasonic sensors, contrary to the first kit, which sends a single data sequence for each ultrasonic sensor.
- some data packets -
The first nibble (4 bits) contain the shortest distance detected by a group of two ultrasonic sensors (A and B or C and D) expressed in decimeters (10 cm).
The second nibble contain the longest distance detected by the other group of ultrasonic sensors.
The penultimate bit indicates if the shortest distance (first nibble) is related to the ultrasonic sensors A and B (left side) or C and D (right side).
The last bit is always "1".
Doing a quick comparison between the two systems (the one LED and LCD) we can see that:
The resolution of the LED system is 8 bits, so the accuracy is 1 cm (0.39 inches), the LCD system has a resolution of 3 bits only, then an accuracy of 10 cm (3.93 inches).
The LED system transmits the data of each ultrasonic sensor individually, so we can display 4 sliders on the PC (one for each sensor), the LCD system handles the ultrasonic sensors in pairs, then we can have only two sliders, one for the right side and one for the left.
Also, the LCD system needs to be connected to the USB interface only trough a cable, instead the LED one can operate also trough a wireless connection (bat this will be better explained later).
- comparison between the two Parking Sensor kits -