'35 Flatlander

Post Reply
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

'35 Flatlander

Post by MrNick »

Greetings from -34C Alberta. With the first deep freeze here I'm finding the hours needed to finish building & installing a head unit in a 1935 custom built truck on a '97 Chevy S10 4x4 chassis; a project started in 2011 and put on the road in 2023. I doubt it will ever be 'done'...

The head unit build was started a few months prior to my discovering Hudiy, and I'm thankful for your application: my python is marginal but I did have OBD and GPS working before the addition of the Carkit dongle and its live iPhone connection.

The unit has a Pi5 8GB 256GB M.2 with RTC on Trixie attached to a 10" HMI. All power flows via Waveshare 3S UPS configured to power up by a momentary switch latching relays that remain powered until commanded off by the Pi several minutes after the truck ignition goes to zero. Attached to the pi is a powered USB hub hosting the Carkit adapter as well as RTL-SDR and OBD2 connections. A buck converter charges/ isolates truck +13.6v from the UPS +12v and separate grounds are maintained on the truck and logic circuits.

The Pi/ Hudiy/ Carkit are configured/ working and I'm finishing up the wiring. The dash has been modified with a bigass hole and mounts have been designed, printed from PA6 and installed.
IMG_1912.JPG
IMG_1912.JPG (2.39 MiB) Viewed 718 times
IMG_1913.JPG
IMG_1913.JPG (2.34 MiB) Viewed 718 times
IMG_1914.JPG
IMG_1914.JPG (2.54 MiB) Viewed 718 times
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

Time to smoke test.
Attachments
IMG_1482.JPG
IMG_1482.JPG (5.26 MiB) Viewed 686 times
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

Design criteria:

1.) Parasitic draw when off is not permitted.
> RPi5 must disconnect when off; normal shutdown leaves the computer in 'low-power-mode'.
> HMI screen must disconnect when off; backlight remains on when connected to power.
> UPS must disconnect when off; LiPo batteries are not to charge when system not in service.

Operation:

2.) Manual startup with a demo mode bypass.

Momentary button pressed -> amber LED lights (13.6v truck active)
Buck converter powers up -> red LED lights (12v Buck out active)
UPS on switch activated -> blue LED lights (5v UPS out active)
RPi5 comes up -> green LED lights (Pi alive) (to do)

3.) Auto shutdown:

The Waveshare 3S UPS charges while discharging: being a smart device, internal voltages and current are available via python script. A Pi script monitors the supply voltage and starts timing down upon loss of mains. The Pi then winds things down and commits suicide by gpio.

4.) Manual shutdown:

Securely located Blue Switch of Death.

Hudiy.

5.) Pi starts -> scripts start -> Hudiy starts -> iPhone connects -> music starts -> happy place.

So far it performs as designed. Next step is to plagiarize a few scripts then add a second Bluetooth to stream tunes from iPhone -> Hudiy -> Kenwood bluetooth only amp + sub. 1kw of Tiesto & Mathame in a 1935 truck cab... I'm on my second sub... Right now it's wifi from phone to Pi then b/t to amp, but I'm thinking that's asking for trouble.
Attachments
IMG_1486.JPG
IMG_1486.JPG (5.94 MiB) Viewed 638 times
IMG_1487.JPG
IMG_1487.JPG (5.91 MiB) Viewed 638 times
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

Details to follow. '35 Chev truck on a '97 S10 4x4 chassis.
Hudiy first photo edited.jpg
Hudiy first photo edited.jpg (3.62 MiB) Viewed 328 times
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

I'm gonna describe a couple things I've learned along the way but haven't seen discussed here. Please correct any mistakes; I'm still learning.

Setup: iPhone bt+wifi --> CCPA adapter/Hudiy tunes bt --> truck amp+sub. RPi5 wifi off, RPi onboard bt <--> iPhone, RPi bt dongle <--> truck.

Blueteeth

Using bluetoothctl set system-alias names for both bt controllers; thank me later. Select RPi_Native controller as default and scan on. Open iPhone settings to bt to wake it up and trigger its mac address to show on the scan. Scan off. Do the Apple dance and pair mac, connect mac, trust mac.

Select dongle TPLink controller as default. Scan on. Note truck mac address on the scan. Scan off. Pair mac, connect mac, trust mac.

iPhone <--> RPi_Native << RPi5 >> TPLink dongle <--> truck

NB: If the dongle controller is powered off (bluetoothctl:show) unblock mac, power on.

Pipewire

Dropouts troubleshooting: Test/set audio buffer variables:

sudo mkdir /etc/pipewire
sudo cp /usr/share/pipewire/pipewire.conf /etc/pipewire/
sudo nano /etc/pipewire/pipewire.conf

default.clock.rate = 48000
default.clock.quantum = 1024
default.clock.min-quantum = 700 <- seeing reference to this as 'frames' (?)
default.clock.max-quantum = 2048
default.clock.quantum-limit = 8192
default.clock.quantum-floor = 64

The CCPA has 2 audio options (via its onboard 192.168.43.1): CD (outputs at 44100) or DVD (48000). Use DVD to match default.clock.rate. Can be checked using pw-top. NB: Use caution changing the CCPA wifi & bt names/settings: brickable.

Hudiy

