Sunday, September 20, 2020

Cheap action cam hacked into dash cam

 


I found this cheap GoPro clone action camera on eBay for about $20. The video resolution is clearly a blatant lie, but if you don't need very high def video it's a pretty capable device for the price. I thought it would do well as a dash cam, but it needed a few hacks first. 

With a combination of 3D print and 3D pen (in ABS) I made a simple magnetic mount to attach it to my rearview mirror. 

When the car powers up, it provides power to the camera (via micro USB), and the camera powers up by default. But it still required me to manually start the recording, and then to stop it and turn off the camera after turning the car off. I wanted to make this process completely automatic, so I opened the housing and probed some connections to find what I needed. Fortunately all the signals necessary were available on this one board on the top of the camera where the record button is:


After the scope showed that switch signals weren't scanned or multiplexed, it was easy to fake button presses just by directly connecting switch signals to GPIO lines. The added microcontroller would run from a switched 3.3V rail, so to safely sense the 5V external power, I added an N-channel FET to provide a pull-down signal when it was present. The added microcontroller is a PIC10F322 on a small breakout board:


The firmware is a very simple state machine that detects a bootup due to external power, and then provides switch inputs to start recording. If the camera is started up manually instead, the hack chip does nothing so that the camera can be used normally. While recording, it just waits until external power is removed (because the car has been turned off), records for a bit longer, then stops recording and turns the camera off. 

Here is the firmware: https://github.com/tterev3/dash-cam-controller/blob/master/dash%20cam%20controller.c

And here is a short demo video of the whole process:





No comments:

Post a Comment