8.4 KiB
VolvoRTI — Android Auto Retrofit for Volvo RTI
An integrated Android Auto retrofit system for the retracting Volvo Road and Traffic Information (RTI) navigation screen. Using a Raspberry Pi 4, custom microcontrollers, custom PCB routing, and 3D-printed mechanical enclosures, this project replaces the legacy navigation unit with a modern infotainment hub running LineageOS (Android).
Warning
Status: This setup faces display quality limitations when driving the original Volvo LCD screen directly due to its low resolution (typically 400x234). Replacing the internal screen panel with a high-resolution LCD while retaining the retractable motor housing is highly recommended.
🛠️ System Architecture
The retrofit consists of two key layers working in unison: the ATtiny84 Controller (vehicle bus decoding + screen motor control) and the core computer (Raspberry Pi 4 running Android).
graph TD
%% Vehicles Inputs
SWM[Steering Wheel Module - LIN Bus] -- "LIN Frame ID 0x20" --> ATtiny[ATtiny84 Controller]
CEM[Central Electronic Module - LIN] -- "LIN Keep-Alive Ping" --> ATtiny
%% ATtiny Processing & Control
ATtiny -- "RC-6 MCE IR Protocol (Bit-banged)" --> Pi_IR[Raspberry Pi GPIO 24 / IR Input]
ATtiny -- "2400 Baud Serial Control" --> Screen[Volvo RTI Retractable Screen]
ATtiny -- "Direct Pin Pulse (PA2)" --> Pi_Power[Raspberry Pi GPIO 23 / Power Button]
%% Pi Processing
subgraph Raspberry Pi 4 [Raspberry Pi 4 - LineageOS]
Pi_IR --> KM[KeyMapper / Input Dispatcher]
KM -- "Volume Up Trigger > 5s LIN Idle" --> SD[OS Shutdown Command]
Pi_Power --> PowerService[Android Power Manager / Screen Toggle]
Client[Wi-Fi Client] -- "Auto-connects at Boot" --> Hotspot[Phone Hotspot]
end
%% Video Routing
Pi_Video[Raspberry Pi HDMI] -- "HDMI Video Signal" --> Screen
classDef hardware fill:#f9f,stroke:#333,stroke-width:2px;
classDef software fill:#bbf,stroke:#333,stroke-width:2px;
class SWM,CEM,ATtiny,Screen hardware;
class KM,SD,Hotspot,AP software;
📁 Repository Structure
- 📁
Arduino/: Microcontroller firmware written for the Arduino ecosystem.LIN_to_IR/: The unified controller firmware. Decodes Steering Wheel Module (SWM) buttons from the LIN bus, outputs RC-6 Mode 6A IR commands to control Android, and drives the Volvo screen motor serial interface (automatic opening/closing, toggle, and car power state detection).RTI_Control/: Legacy screen-only driver firmware (retains original standalone serial protocol testing logic).IR_remote_test/: Test firmware for verifying RC-6 IR signal generation.
- 📁
Kicad/: Schematic, PCB layout, footprints, and Gerber files for a custom Raspberry Pi shield hosting the MCP2004 LIN transceiver, video routing, and power control. - 📁
CAD/: SolidWorks 3D CAD design files (.SLDASM,.SLDPRT) and 3D-printable.STLfiles for the custom mechanical Pi enclosure (case_top&case_bottom). - 📁
Raspberry/: Configuration scripts and mapping files for LineageOS/Android, including customir-keytablemappings and key event hooks. - 📁
Photos/: High-quality hardware builds, installation logs, and system diagrams.
⚙️ Detailed Module Breakdown
1. Steering & Screen Integration (Arduino/LIN_to_IR)
The ATtiny84 is the central hardware coordinator. It decodes steering wheel buttons from the LIN bus (0x20), controls the screen's extension motor via serial commands, and signals the Raspberry Pi using IR commands.
Core Behaviors & Logic
- Startup Extension: The screen automatically opens upon startup (ignition on).
- Manual Screen Toggle: Pressing BACK + ENTER at the same time toggles the screen between fully open and fully closed states.
- Manual Sleep/Wake Screen: Pressing RIGHT + ENTER at the same time pulses the Raspberry Pi's Power pin (GPIO 23 connected to ATtiny PA2) for 150ms to toggle the Raspberry Pi screen's sleep/wake state.
- Automatic Screen Power Control:
- When the RTI screen transitions to closed (via manual toggle or car-off detection), the ATtiny automatically pulses the Power Pin (GPIO 23) to turn off the screen, and sends the serial close command 10 times consecutively to make sure it retracts immediately.
- When the RTI screen transitions to open, it also pulses the Power Pin (GPIO 23) to wake up / turn on the screen.
- Smart Power-down (Car-Off Detection): The ATtiny monitors LIN traffic. If no LIN communication is detected for 5 seconds, the system automatically retracts the screen and sends a Volume Up IR command 3 times to trigger a clean Raspberry Pi OS shutdown.
Button Map & Command Codes
When buttons are pressed, the ATtiny transmits the corresponding Microsoft MCE remote scancodes or triggers hardware pins:
| Input / Combo | LIN Frame Trigger | Active Button Code | MCE Scancode | Action on LineageOS / Hardware |
|---|---|---|---|---|
| UP | d0 & 0x01 |
1 |
0x800f041e |
Navigate Up |
| DOWN | d0 & 0x02 |
2 |
0x800f041f |
Navigate Down |
| LEFT | d0 & 0x04 |
3 |
0x800f0420 |
Navigate Left |
| RIGHT | d0 & 0x08 |
4 |
0x800f0421 |
Navigate Right |
| ENTER | d1 & 0x08 |
5 |
0x800f0422 |
Select / OK |
| BACK | d1 & 0x01 |
6 |
0x800f0423 |
Back / Exit |
| Volume Up (Shutdown) | LIN Silent > 5s | 7 |
0x800f0410 |
Trigger Soft Shutdown |
| BACK + ENTER | Both buttons held | 8 |
None (Local) | Toggles Screen Motor (Open/Close) + pulses Power Pin |
| RIGHT + ENTER | Both buttons held | 9 |
None (Local) | Pulses Power Pin (GPIO 23) to Sleep/Wake Screen |
2. Retractable Screen Serial Driver
The Volvo RTI screen housing requires continuous serial packets at 2400 baud over a single communication line to stay awake and raised.
- Display ON sequence:
0x4C(NTSC),0x2F(max brightness),0x83(execute). - Display OFF sequence:
0x4F(OFF),0x20(standard brightness),0x83(execute). - Keep-Alive / Transition Periodicity:
- When the screen is open, the ATtiny84 continuously writes the ON sequence at a non-blocking 100ms interval (one byte every 100ms).
- When closing the screen, the ATtiny84 sends the OFF sequence 10 times consecutively (30 bytes total, sent 1 byte every 100ms) to ensure immediate retraction, and then stays completely silent on the serial line.
3. Raspberry Pi Customization (Raspberry)
Key Event Remapping
To receive the direct-wired IR signal from the ATtiny, the Pi utilizes ir-keytable with a custom mapping profile:
- Configuration File:
Raspberry/rc-rc6-mce.toml - Command KeyMapper Setup:
# Enable accessibility service for KeyMapper adb shell settings put secure accessibility_enabled 1 adb shell settings put secure enabled_accessibility_services io.github.sds100.keymapper/.system.accessibility.MyAccessibilityService # Map the Volume Up trigger to execute: reboot -p
Wi-Fi Hotspot Client Connection Setup
To allow the Raspberry Pi to connect to the phone's mobile hotspot automatically on boot:
- The Pi acts as a Wi-Fi client connecting to the hotspot SSID (e.g.
"Galaxy S24+ 9091"). - Captive portal checks and internet verification watchdogs are disabled on the Pi via Android settings to prevent the system from permanently disabling the auto-join state of the hotspot when internet availability is temporarily delayed:
adb shell settings put global captive_portal_mode 0 adb shell settings put global captive_portal_detection_enabled 0 adb shell settings put global wifi_watchdog_on 0




