Ad

Sunday, January 27, 2019

Car DVR replacement and related shenanigans

Introduction

With the vulgarisation of miniature cameras and computing devices of all sorts, technologies that fundamentally serve the mobile industry become cheap enough and available to the point of being useful for other purposes. That is the case of DVR devices for automotive use.



Context

Some time ago, I bought very cheaply (about 30 Euros) a basic DVR in the form of a rearview mirror. It worked well, serving two main purposes: 1 - continuous recording (of both rear and front cameras) during driving; 2 - provide rear view camera image while backing up the vehicle.





However the device failed partially, when in one occasion I was connecting the reversing camera jack to the device. Because of a mod I did previously (in order to support a replacement 12 Volt powered reversing camera) I let 12 Volts be present at this connector, probably being sufficient to put excessive voltage at the video input during insertion of the jack. The analog input for the rear camera ceased to work ever since.

New device

This was the opportunity to replace this device with a new one. While looking for alternative devices, I found one (among very similar products) that caught my attention: it was a complete replacement of the car original mirror, instead of strapping on top of the later, as it was the case for the previous unit.

While not being a fresh new hardware architecture (it is a 2017 design, featuring a Mediatek MT6735 quadcore chip and running Android 5.1), it still has a number of features which made it an interesting proposition for the price (which is obviously higher the original unit I had). I ordered it from Aliexpress, even though it can be ordered from some other chinese ecommerce sites:
https://pt.aliexpress.com/item/2017-Newest-8inch-4G-Touch-IPS-Car-DVR-Camera-Mirror-GPS-Bluetooth-WIFI-Android-5-1/32807302235.html

Like other DVRs, it also continuously records to a MicroSD card (it is readily recognized by my Kingston 128 GB (type 10) card formatted in ExFAT), and it displays the reversing camera when the gear is engaged. A second MicroSD slot is available for using with the GPS tracking or other I/O operations that could upset or be delayed by the constant access to the main MicroSD caused by the continuous video capture.

It also has a host of other features, and given that it is a regular Android device, most regular apps such as Waze, Sygic, Torque, etc can be installed.

For example it has some ADAS (Advanced Driver Assistance) features such as warnings for:
  • collision avoidance - it warns if the car is too close to the forward vehicle, from a certain speed;
  • lane departure - it warns if the car leaves the current lane;
  • forward vehicle movement - tells if the vehicle in front started moving,when stopped in a lane of traffic.
While it is not a Mobileye, still in most of the times I could test, it correctly detects these situations. It is a pretty impressive package, considering that is solely based on vision, using generic hardware. It is worth noting that these types of features are often not originally available in many current vehicles.

An app for the smarphone, called CarAssist, is also part of the package:


It provides an interface for managing the DVR recordings, stream the via wifi (the device can be put in hotspot mode), and download/share on social networks.



Using the device own 4G connection, it is possible to monitor the front and rear cameras (with a reasonable quality stream) in realtime, from the app.



These recordings can also be stored locally on the smartphone. At the same time the app displays the location of the car, and the tracking is recorded.





Installation

The installation can be a challenge for the less experienced user. Depending on the vehicle, the difficulty may also vary. Regarding the rear camera and the reverse light connection and cabling I did not have to do further work, as I would be using the existing camera and wiring that I had previously installed.

To install the rear camera (perhaps the biggest challenge), the user must find an appropriate spot (I personally choose to install it inside the car, close to the top part of the rear window.


After that the user has to plan how to do the cabling. In my case I have decided to pass it through the roof, between the steel body and the interior lining of the roof. In order to be able to pass the cable, I first pushed a long plastic strip across the roof, and once it reached the far end of the roof, I taped the cable to the strip. After being securely taped, I pulled the strip, and the cable followed. Repeated this process in every path requiring cable to be passed.


While the new DVR had a slightly better original camera:


still it was no match to the FPV camera that I had already installed in the car since the previous DVR.

This camera features better low light sensitivity, and a wider field of view compared to the basic camera provided with the kit. It is a Eachine C800T, typically used in FPV drones. It can also be easily purchased in chinese ecommerce for 10-15 Euros:

Unlike the original camera, which would be powered by the 5 Volts coming from the DVR, for this camera it would not be enough, being in the low end of its voltage range (5 - 15 Volts DC). For stable video, 12 Volts would be ideal for this camera.

Given that the this new DVR also provides 5 Volts for the rear camera, and I would want to retain the DVR ability to control the power to the rear camera (like for example switching it off for power saving), a different solution would be required.

A basic solution would consist of running the camera from the car ACC rail, which provides 12 Volts only while the key is on. This however is not ideal, because during remote operation of the DVR via 4G cellular connection (e.g. during use of the CarAssist app), it would not be possible to power the camera on.

This reduced to potentially just one option: to control the camera through a relay powered by the 5 Volt pin of the DVR. This would allow 12 Volts to be switched based on the state set by the DVR. The 12 Volts would be provided by the battery B+ source (always available) just as one of the DVR power rails.

In order to properly organize the connections and include the relay and a filter for the reverse light signal (more on that later), I built a simple PBC board, containing those two items:


On one end would be the DVR mirror round 8 pin connector, and on the other end, the 8 terminal connector that would mate with the corresponding connector on the car side:


The power (ACC, B+) along with camera signal and reverse light signal would be routed via the different cables towards this connector.

In order to have access to the fuse box, the cables would have to be routed through the inside of the left front window pillar:


Zip ties would allow these cables to be bundled with the existing wire loom. The side opening of the dashboard would allow for access to the fuse box from behind, also allowing the cables from be further tied to the existing structures:


GPS antenna

Given that this device is also enabled in terms of localization, a GPS radio is (almost) necessarily present. In this case, the sensitivity of the receiver is quite impressive, sometimes enabling a lock to be acquired, even withouth the GPS antenna connected.

I wanted to maximize the ability to properly receive the GPS signals, while at the same time keeping the installation clean and discrete, by keeping the antenna concealed.

First, a small optimization in the antenna housing was performed: given that GPS antennas are no more than patch antennas (a square  conductive plate - the active element, on top of a ground plane) featuring a low noise amplifier colocated with the antenna body, the ground plane should in general be as large as possible.

As such I tried to increase the ground plane surface by attaching a copper plate to the bottom of the unit. This would at the same time, depending on where the antenna would be placed, allow the ground plane to be increased by just placing it in contact with another metal structure.

I first opened the antenna casing, which was ultrasonically welded inside:



Drilled an orifice in the center of the plastic base:


Cut a copper plate to match the dimensions of the base:


And soldered the antenna amplifier can to the copper plate:


In order to be easier to attach the antenna to another structure, drilled several orifices in the casing in order to allow zip ties to pass through:


Regarding the location where to attach the antenna, I tried to find a spot inside the dashboard which would not be covered by metal and where the presence of the antenna would not mechanically impact any function on the dashboard.

Without going through greater lengths dismantling the dashboard to find the ideal spot, found a place which would be sufficiently good: under the ventilation fins on the left side of the dashboard:



It was of easy access, and the only obstacle between the antenna and the sky would be plastic and glass, as such with a negligible relevance at the wavelengths the GPS system operates.

Next I will be posting some details on the rear camera installation, and on the overall operation of this new DVR.

Stay tuned!

No comments: