Step 2: Software

Step 3: Decoding the Results

I made some notes off the Wikipedia site that had to do with the speed of sound. The notable fact is that sound takes about 900us (microseconds) to ...

This instructable will show you how to hack / reuse a common Bosch automotive ultrasonic sensor(s). The sensor in this instructable is a very common sensor that can be found in junkyards all over the world. The hope is that this information will allow folks to reuse these sensors in wonderful new applications.

There are many advantages to using automotive ultrasonic sensors.

Easily detect objects within a two meter range.

Detect multiple objects within the sensor's field of view. This particular sensor returns all echoes after a ping event. In contrast, many hobbyist sensors only return the distance to the first detected object.

All Digital. No analog signals are used between the control module and sensors. In other words, the sensors are all digital. Note, the first generation automotive sensors were analog and had many problems. Many aftermarket systems are still analog!

Water proof. Both the sensor and the connector are completely water proof. Remember, these sensors live inside a vehicle fascia. The inside surface of a fascia is a very tough environment!

Short circuit proof. The IO pins can be shorted to battery, or ground, or in any combination without harm to the sensor. This includes reverse battery and double (24 Volts) battery connections. Believe it, or not, but modern vehicles are still designed to allow good old back country boys to connect two batteries in series so that their trucks can start really fast! Legacy automotive requirement, I'm guessing.

EMI (electromagnetic interference) resistant. The sensor has been through a lot of testing to prove it's capable of both being resistant to EMI interference and resistant to generating EMI noise. The EMI tests take weeks - being able to pass automotive EMI requirements is a really big deal!

Hardened. The face of the sensor is electro primed and painted solid aluminum. The rest of the sensor is plastic with the electronics rubber potted.

Shock proof. Again, the sensor design had to prove it's self in a whole battery of tests. Again, remember that fascia mounting location - bumpy place to live.

Zap Proof. Each of the sensor pin is tested during EMC (electromagnetic compatibility) testing to verify it can survive a high voltage discharge. I think the test requires surviving a 15kV zap on each pin! Nothing worst than watching this test being performed on your product at the EMC lab. I'm convinced, watching this took years off my lifespan!

Temperature proof. Tested from -40 degrees C to +85 C. There is also thermal shock tests that must be passed. Living in a fascia is not easy.

Expandable. Multiple sensors can easily be used to cover any portion of 360 degrees. As an example, it would be easy to use eight sensors on a robot where the sensors were placed at 45 degree increments around a circle. The robot could then have a complete 360 degree view with no moving parts!

Fast. One ping out two meters and back takes just under 50ms (milliseconds). The 50ms I quote actually includes two pings (to double verify) and guard-band time. See below for more on this.

Smart. A sensor can be commanded to generate a ping or, instead, to simply listen. Using a pinging sensor and one, or more, listening sensors tricks can be done to detect additional (very close) objects. More on this below too.

Elliptical Pattern. The ultrasonic pattern generated is purposely not circular as you might expect. Otherwise, the sensor would get echoes off the ground. Turns out, the lip of a pot hole reflects a lot of ultrasonic energy.

Low Power. A sensor only draws about 20 to 25mA. About the same amount of energy used to light a standard LED.

OK, these sensors are just about as bullet proof as possible. Needless to say, if you find yourself in possession of one of these sensors, and it has not been smashed, it is most likely a good one. In other words, if the sensor shows no sign of mechanical abuse it is probably good.

These sensors can be found in junkyards all over the world. The sensor used in this instructable come from Bosch and are widely used in GM and Chrysler vehicles. I believe, but don't know for sure, that the sensor are also used in many European vehicles too. After all, this is Bosch (a German company) we're talking about.

A disclaimer is in order. I worked for a small supplier who also produced ultrasonic sensors for GM. However, that was three years ago. I never had, nor ever learned of, any direct knowledge of how a Bosch ultrasonic sensor / system is designed or how it is used or operated. The GM engineers were very careful not to divulge anything (other than warranty info) concerning competing suppliers.

