Categories
Embedded

Car Audio Project

The next project I’m mulling is where I’m looking to replace the cassette/radio stereo in my aging Citroen Berlingo with something a bit more fancy.

I don’t own audio cassettes any more and I’m not a massive radio fan but I do like streaming from my phone. Hence I’ve been driving around with a bluetooth speaker in the car. As the battery died on the speaker for the second time, I hit on an idea:

What would it entail to remove the existing stereo, and replace it with a bluetooth device that allowed me to play my iPhone into the car speakers?

The big obvious win here is that I immediately avoid the need to charge a bluetooth battery.

ChatGPT

As usual, I spent quite a bit of time chatting to ChatGPT about the project, using AI to feel my way through the project, seeing what issues I was likely to have, and then finding a way around them.

After quite a bit of discussion, this is what I’ve arrived at:

This time we shall use an ESP32 WROOM to power the project.

Why not the Pi or the RP2040 (like in my sound toy project)? Well, the reason is the ESP32 has built in Bluetooth and excellent support for Bluetooth audio streaming. This time I didn’t need the rechargeable battery facility on the Adafruit Feather as the car would provide the power.

The general approach will be this:

I’ll remove and discard the old stereo (though I may salvage anything I need, such as the case if that helps). And I’ll replace it with my ESP32 device that will connect to my phone and stream audio via Bluetooth.

The ESP32 will connect to the existing Citroen audio cables (I found a great Youtube video on what cables I could expect to see etc).

I’ll need something to step down the car’s 12v power to the 5V needed by the ESP32.

I’ll need a fairly powerful amp to power the non-trivial car speakers, so this will be another board (e.g. TPA3116). Now because this amp will typically need more power than the 5v the board needs, this will be wired into the car’s power. I’m going to need to research a bit more to check what wattage the car’s speakers need and then find the right board. Some boards seem to come with a volume control but I think I’d prefer to just let that be controlled via the phone (though this may change come testing).

When mounted, I think we’ll aim to have just one button (though there may be a volume, as above). I like the really minimal approach here.

The button will be controlled by the ESP32 and will, basically, turn it on and off.

A longer press (10 seconds?) will put the device into discoverable mode so that phones can connect to it.

I’ll probably have two LEDs. One red one to show if the device is on. One blue one to show if a device is connected. When in pairing mode, the LEDs can flash. I don’t see the need to label the LEDs on the fascia.

The device will remember stored Bluetooth profiles and it’ll connect to the last one by default. I don’t think this is a problem, e.g. if myself and the wife get in the car (both of whose phones are already paired to the stereo) then the easy option is to put one phone in airplane mode (or disconnect from the stereo), allowing the other to take over (so yeah, the stereio will need to notice a bluetooth connection has disconnected, and then round-robin on the list of connected, paired devices).

I thought about adding a display to the device but I don’t think this is needed (ie to show artist/track info). Again, the more minimal view appeals to me.

I will 3D print the front of the case; that’ll be a good opportunity to learn that. The type of printer I need I think will be quite affordable (and useful on other projects) or I can use an online printing service to start.

If I decide later to have a display on the device, or a volume control, I can print a new case.

Oh, and because the device has Wifi I should be able to connect to it via my laptop and update the code that way. I’ll test that early as, if not, then I may need to include a USB-C slot on the fascia (though that raises other issues, we’ll cross that bridge when we come to it).

First Steps

So, after lots of thinking and navel gazing, the first phase will be this:

Set up the ESP32, connect it to a basic, small amp/speaker (for testing purposes only), pair it to my iPhone 15, and play music.

After that, we can think about how we build a basic unit that can be tested in the car. Which will mean dealing with the car’s voltage, and using an amp more suited to the car’s speakers.

After that hurdle has been crossed, we can get to grips with designing a case, 3D printing it, and mounting it to the car.

Easy.

(ahem!)

Leave a Reply

Your email address will not be published. Required fields are marked *