r/raspberry_pi • u/crime_of_heart • 8h ago
Show-and-Tell Building a Pi Zero W replacement for my car's dead Bluetooth module (CAN bus, A2DP, hands-free calls with the car's own mic)
The Bluetooth module of my 2011 Alfa Romeo Giulietta died, and it never did music anyway, only calls. A Pi Zero W now lives in the module's original case and does both. The factory radio stays and treats the Pi as the original part.
The Pi-specific parts, in case they help someone:
- **CAN:** MCP2515 + TJA1050 board on SPI. The board needs its supply rails split, or MISO drives 5 V into a 3.3 V GPIO. One cut track and one wire.
- **Audio:** a USB sound card soldered to the test pads under the Pi. Music uses A2DP; calls use HFP with bluez-alsa built with mSBC, so call audio is 16 kHz instead of 8. Calls work with the unit fully installed, but the other person still hears a slight echo and the Pi has no echo cancellation yet.
- **One radio:** Wi-Fi and Bluetooth share it on the Zero W. With Wi-Fi up, the music lost a few hundred audio packets a minute. A small service turns Wi-Fi off while audio plays.
- **Boot time:** the car checks its modules in the first three seconds after it wakes. On the measured cold start, the application reached the bus about 53 s after power-on, so the Pi uses a measured 0.63 W standby. The configured 72-hour halt and long-parking restart have not yet been tested in the car.
- **Power:** the first buck converter dropped to 0 V out at 10 V in, so the Pi reset on every engine start. The Zero has no under-voltage detection, so `get_throttled` told me nothing.
- **Wake:** CAN traffic wakes the Pi from standby. An optional GPIO3 ignition circuit was bench-tested to restart a halted Pi, but it is not part of the installed behavior proved in the car.
Full write-up with diagrams and measurements:
https://duzgun.org/blog/giulietta-blue-me/
The CAN side builds on fmntf's fiatcan project. Happy to answer questions
Processing img 7w10bkvf4wxh1...