A PWS (Pedestrial Warning System) for my Model 3

By Paolo

During the development of my Model 3 LR additional display I played a lot with the on-board CanBus communication, being able to extract the information of interest such as power delivered by the engines, RPM, throttle position, Chill / Sport mode, etc. How could I apply this experience to a new project ?

A typical feature of the Model 3 (at least until the pedestrian warning will be activated by default) is the absolute silence at low speeds, which often does not pedestrians or bikers aware of us, and I wanted to solve this problem without ruining the beautiful feeling of quietness that occurs at low speeds.

I also like the idea of ​​creating a distinctive sound for my car, similar to what Audi and Porsche did for their top models.
In these models sound, in addition to warning of our arrival, gives also a typical sound imprint to the car, to the point that the sound is also emitted inside the passenger compartment, and well beyond the speed of 20Km/h that the law indicates as limit for these systems.

It therefore becomes important to employ a sound generator that, instead of emitting simple sounds like a forklift truck (!) or, worse still, mimicking an internal combustion engine, was extremely versatile and also reprogrammable by any user. From this point of view my past experience as a keyboard player and music synthesizer programmer has been of great help. For those in the know, here’s what I did the first experiments with 😉

Questa immagine ha l'attributo alt vuoto; il nome del file è minimoog.png
The legendary Minimoog

The requirements are:

  • Integration with the on-board bus (Vehicle CanBus)
  • Computing power sufficient to synthesize complex sounds in real time, or even to reproduce recorded sounds (Kit Car?!?)
  • Compact size, so that it can be installed in the passenger compartment without too many problems • Enough power to emit a sound at about 65-70db / 1m (let’s say between 40 and 50W maximum)
  • Compatibility with the speaker fitted as standard, which uses a particular connector

Starting from the last point, a quick inspection showed my Model 3 did not have the standard speaker fitted, but only the predisposition. The original speaker is quite small indeed, I don’t know what sound level and quality it can achieve.

The original speaker and my M3 housing

After measuring position and dimensions of the fittings, I found on the market a speaker suitable for marine use (stereo systems on vessels) 5 inches wide with a power of 40W, and designed a box to contain it and sit on the original fittings. The box was made of ABS with the 3D printer and painted with epoxy filler to make it waterproof and resistant to bad weather and vibrations.

New speaker housing

Heart of the system

For sound generation I relied no my trusty micro-pc, the Raspberry PI, added with a custom CanBus power supply / interface and a low-cost digital / analog converter with an exaggerated quality compared to the application. The software that allows me to generate the sound of my PWS is called PureData; it’s a visual programming language with which you can create and make sound elements interact with each other until they reach incredible complexity.

You can create oscillators, play and tune sound samples, add effects, modulations, etc. The downside is that as performance is added the diagrams become more and more complicated. Here is an example of the sound generator developed for the application.

Finally, a program has been written (in C ++) that allows this sound synthesizer to interact with the messages coming from the CanBus. In particular, the sound has been designed to:

  • increase in frequency as engine revolutions increase (up to a certain threshold, then the sound is attenuated until it disappears)
  • increase in volume when a lot of energy is consumed (in acceleration), and decrease in volume in the opposite case (when you release the throttle)

Power supply, amplification, boxing

The writing coming from the CanBus carries a positive at + 12V, but this wire cannot supply the current required by the system.

For this, power wire (fused positive 12V + 10A fuse) was taken from the left side of the driver compartment and was brought to the PWS.

The presence of voltage on the CanBus (when the car is operating) is used to activate a relay which in turn supplies the main voltage to the entire circuit.

To contain everything, a fastening system has been designed to be inserted inside a common electrical junction box, which has an IP56 degree of protection. This skeleton holds all the components in place, and allows the incoming and neat distribution of the wires.

Design of box and accessories
Assembling of parts

A 100W class D mono digital amplifier, based on the TPA3116D2 chip, provides the necessary output power, even with very compact dimensions and very little heat dissipation

Power Amplifier

Il PWS è dotato di interfaccia

The PWS is equipped with a Wi-Fi interface, through which you can both update the interface software with the CanBus, and modify the sound generation diagram (to add new sounds – the limit is your imagination!)

Positioning and wiring

After removing the side panels of the central tunnel, I identified a free space under the cabin air filters into which my device fits almost perfectly. This, moreover, a perfect position for the arrival of the power wires (taken from the driver’s side, on the left side) and of the CanBus (positioned on the left side, close to my display) and for the output of the two wires that connect to the speaker.

Power supply and CanBus wiring

To hold the box in place I used two rubber strips, perfect to hold everything firmly in place even in case of sporty driving. However, access to the compartment in case of maintenance remains fairly easy: just remove one of the two side panels (which is held in position only with clips) and extract the box.

The external wiring is very simple: from the speaker i ran two wires into the passenger compartment through a small hole made in the gasket that allows the passage of the Model 3 power cables (located between the passenger compartment and the of the frunk, to the left of the passenger compartment air intake).

Speaker wiring

Street Tests

During the tests I measured the sound pressure emitted, adjusting the internal trimmer to obtain a reading of 65db / 1m before closing the housing. A lot of tests have been done to fine-tune the sound to get the most satisfying version. The sound gradually increases in pitch up to about 50Km/h, and then drops to zero. In addition, the volume increases if you press the accelerator (so if you consume energy) and decreases when you decelerate/regenerate, to give a more realistic touch. Finally, the sound has a fixed frequency of about 100Hz when the R or D gear is engaged, while it is silenced completely when we are in P.

In the future it will be possible to create a completely different sound and load it into the PWS. Spaceships? Music? Sound environments like the one created by Hans Zimmer for BMW? Just imagine and draw it with the PureData tool, and then transfer it via WiFi.

Street Tests

Final thoughts

I am very satisfied with the result, the sound is full-bodied and sporty without the need to mimic an “old” combustion engine (nevertheless it reminds me the sound of a famous electric hypercar …) The only thing you need to get used to is that people turn even more to look at you! Then, when you move away like a departing spaceship, you hear them say “Ah of course, it’s a Tesla ….”

If you want to know more (or you want one), if you have ideas for a completely different sound, contact me or send me an email and we will discuss it, it is always interesting to talk to a colleague!