Reverse Engineering An Ultrasonic Car Parking Sensor

It has become a common sight, a must-have feature on modern cars, a row of ultrasonic sensors embedded in the rear bumper. They are part of a parking sensor, an aid to drivers for whom depth perception is something of a lottery.

[Haris Andrianakis] replaced the sensor system on hs car, and was intrigued enough by the one he removed to reverse engineer it and probe its workings. He found a surprisingly straightforward set of components, an Atmel processor with a selection of CMOS logic chips and an op-amp. The piezoelectric sensors double as both speaker and microphone, with a CMOS analogue switch¬†alternating between passing¬†a burst of ultrasound and then receiving a response. There is a watchdog circuit that is sent a tone by the processor, and triggers a reset in the event that the processor crashes and the tone stops. Unfortunately he doesn’t delve into the receiver front-end circuitry, but we can see from the pictures that it involves an LC filter with a set of variable inductors.

If you have ever been intrigued by these systems, this write-up makes for an interesting read. If you’d like more ultrasonic radar goodness, have a look at this sweeping display project, or this ultrasonic virtual touch screen.

16 thoughts on “Reverse Engineering An Ultrasonic Car Parking Sensor

  1. “It has become a common sight, a must-have feature on modern cars, a row of ultrasonic sensors embedded in the rear bumper. They are part of a parking sensor, an aid to drivers for whom depth perception is something of a lottery.”

    Or have a vehicle with poor visibility back there due to the design.

  2. Wow, great article! This unit is the four sensor version of the single sensor JSN-SR04T (http://s.click.aliexpress.com/e/Aim2VR7 ) . The great thing about this kind of sensors is they are pretty low cost, waterproof, and the sensor and electronics board are separated, so they have very good applications for liquid level measurement in tanks instead of the HC-SR04 where sensor and electronics are exposed to humidity&vapors. One great disadvantage of using only one sensor for Tx&Rx is that they have a “blind” or “dead” zone from 0 to aprox 20 cm . Probably with the info presented here, a second sensor could be added, splitting Tx and Rx paths to its dedicated transmitter/receiver element to avoid the “ringing effect” and minimize the blind zone.

    1. I actually did most of the same RE effort as presented here sans the processor model.

      More in depth, and worse for these cheap sensors, the input side uses analog filtering to attempt to produce a logic level pulse for a received echo. Its actually a pretty dumb system, has a horrible rise/fall time which can cause it to miss objects entirely. I wouldn’t expect it to miss a large stationary wall/car (its main use case), but it was missing large (my hand less than 30cm away) objects moving across its field of view. Watching the raw input, the reflection was entirely clear. Following it through the path, you could see how the filter ignored it.

      The output amp/”speaker” itself does “ring” a little too. IIRC it was about 1-2 ms for it to completely shut off. Its fairly consistant, so it should be able to be filtered for, and obviously a reflection that close is going to be very “loud”, so it should be even more obvious. Point is, that 20cm dead zone, which on the analog side is more like a 10cm dead zone, can probably be reduced to a cm or so. That’s some precision parking right there! :)

      I realized pretty quickly the input section of the thing beyond the amplifiers was pretty useless. Thats where I stopped. I was waiting for the teensy 3.5/3.6 (which I did get, but too late, I lost interest in the project, and bought a new vehicle….which appears to have this exact system built in….ugh/yeah?). I figured the Teensy 3.5/3.6, 3.6 especially (with its higher clock rate), had DSP extensions. It could probably handle the analog input, and some basic DSP would go a long way. It also had the horsepower to do the basic dsp, and a great set of timers to give each sensor a different frequency.

      Then I started to get outlandish….Precision parking…..scare everyone around me knowing full well I was an inch away from the vehicle near me….it wouldn’t be hard/expensive to add very accurate pressure/temp/humidity sensors….and calculate an accurate speed of sound to increase the accuracy….then, to increase accuracy further, we could use a chirp tone on the sensors (Or determine if there was a better system to use for ultrasound), and really be sure of our reflections with some basic filtering….I briefly considered a phased array with that accurate speed of sound, but with the size of the sensors, it just wouldn’t be possible. Not only would those elements need to be right next to one another for 1/4 wave (in “ideal” conditions….sea level, 72 degrees F…etc…) and then be able to move precisely to proper 1/4 wave positions based on the current speed of sound, otherwise it wouldn’t work…so I threw that idea out the window….unless I can get some much higher frequency capable ultrasonic transducers!) I realized I wanted to overengineer this thing to such ludicrous levels, it would have to wait :) Since my current vehicle appears to use the same exact sensors, I may one day return to this.

      I never did a writeup, which I should have, but with this, the key takeaway for a next step, if you’re interested in making the thing more accurate, not just connecting an arduino to the processor outputs, is to throw away the input filtering, put your own filtering to get it to a voltage level your chosen DSP will accept, and process it there. There is much that can be done without going too crazy just in shrinking that dead zone.

  3. “They are part of a parking sensor, an aid to drivers for whom depth perception is something of a lottery.”
    Its just very convenient and I guess without it I would have ran over 2-3 toddlers by now… my depth perception is fine though

    1. Oh oh Talking Car alarm that would go off when people approached their own car next to the talking alarmed car which was alarmed by your mere presence, Car parks were pretty bad for a while it was always a terrible Porsche and a Red Corvette.

      At night i’m sure the stray cats would set it off aswell.

  4. I like this “Hack” alot, I hope I can try to go further on reverse engineering the UART protocol since I want to replace my display with a connection to a dash installed android tablet and display it in a more stateo f the art manner.

  5. I’ve never seen someone writing on the actual IC’s to help keep track of what’s going on, but that is a brilliant idea. Seems sort of random, but i really like it (not sure why).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s