Skip to content

Getting started with Crankshaft

inspector71 edited this page Aug 17, 2018 · 56 revisions

This article (15 mins read) will guide you through the basic idea of Crankshaft, the hardware needed, set up and some safety tips.

If you'd rather follow a video tutorial: English, German.

** Android Auto in a nutshell

Android Auto is more than one concept.

*** Flavours

Whilst Android Auto may take the form of software pre-installed in your very new car's swanky head unit, in an Crankshaft context, Android Auto is first and foremost an app you run on your Android phone.

*** Form factor

In a Crankshaft context, Android Auto is not software running on a head unit. Instead, the Android Auto app runs on your phone and sends a software projection - most simply via a USB cable - of itself, and supported apps like Google Maps, running on your phone.

*** OpenAuto

The Android Auto app doesn't officially support third-party head units in an inexpensive DIY context. However, in the first quarter of 2018, Polish developer Michal Szwaj released the OpenAuto emulator software designed to receive the projection from the Android Auto app running on your phone.

OpenAuto was originally developed for use on hardware such as the Raspberry Pi with a touch screen.

The combination of an Android phone, running the Android Auto app, projecting the Android Auto app's output signal to a Raspberry Pi equiped with a touch screen and running OpenAuto, becomes a potentially very low-cost and effective car head unit comparable to the functionality offered by current-day head units.

** Crankshaft: a pre-canned OpenAuto operating system for DIY head units

Crankshaft is a Linux distribution intended to run OpenAuto and provide as much of the out-of-the-box additional helpful functionality that is not strictly part of OpenAuto but is being developed to make OpenAuto more user-friendly to set up and use.

A Crankshaft head unit could be considered analagous to a thin client computer with your Android phone being the server.

*** Limits

A Crankshaft head unit has very little control over the phone and what apps are running on it.

The primary input passed from a Crankshaft head unit to your phone is touches on the touch screen (and maybe potentially sensory data).

A Crankshaft head unit can refuse to help the phone take over audio. This is especially helpful if you want to use a Bluetooth stereo system already working in your car.

You need to make absolutely sure your safety does not depend on an Android Auto head unit!

Crankshaft is not an official Google product.

Crankshaft and OpenAuto are generally one-men DIY projects published in the hope that they will be useful and fun and under the assumption you will take responsibility for your safety, and that of others, if using them.

Crankshaft and OpenAuto are not endorsed, or certified by, Google.

Crankshaft could break at any moment without warning.

Crankshaft may stop functioning altogether if Google decides to block OpenAuto through 'updates' to any of the Android ecosystem.

Please be advised that although we strive for a quality product that we love to use ourselves, this product comes with absolutely no warranty whatsoever.

If you understand and accept the above terms, please proceed and you'll be guided through the following basic stages:

  1. Obtain the hardware
  2. Assemble the hardware
  3. Download and write the img to an SD card
  4. Insert the SD card into your Pi and power it up

Hardware you'll need

You'll need the following

Getting started materials

  1. Raspberry Pi 2B/3B/3B+: 3B/B+ has built-in WLAN and Bluetooth (might be useful in the future). You can use pretty much any Raspberry Pi except for the Pi 0 which doesn't have the DSI connector.
  2. A microSD card that is 4GB or larger. Samsung branded ones (the EVO line) and Sandisk ones are great.
  3. Raspberry Pi Touchscreen: The original 7" works great and no additional power connection required.
  4. A smartphone running Android 5.0 (Lollipop) or newer version. Install Android Auto Gearhead
  5. USB cable to connect the phone to Pi.
  6. Cigarette lighter to USB converter. Get a proper one with high amperage (2 Amp or more). Don't buy the cheap ones at the dollar stores.
  7. USB cable to micro USB to power the Pi.
  8. Some kind of mount for the PI/Touchscreen and maybe even one for the Phone. Several choices are available: Here or here or here.
  9. Stereo or amplifier to play music on car speakers. A 3.5mm male-to-male audio cable. The audio cable is optional if you could get Bluetooth audio to work.
  10. If you want OK Google to work, you need to buy a USB microphone. Here is one.

All the links above on Amazon are not affiliated and are linked for reference only. You are encouraged to search for better prices elsewhere and buy at local stores to support their businesses. Usually, MicroCenter has better prices on at least the Pi and the touchscreen.

If you buy on Amazon, I would encourage you to use http://smile.amazon.com and select a charity of your choice (If you don't have one in mind, please consider Free Software Foundation/FSF and Electronic Frontier Foundation/EFF).

Assemble the hardware

If you're confused with the touchscreen, there is a guide here you can follow - Please read the "Building the Screen" section.

Assembled screen

The assembled screen should look like this.

After connecting the ribbon cable, you'll need to connect two more additional wires.

Here are some helpful diagrams:

You'll see this:

It corresponds to:

You'll need to connect the 2 pins: Ground (GND/black) and 5V (red) to the 2 pins labelled GND and 5V of the touchscreen. Do not connect the two others as the tutorial above said, you do not need it (but it doesn't do anything bad if you do so correctly).

Take extra caution when you connect the 5V/GND, because you might fry your screen/your Pi if you connect it wrong.

Write Crankshaft to your SD card

Go to the releases section of Crankshaft and download the 500MB-or-so ZIP file to your computer.

Caveat: You can't drag the Crankshaft Zip file you downloaded to the SD card, it won't work :)

You need a software such as Etcher to write the Crankshaft image to the SD card. It will ask you for the image you want to write, give it the ZIP file you downloaded and put the SD card in, then proceed to let Etcher write the image.

Finally, put the whole thing in and start your car, and connect your phone!

Customizing Crankshaft

Get a nice wallpaper for your car in the pictures section of the getCrankshaft homepage.

Refer to Customizing Crankshaft if you're more technically inclined.

Credits

Credits to https://www.reddit.com/user/Khyl for the materials list. Thanks to ETA PRIME/Youtube, Hoerlis Tutorials/Youtube for the video.

Clone this wiki locally