Categories
Electronics GitHub PiDashCam Raspberry Pi

An Update…

So, after being alerted by the Raspberry Pi Weekly mailing list to a liveblog by Alex Eames detailing his process for building a biking “dash cam” I thought I better start detailing what I’ve done, what I’m currently doing, and what I plan to do with my PiDashCam project which has taken a back seat for a number of months years. I’ve watched the videos Alex has made, but not yet looked at the code. My first post was using an Original Raspberry Pi with no camera attached, hooked up to a GPS module to ensure I got valid GPS data, and a small SPI screen so I could view the data

The Before

Unfortunately work and life took over and apart from spending a few odd minutes here and there over a number of months, no real advances were made apart from this update in which I was now testing with the Raspberry Pi Zero W, and figuring out how to get it talking to the GPS module, with the accelerometer, button and RGB LED all hooked up (but still no camera).

The After

I’m now going to try and update here with that I’ve decided upon, some new design goals and design directions, and the code needed to run my PiDashCam, in addition to stripping back to the bare essentials (you know, like being a camera).

I’ve remained with the Raspberry Pi Zero Wireless and I have an RTC Module hooked up, in addition to the camera, and one button. At present, the Pi boots, and automatically runs two scripts.

The new, updated, lesser qualified PiDashCam

The first, record.py, grabs the date and time, starts the camera, and starts recording, updating the annotated text on the screen. It then outputs a new file named after the current year, month, day, hour, minute and second (YYMMDDHHMMSS) every pre-determined number of seconds (roughly). You will be able to view this source code on GitHub as soon as I get round to uploading it. It also annotates the current date and time, and the current camera_mode.

The second, start.py, simply waits for the button press. At present it only detects an on push, nothing fancy like a multiple second hold. It then gracefully pkills the Python Process that is controlling the camera and after a few seconds delay, initiates a shut down of the Pi.

As its a bit unwieldily at present, I’ve stuck and blu-tacked it to a cheap dash camera I bought from eBay or AliExpress at some point or another. 

The camera works when testing in my house. I’ve still to take it a road test and make sure it works. I have a second, cheap Dash Cam that was another eBay or AliExpress special that does what it needs to do, but the quality is pretty poor. I plan on keeping both cameras connected and comparing the output. If I cant at least match the quality of a sub £20 Dash Cam then there’s no real point in continuing this one.

My Plan is as follows

  1. Test the camera, make sure it works in the car
  2. QUALITY CHECK
  3. Test multiple camera modes with the First Edition Raspberry Pi Camera
  4. Test multiple camera modes with the Second Edition Raspberry Pi Camera
  5. Test multiple camera modes with a cheap FishEye Pi Camera
  6. QUALITY CHECK
  7. Add in GPS Logging
  8. Add second button for marking of emergency record
  9. Add in G-Sensor for additional annotation and Emergency Record Function
  10. QUALITY CHECK
  11. Create a settings style file where all user-selectable settings are set
  12. Put it all in a nice case
  13. Work out a way to convert the raw h264 files to a usable mp4 format
  14. Build a nice web-based interface with an API so that apps can access the files/settings via Wi-fi
  15. Integrate with the CAN-Bus to take car data for better analysis of driving etc.

After each quality check, if the quality is not something that is useful then it could be a cancellation of the project. I’m trying to provide a more organised, and focused attempt this time and having these Design Goals will ensure that I focus on what’s required without jumping ahead. As always, I’m a great started and terrible finisher, but hopefully that will change!

In addition to the PiDashCam, I’m Aldo going to try my had again at small electronics. I’ve had a plate of 100 of these WS8211B RGB LED’s, and due to the way I stored them, they managed to snap. Playing about with the layout meant I could resonable build a Binary Clock, which I’ve wanted to do for quite a while. Given how many I had though, I figured I could extend this out and make it alternate between a Binary and Regular clock, and seeing as I have an ESP8266 spare, this could all be controlled wirelessly, with the time updated from an NTP server. But, there will be a separate blog post about that!


Updated 20/02/2019 with correct links to Alex Eames blog and minor technical details.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.