All information in this instructable came by way of reverse engineering my wife's 2008 GM Tahoe which had a reverse backup system factory installed. For sure, these sensor operates completely different than the system I was involved with. Although I really like these sensors, I have no love loss for Bosch as a company. They put it to us every chance they got.

It just kills me that these sensors are going unused by the hacker community. After all, over 100 million Bosch ultrasonic sensors have been produced since being introduced in 1993. This factoid can directly off their web site. Let me say it again because it is astounding, there have been 100,000,000 ultrasonic sensors produced by Bosch since 1993. However, Valeo's web site claims they are the world's largest ultrasonic automotive supplier. So, Valeo (who introduced the sensor in 1991) has produced even more! Wow, so there are a lot of sensors out there. Note, Valeo (a French company) supplies ultrasonic sensors to Ford, as well as to European manufactures.

OK, head out to your local junkyard and look for any GM or Chrysler vehicle that was manufactured since 2006. This particular sensor design might even go back even farther - I just don't know. Still, there are plenty of 2006 through 2011 GM and Chrysler vehicles around to plunder. Go get 'em boys and girls. Oh, don't forget to snag the wire harness in the fascia too. Those water proof sensor connectors are very precious. You'll need those connectors later on.

When looking for sensors make sure they match the first picture below. Bosch laser etches their name right into the sensor plastic housing. Never mind GM does not allow suppliers to mark their name on their own product. Bosch seems to get away with ignoring this GM rule. Look for the Bosch name and logo, and also that the sensor shape matches the picture in this instructable. With a matching logo and shape you have the right sensor. You should not have any problem finding these sensors. My local junkyard quoted me $30 bucks for a set of four sensors (harness included).

There is also a bunch more information on my web site which shows "procuring" sensors from my wife's Tahoe. I've also got a bunch of info on my site about reverse engineering the ultrasonic park assist (UPA) module. The info is mostly about getting the UPA module tricked into operating on my bench once removed from the vehicle. Below is a link to the site.

Hi. I wonder if you could take a few moments to give me some advice please

I have a 2007 vintage Audi on which I am changing the front bumper and grille to a later facelifted design

The old design had 4 identical park sensors (Valeo) all in the bumper. The new design has 2 in the bumper (outer corners) and 2 mounted in the grille; still Valeo and superficially the same.

Problem is the old sensors will not fit in the 2 new grille mounting positions. They need to have the connector plugs coming straight out the back, instead of at right angles as shown in your pics of the Bosch items

I also have 4 original sensors still in the rear bumper, and the controller is also original. Not really viable to change the controller and all 8 sensors to the correct latest part numbers, especially as the system interfaces with the rear camera and the whole "MMI" system in the Audi

My question, in a nutshell: What is the chance the sensors from 2010 which will fit my grille (plugs straight out the back of the sensor) are electrically compatible with the rest of the system from the same model car in 2007?

Audi give their Valeo sensors a huge range of different part numbers. Most people selling aftermarket replacement sensors seem to think that if they look much the same, then they work the same, but having read your piece on how they work and the exchange of digital data, etc, I am skeptical

I was reading your link over on ph-elec.com and was wondering if there would be a way to simply test a bunch of these for proper operation? I might be able to get a large quantity of these and want to test them before selling them, to make sure they work. Any idea how to set that up on a bench, rather than just plugging them into a vehicle?

This page shows how an mbed, which is a little development board, can "talk" to a sensor. This page is kinda lost several layers deep so you might have missed it. Anyway, I think this is what your looking for.

I'm assuming your trying to measure the water level in some kinda tank in your home? Maybe for growing plants? Because, a hot water tank runs full all the time.

Anyway, to answer your question, the sensors need some kinda micro to command them to measure the distance. Once the distance is measured, the micro could report the results back using RS-232. The micro could probably fake its way onto the 1-wire bus too. But I'm not sure about that.

But yes, the sensors being water proof would work well in a wet environment. You just need a micro (like an Arduino) to control them.