With pw-top I found the echo_cancel module was all errors so I commented it out in hudiy_startup.sh . My use case is music and would disable phone calls if possible (haven't got that far, but will try iPhones Driving Focus mode).

RPi5

Dropouts troubleshooting with dmesg showed the CCPA was reconnecting 3-4x per song for ~ 2.3 seconds causing a momentary skip.
Fix: turn off USB autosuspend (default 2 seconds).

sudo nano /boot/firmware/cmdline.txt
append usbcore.autosuspend=-1

---------
@hudiy

> My intent is to have music stream via bt from iPhone to truck (with or without going through the RPi5) and use Hudiy for control.
> Without CCPA/Hudiy the bt flow iPhone-RPi_Native-TPLink-truck works deluxe.
> Also, I can bt direct from phone to truck and Hudiy will allow start/stop but little else.

The CCPA adapter appears to use wifi to transfer from phone to USB. But I'm not sure; next up is to watch USB traffic.

Any thoughts about how to proceed? I'm about tapped out. qpwgraph shows one connection: hudiy.equalizer to truck.

Your comments in this thread is where I'm going: viewtopic.php?t=19

Quote\
You would need two separate Bluetooth adapters (e.g. the built-in module on the Raspberry Pi plus an external USB dongle).

In that case, PipeWire would also need to be correctly configured with HFP Sink/Source and A2DP Sink/Source roles - but unfortunately, we haven’t tested PipeWire in this type of setup, so we can’t confirm if it works reliably.
\Quote

----

March 30: Chasing dropouts.

The CCPA definitely uses wifi to communicate via USB; what was confusing me was the phone did not show as connected to the 'AutoKit-5041' SSID, so I forced the issue: on the iPhone I switched the AutoKit-5041 IP configuration from Automatic to Manual with IP 192.168.43.100, Subnet Mask 255.255.0.0 Router 192.168.43.2, automatic DNS and joined the network: after several songs still no dropouts and the phone remains locked to the SSID; wait and see.
hudiy
Site Admin
Posts: 517
Joined: Mon Jul 14, 2025 7:42 pm

Re: '35 Flatlander

Post by hudiy »

In version 1.10/2.6 we introduced captureAudioOutput configuration parameter for Autobox dongles.

It allows enabling/disabling capturing the audio (music, navigation guidance, voice assistant) from the phone and let the phone decide how to route the audio (e.g., via A2DP, Jack).

viewtopic.php?t=191
https://github.com/wiboma/hudiy/blob/ma ... md#autobox

You can try setting it to false and then pair the iPhone with your truck's amp to playback the audio from CarPlay.
Hudiy Team
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

Updated to 2.12

Set main_configuration.json/ captureAudioOutput = false.

RPi_Native bt controller paired with iPhone (via bluetoothctl).

TPLink bt controller paired with truck (via bluetoothctl).

iPhone wifi connected to AutoKit-5041 (CCPA adapter)

Result = Success! Music is streaming via bt from phone to RPi_Native to TPLink to truck, with full control from phone or Hudiy or CarPlay. Genius!

Proof: Can turn iPhone wifi off and CarPlay stops but music keeps playing (no glitch!) and Hudiy still has control! We have 100% bluetooth signal chain with control! Turn phone wifi back on and CarPlay comes up with no problem (still no music glitch!).

:) pw-top shows bluez_input as the iPhone and bluez_output as the truck.

No dropouts! (yet...)

Survives reboot!

Thankyou. I am humbled by your expertise.

fyi, due to lack of space (1935 trucks are Small) I chose a bluetooth only amplifier with wired remote designed for off-road utility vehicles. Kenwood KAC-M5024BT https://www.kenwood.com/ca/car/motorsports/kac-m5024bt/ and a matching powered sub.
amp.jpeg
amp.jpeg (1.47 MiB) Viewed 196 times
sub.jpeg
sub.jpeg (1.44 MiB) Viewed 196 times
speakers.jpeg
speakers.jpeg (1.82 MiB) Viewed 196 times
There's also a pair of tweeters with HF crossovers hidden above the rear window.
MrNick
Posts: 9
Joined: Mon Oct 27, 2025 1:04 pm
Location: Alberta
Contact:

Re: '35 Flatlander

Post by MrNick »

re: Waveshare 3S UPS

Things didn't go as planned. The initial design was for a script to monitor the inlet voltage of the UPS using its INI219 chip, and initiate shutdown when that voltage dropped out. The script works fine, but I mistook 'inlet voltage' to mean 'inlet of the UPS' rather than what it is: 'inlet to the chip', and the chip is at the outlet of the UPS, so: battery voltage. I bowed to the obvious and added a small board with 2x relays -> 2 GPIO pins to inform the Pi of the power state.

The 3S has 5V -> RPi5 on one set of pins, 5V -> relays & LEDs on another, and 12V -> relays & LEDs & USB hub on a third pair. With this load, the UPS was discharging faster than it was charging. About 90 minutes to empty but likely less than that. Because the design is to only charge when running, it meant I'd have to charge the LiPos by an alternate means between uses. To get around this, a second Buck converter was added at the top of the first, and both its output and the UPS output were tied together through diodes, so the new Buck powers the Pi and there's an instant changeover to the UPS upon Power Off, while the UPS powers the hub, relays and lights. Head Unit V2 will have an upgrade, but for now the startup/ shutdown logic works near perfect. I can still screw it up but even that's become rare.

I'm happy with it. Real happy. The fit is perfect, and made so by printing a custom foam gasket with SirayaTech TPU air.

Head Unit instu a.JPG
Head Unit instu a.JPG (2.99 MiB) Viewed 145 times
Head Unit insitu b.JPG
Head Unit insitu b.JPG (2.47 MiB) Viewed 145 times
Post Reply