New Beginning

When Google announced Android Auto I didn’t have a car, but at that time already I wanted a thing like that. Everything looked good and as an Android developer I was curious — I wanted to try out Android Auto in real life.

In a year I got my first car. Not a new one, a new car is too expensive, and I didn’t have enough money to buy one (and still don’t). My choice fell on a Kia Ceed 2009 with a diesel engine. I was unimaginably happy with this purchase. This is a superb car for a young person: powerful, dynamic, and above all it’s fuel-efficient.

The only upsetting thing was the audio system, which was developed in 2002 and it was even more upsetting that Android Auto from Google was intended only for modern cars. This is how I got the idea to make my own Car PC.There is a huge number of Car PCs on the market, including ones operating on Android, but these solutions are either too expensive, proprietary or poorly executed.

I decided to make my own fully customized version of such a Car PC. But for one reason or another I postponed this idea for a long time. Either I had no time or the needed components or some other obscure excuse got in the way.

Xanten, Germany

The turning point occurred on April 1, 2016 when I saw the announcement for the Google I/O Android Challenge on Twitter. There it was! This was exactly that extra incentive that I needed to get going with my idea. At that time I was in Germany and had no access to my “working lab” that is why I started from started thinking through a plan of actions and recalling the electronic components and blocks I had available. Turned out I had just about enough because I love experimenting with electronics and making DIY devices.

So, the block diagram ended up looking like this:

  1. Android Tablet. A cheap 7 inch tablet ($70 — $75) with 1GB of RAM, a 1.2 GHz processor, a 3G module, WiFi, Bluetooth 4.0 and most importantly — OTG support. Android version 4.4 KitKat.
  2. An old non-working sound system. Exactly the same as in my car. It will serve as a body for my device.
  3. A 4-channel amplifier with 40W per channel. Exactly matching the number of loudspeakers in my car. The amplifier microchip is almost the same as in the original sound system.
  4. Arduino Pro Mini Board (Replica). In the hardware recommendations for the Challenge included the expansion board IOIO but there was neither possibility nor time to buy one. Therefore I decided to use a different one. Arduino is a perfect platform for understanding the principles of electronics. It is open source too. It is easy to replace it with something else, including the IOIO board. It is used to control the buttons on the steering wheel and transfer the data to the tablet.
  5. Set of blocks which reduce the voltage. Since my Car PC must be powered by on-board network, with power of 12–14V, these units are extremely necessary.
  6. Battery control module. It serves to feed the device and charge the battery continuously, as the device ceases to be mobile and charge it externally is not convenient.
  7. FM radio module. In Europe and Ukraine in particular FM radio is very popular. In my tablet there is a built fm radio, but the software developer did not care for it to have a landscape mode, and a lot of other tablets, including Nexus tablet, do not have built-in radio module and I didn’t want to deprive users of my Open Source project the opportunity to listen to the radio.
  8. USB Hub. Firstly the inverter is connected to it, which allows to communicate with the Arduino board. The converter on PL2303 chip is very popular and costs about 40–50 cents. However a different USB-UART converter can be used (e.g. CP2102, FTDI, etc). Talking about the USB hub, I could do without it but additional USB ports allow you to connect an external hard drive with music, a web camera for DVR, a sound card or other HID devices to the system. Android is “omnivorous” — and this is why I love it.
  9. Audio input switching module. I chose a widespread one — namely TDA 1029. It allows to switch up to 4 channels of audio. The first channel is for the tablet. The second — for the radio. The third channel I will lead to AUX. My passengers often ask me to put on their music — this will be for them. The remaining channel can be used to connect a Bluetooth audio module.
  10. NRF24l1 module. I haven’t used this module yet, but it has great potential. For example it can be used to create a security alarm or connect external sensors to which it is difficult to lay wires. It is possible for example to put an exhaust gas sensor directly on the outlet of the muffler or implement automatic opening/closing of the garage door.
  11. Small auxiliary components. Firstly, the ULN2003 — it is used to simulate the pressing of buttons, for example turning off/on the display or to rebooting it. Secondly, the components controlling the turning on/off the amplifier, so that it doesn’t consume the battery in standby mode.
  12. OBD2 module. It isn’t shown on the photographs. It is inserted into a special connector. In my case it’s ELM327. The tablet communicates with it via Bluetooth. This module transmits to the tablet a lot of useful information from the vehicle CAN bus. This information can serve to diagnose and timely detect malfunctions, as well as keep logs of vehicle parts. Engine speed, engine load, oil pressure, systems temperature, fuel consumption — all of these indicators will help me to keep a diary of the car use and more carry out maintenance works more thoroughly.