Is there any way to tell what cone angle the Bosch sensors are and how many feet they detect? I 'm replacing an OEM bumper with an aftermarket and what to make sure befor I drill holes in an expensive bumper.GM 15797507 BOSCH 0 263 003 548 8642257B 080128/Q5BOSCH assembled in Mexico

The GM specification is that these sensors must detect out to a distance of 2.0 meters. It's a stretch for these sensors to reach that distance.

The standard GM spec also specifies a FOV (Field-Of-View) study to be done. We had a 2.5 meter square mat that we laided out behind a test vehicle. The mat had a printed 10cm grid on its surface. The spec then called for a 10cm pole be placed around the mat while testing when the system reported an object. This is easy to do with a GM car. Just turn the key to "on" with the engine off. Drop the PRNDL (GM speak for Park-Reverse-Neutral-Drive-Low ie the gear shifter) into reverse. A car with an existing backup system will then go active and you can play with it.

Living in the US we didn't have a "10cm pole" so we simply used a standard 3" PVC pipe which was about 3 1/2 feet long. The pole was cut well so it would stand up on its end.

We would mark the mat where the pole was detected by placing a post-it note on the mat where the pole was first reported. After the entire FOV was mapped out I would stand on the top of 10' ladder and take a picture. One of our secretaries would then convert the image into a Inkscape drawing for presentation at GM. All in all, a major pain in the backside.

The FOV was basically a box shaped envelope that extended out 2 meters from the back of the car. The side of the FOV should not extend out more than a 1/2 meter, ideally.

A bigger problem than FOV is the sensor mounting angle. Have a look at the attached picture. We used this to measure the up angle of the sensor. Using the steel bar, press bar flat on the face of a sensor. Then, use the tilt gauge to measure the sensor mounting angle. The sensor should be mounted such that the angle is +5 to 15 degree positive. With anything less the sensor will start to "see" pot holes and cracks on the surface.

Mounting the sensors can be tricky. The sensors must be mounted high enough off the ground, have a 5 to 15 up angle, and not be mounted to far around the corner of the fascia so that they pickup side object.

Oh, and you gotta mount the sensors in a retainer clip with a silicon isolator ring. The retainer clip can also help with getting the sensor up angle.

There is a bunch more info on my web site about this subject too. Here is a direct link: http://ph-elec.com/archives/category/ultrasonic/

I hope I didn't scare you will all the detail. Most of this was just GM over kill. The sensors, and sensor mounting, is pretty forgiving. As you can imaging, if your going into production with a vehicle you want the mounting to be perfect.

This is a great instructable, Jim! Do you know anything about the circuitry inside the sensor? Is that a chip in there which communicates on the half-duplex comm wire? Wondering what kinda specs that chip has and if its EEPROM etc...

Probably wrong to say that it provides power to the sensors. There must be another regulator in the ECU which provides power to the sensors. I know, for sure, the ECU has the ability to switch off sensor power. So, when your trucking down the highway the sensors are off.

The ASIC is embedded in each sensor and are sold by the millions each year. I saw somewhere that more than 100 million sensors have been produced over the last 10 years. So yeah, a ASIC makes sense for them.

Have a look at this page:http://ph-elec.com/archives/ultrasonic-sensor-hacking-step-1/8/

Or even better, have a look at this image:http://ph-elec.com/wp-content/uploads/2010/04/Ping_With_Echo.jpg

Note, the scope was set for zero volts at one division up from the bottom. So, with no communication the comm wire is sitting at 8Vdc.

The ECU pulls the comm wire down to 1Vdc when active. The sensor, on the other hand, only pulls the wire down to 2Vdc.

Hope this helps,Jim

Oh, and have a look at my new instructible I put up just today:http://www.instructables.com/id/Computing-Pipe-Joints-in-Blender-for-Camp-Stoves/

