CarPC

https://forum.odroid.com/viewtopic.php?f=55&t=33941

In this article, I’d like to introduce you to my CarPC project. This project is built from four main parts:

  • A custom display based on a 2 DIN Android head unit case
  • ODROID-XU4Q
  • ZTE Blade for 3G modem and GPS tracking when the car is shut off
  • LG LAC5900RN head unit for amplifier

Figure 1 - The display as seen after installation
Figure 1 – The display as seen after installation

The main features of this finished project will include:

  • Android 7 (LineageOS 14.1)
  • Live traffic navigation
  • The ability to play music from local storage as well as Spotify
  • Engine diagnostics and live data through OBDII socket

There are a number of features that are still works in progress at this time, including Bluetooth Hands-free Profile (HFP) for hands free phone calling over Bluetooth (yes, I have a solution for this), and GPS tracking software for the ZTE Blade to track my car’s location at any time and warn me when the car is moving without me (without my phone’s Bluetooth signal).

Display

I had a 2 DIN Android head unit which fits perfectly into my car dashboard. I recently used this unit, but bricked it when I tried to root the OS on it. So I bought a display panel with a better viewing angle, a touch panel, and an HDMI drive board.

The display case has three backlit buttons, a potentiometer (an encoder), and a USB socket. To get the buttons working I used a USB keyboard drive board, and I soldered the three buttons to F1, F2 and 0. The encoder is connected to the LG head unit (amplifier) master volume and you can turn the display off or on by pushing the encoder. The USB socket is simply connected to the display’s powered USB hub (which is connected to the ODROID).

On the software side, I needed to recompile the OS from source to fix the touchscreen calibration (eGalax 0eef 0001). It was an easier way to make the buttons work correctly. I created my own key layout map (.kl file) for “Home”, “Back” and “App switch” functions.

Lastly, the display case has five sockets:

  • Power In
  • HDMI
  • USB (Touch screen, front buttons, front USB socket)
  • RJ45 (HDMI display drive board buttons)
  • Jack (volume remote)

Figure 2 - Some of the outputs on the display module
Figure 2 – Some of the outputs on the display module

OBDII ELM327 USB cable

Of course, I had the wrong USB to RS232 converter interface, so I needed to fix this little problem. I converted it from the CH340 chip to the PL2303 chip which is compatible with the software.

Figure 3 – Switching out chips

ZTE Blade

The ODROID’s production kernel does not contain the Remote Network Driver Interface Specification (RNDIS) kernel module which is needed to share your Internet connection from your Android phone to the ODROID via USB. I recompiled the kernel with this kernel module and created a userinit script on the phone, which automatically turns on the USB tethering function when the phone is connected.

Figure 4 - After the recompile
Figure 4 – After the recompile

LG head unit

I also added a line-in RCA connection on the back.

Figure 5 - Line-in RCA jack
Figure 5 – Line-in RCA jack

ODROID

The biggest challenge was making sure that the ODROID shuts down correctly when the ignition is turned off, and that afterwards the power also goes away. I created my own power supply and power control boards, which seemed to do the job. If the ignition is switched off, the system shuts down and then one minute later the power to the hardware is cut off. I have a special USB socket which stays powered when the car ignition is off that keeps the ZTE blade alive.

Be the first to comment

Leave a Reply