Simple Bluetooth Car Audio From A Pi Zero

When [Sami Pietikäinen] realized that the Bluetooth built into his car didn’t support audio, he didn’t junk it and buy a Tesla. Instead, he decided to remedy the problem by building a small Bluetooth device that plugged into the Aux socket. To do this, he used a Raspberry Pi Zero with a pHAT DAC (Digital to Audio Converter). That’s perhaps using a sledgehammer to crack a walnut, but sometimes you work with what you have. The interesting part is to be found in what he did next: he used Yocto to optimize the device down to make it as simple and straightforward as possible.

That’s because the Raspbian OS he used for the first version does way more than was needed: The device just has to handle Bluetooth and the audio output, and really didn’t need all of the other stuff that Raspbian tries to install and run.

So for the second version, he dispensed with Raspbian and used Yocto, a project that allows you to create a customized Linux distribution. By stripping out the stuff the project does not need, he made the project much faster and more streamlined. He used Meta-raspberrypi, a Board Support Package (BSP) that provides the basis for running Yocto on a Pi, then tweaked a pre-built Yocto image to disable all of the features that he did not need.

The result is a device that is much simpler and which boots up and is ready to play music in about five seconds. That’s a considerable improvement over the thirty to sixty-second boot time of the standard Raspbian image (assuming it boots at all), and is a nice example of how simpler is sometimes better.

24 thoughts on “Simple Bluetooth Car Audio From A Pi Zero

    1. or just go buy a cheap Android headunit from Ebay, Aliexpress or Bangood and hack that instead…90$ gets you a touch display, audio amp, BT capability, all the electronics to survive in a car, GPS with remote antenna, some even come with WiFi and you get anywhere between 1-3 USb ports…all in a compact, 2-DIN compatible case.

      1. I have fitted these units for customers and they are fine, but in my own car I run a pi with open auto pro (the paid-for cousin of crankshaft) reason being I have integrated it into the original onboard computer (bmw i-drive) to retain all factory functions and added many other tweaks. this would be alot harder for me on an android head-unit as im not up to speed on android development. where as adding widgets to a pi is almost childsplay.

        1. With CAN interface on the PI (via OBDII) for steeringwheel input this would make my day! Here in Norway FM have (stupidly) been shutdown in favor of DAB, making the integrated sound system bricked.

    1. Yup, you can get a Bluetooth receiver on Ali. But man! The startup sound that they play is super annoying! And it’s played at full volume (if you are using the Bluetooth receiver to manage the output volume!)

      I need to find more information about how to reprogram that sound, before I can use the ones I bought! :-(

  1. I would like normal pilot, big rotor for volume control, big switch to on off, and small screen for look what I listen, what chose.
    Normal radio wifi and player. nothing create this assistent/player hat for rpi

    1. I guess it depends on what they mean by ‘audio’
      I have a ford focus with Bluetooth that does not support music over bluetooth but does support call audio. It turns out it doesn’t have one of the necessary protocols (A2DP). They added it in the newer models & apparently is can’t be added with a firmware upgrade. My guess it the bitrates are higher for A2DP comapred to call audio hence a need for more processing power hence a hardware requirement.

    1. The write-up has the un-mirrored picture. I’m guessing he swapped the bottom and top layers of the case for some reason. He did mount the Pi’s HAT on the bottom by soldering in the GPIO pins facing down, which might have something to do with it.

      Not sure why Baguley decided to mirror it, though. Maybe he thought it was mirrored already because of the case writing.

  2. Good info here. I’ve wanted to use an ESP32 for a Bluetooth project but their lack of support for HFP and/or HSP makes it a non-starter. So my plan is to prototype with a Pi3 then see about minimizing the device with a Zero-W.
    At this point, the biggest issue are ready to go I2C solutions that support line in as well as line out. Using something Pi based means USB sound devices are an option but that won’t lend itself to a clean final build.

Leave a Reply to AlistairCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.