Really love this info. going to stop by the local pick-and-pull soon.can you elaborate on what it takes to cause it to ping? do you have to actually send it digital commands to initiate pinging, or does it do it upon power-up automatically? i'm wondering how much complexity i need to get it to do the most simple range sensing. i'll need to address it digitally and program with the codes i figure out from sniffing? or maybe just pull some signal down/up for a moment and it starts pinging? then i can sample the resulting echo signal for analysis.thanks so muchagain!michael

Nope, the sensor is a total slave device. It won't do anything without being told. However, to get the sensor to generate a ping is quite easy. Just send the sensor a pair of "correctly" timed pulses (the pulses are understood by the sensor as a ping command) and your in business.

The hardest part is interfacing the sensor to a micro. The sensor has three wires - ground, power, and comm. The comm wire is half duplex which means both the micro and the sensor talk on the wire. That's the reason for the transistor interface circuit described above. Two micro pins (one for Rx and one for Tx) are needed.

When you send the ping command to the sensor it responds by pinging, of course, and then sending the echo pulses back to the micro on the same comm wire. Very cool.

I'm also a pilot and have had the same idea. I want to start flying amphibian aircraft and I understand landing on glass smooth water is difficult. It's hard to judge distance above the water when it's glassy. My people have flared too high and stalled while landing on smooth water.

I don't think the ultrasonic sensor is a good choice for this application. The automotive sensor is just not the right kinda beast. However, my wife's new leased Tahoe has a "blind spot detector" system. Oh boy! Now we're talking.

The blind spot detector system uses a 25GHz radar to detect vehicles coming up along side while driving down the highway. There is a little icon that appears in the outside review mirror when a vehicle is passing.

The blind spot detector is mounted in the fender on the inside surface of the fascia. In other words, the radar is punching through the fascia! There are two sensors, one for each side of the Tahoe.

The blind spot detector must have a range of at lease 20 to 30 meters. Perfect for our use as pilots.

The nice thing about automotive stuff is how bulletproof it is. The OEMs (GM, Chrysler, & Ford) beat the tar out of suppliers over this kinda stuff. Believe it, or not, but quality is the number one thing. Quality even beats out performance or functionality. It's gotta work for years and years or you, as a supplier, are dead.

I would worry a bit about using a "cheap matchbox" to help me fly.

Also, automotive parts are plentiful. It's just a mater of finding them.

I'm sorry - I really did think you were talking about a cheesy little matchbox kinda thing. This is kinda cool. Plus, I bet your right, in that, there must be a way to get distance from this thing. How much does it cost? Where can I get one?

Hmm good point it does not even need to know distance just change in distance over time.

but it could still be useful. the hard part with landing on water is knowing WHEN your going to hit the water this would allow you to control your descent rate which would also be hard to judge over water.

either way it would be fun to "play" with if your someone (not like me) who has the electronic skills to know what your doing. maybe even use the radar and timing circuits to run your own processes on your own circuitry.

either way its $30 for a RADAR emitter and receiver and thats just cool !! :-)

I'm still hopeful about using the new automotive "blind spot" radar detectors. The sensor uses a 25GHz radar head that shoots through the fascia to detect vehicles passing by your own.

The blind spot detector measures distances. I know this because my wife's new leased Tahoe has the system. I was playing with it recently - as long as there is a vehicle next to me the warning lamp is on. In other words, while racing down the highway, if someone was acting like my wingman and just cruising next to me the system warning lamp stayed on. To be able to do that kind of a warning, the system must be able to measure distance so that it can detect a static object and not just measure relative speed.

Automotive electronics are so much more robust than consumer electronics. I'm sure the blind spot detector would have to meet all the automotive standards (water proof, shock proof, EMI proof, ect, ect).

My wife's lease is up in another year and there are two of these blind spot detectors on that vehicle! The anticipation is killing me.

Oh, have you seen the new "active cruise" control systems. These, too, use radar to actively manage your vehicle's cruise control speed. They "lock" onto the vehicle ahead of your own. These systems are good for several hundred meters! It's just too bad the Tahoe does not have one of these systems. Well, maybe her next one will.