The first development step was the preparation of the case. From an old broken sound system I extracted all the electronics, leaving only the connector for automotive wires (power, speakers, steering wheel buttons) and the connector for an external antenna. In the plastic frame, which had buttons, I cut a hole the size of a the tablet touch screen. The back cover of the tablet had to be removed to make room for the soldering. The plastic of the touch screen protruding beyond the glass touchscreen I carefully removed with a sharp stationery knife.

Inside the plastic frame of the sound system I flattened ridges so that the tablet could be easily inserted into the frame. Since the frame has a slightly convex shape I filled the extra space with a hot melt adhesive. Then I smoothed out all external uneven spots, and to hide the visual defects, covered the frame with a carbon film. The result looks quite acceptable. Similarly you could produce the frame using a 3D printer or a CNC machine. But I had neither of the tools.

Old one. New one.

Step number two: we fasten electronic components inside the case. I placed almost all components on the breadboard. The amplifier is attached to an aluminium plate that serves as a cooler. Between the microchip and the amplifier I applied a layer of thermal paste.

On the tablet I determined the desired soldering points and soldered wires to the nodes which are used (the battery terminals, the signal side of the power and sound buttons, headphone output, USB-OTG). The tablet was transferred to the headphones mode, because the internal speaker supported only MONO sound mode, while the headphones sound runs in STEREO mode, and is much cleaner. The second part of the wires that go from the tablet is sealed in the 25pin connector. Why so many pins? I just used what was at hand.

USB Signal wire which is responsible for the operation of the default USB/USB OTG is connected to the system via the button which saves the on/off state. This is done so that it was possible to debug applications on CAR PC without disassembling the case by connecting directly to the USB port on the tablet. I didn’t solder the contact responsible for USB charging since the internal electronics is powered by the car battery through converters, and the tablet is powered through a charging controller as I described above.

On the block diagram I showed only the schematic relationship between the blocks as additional information can be obtained from the datasheet of the components used, and the project followers may have their own opinion on what contacts to use and where. This is done for the safety of the followers too.

If a person does not understand what they are doing, they won’t harm themselves but will be able to bring down any one of the components — after all this is what a real experiment is about — you break something, you understand your mistake, learn, and do not repeat it again. Be careful and extremely attentive.

What is not yet done, but planned: the installation of a digital potentiometer to control the level of sound from the radio module connection of a radio module NRF24l1, and most importantly, the installation of a power “filter”. Exactly — an automotive circuit has a lot of parasitic currents and noise, and the older the car the more of them.

Work in progress

Step three: software development. At the moment, I developed firmware Arduino which allows you to control the buttons on the steering wheel, radio control, control buttons on the tablet (this latter can also be realized via Android except for the power on/off), switch on and off the sound amplifier. I am also planning in the near future to optimize the firmware code, realize the standby mode of Arduino, optimize the amplifier power control and other units, connect the library to work with NRF24l1 and develop a wrapper for it.

In the demo project Android I used the library to work with UART from Felipe Herranz , Google Maps api and android SDK). Started working with OBD — 2 from Paulo Pires— the only good open source project that is worth taking as an example (many thanks).

All things considered, Android is an excellent choice to implement such things. It combines the openness of Linux, the beautiful UI with the ready implementation of popular use cases. I’m going to continue the project without installing Root access on Android, so that this project could most accurately be reproduced on any phone or tablet.

Conclusion. Dreams come true, but you need to work hard. No matter how many failures happen don’t give up. Learn. Believe in yourself. Share your experience and knowledge. Experiment! This is the only way how a new beginning can happen in your life.

P.S: follow the development of the project on GitHub and Android Force be with you(c)