The Raspberry Pi Dash Cam Project – Post 1

I’ve been toying with the idea of building a dash cam using a Raspberry Pi for a while. Every now and then I’ll buy something I think I’ll need for the project, hoping that I would get some time to work on it.

I’ve had a few days holiday, and one of my aims was to at least build a prototype in the days I had off.

I haven’t built a prototype, but I have the majority of parts together and verified that they worked! And it was surprisingly easy, apart from a 1.8″ Display (more on that later!).

Firstly, why not just buy one? Because I think I can build this, and I think I can enhance it and add to it, especially if I splash out and buy a Raspberry Pi 2! Also, why not?

My plan is to have the Raspberry Pi Camera Module recording as soon as the Pi boots to an acceptable state. A GPS receiver should then log the current GPS Position, heading and speed to a text file, and hopefully output some of that to a display. Likewise, an accelerometer and gyroscope should hopefully offer some additional readings to show the standard of driving.I plan to power the Pi via the cars 12v source (the accessory port or cigarette lighter). I will also have to create a safe power circuit so that once the vehicle has been switched off, the Pi shutdown gracefully. I will also have to make sure that when the vehicle starts there won’t be any sharp spikes in electricity which could fry the Pi.

So far I have:
The Raspberry Pi (Model B – Model B Rev 2 if required)
Raspberry Pi Camera Module
A DS3231 RTC (i2c)
A GPS Receiver (UART)
1.8″ Display (SPI).

I have backed a BerryIMU, which has an accelerometer, gyroscope and magnetometer, which will connect over i2c, but that has still to be delivered.

To mount the camera to the window, I purchased some suction pads (the ones with nuts) and I’ll create a custom camera mount to use them with.

Yesterday and today I spent some time with the equipment I have to make sure it all works together, which, excluding the camera, it does! I’ve excluded the camera during this round of testing I want to get everything else working first. Heres the equipment, breadboard style. Please excuse the dust! The Pi was stuck behind my TV.

Heres a quick video of the Pi being powered up in my car, using the equipment I already had to hand. Sorry about the black box, but this GPS Receiver is pretty accurate!

Just now I’m running stock Raspbian, but I have also been playing with buildroot, specifically gamaral’s pre-built image.

It really does boot that quick. Once I have everything set up in Raspbian, i’m hoping a few more days of compiling will get me a full featured Dash Cam that boots that quickly using buildroot. I’m hoping that the recording will start within 5 seconds of power being applied.

All my goals for the system as pretty much listed above. I just have to start learning Python! Good think I backed another Kickstarter project!

With regards to the 1.8″ Display, that was a bit harder to set up.

I was under the impression the Display I had used a ST7735 driver, as everywhere online said thats what the display used. It doesn’t. It actually uses a HX8353 driver.

There is some commands below. Each command is on a separate line and should be executed separately.

I had to install a custom version of the Raspberry Pi’s firmware, developed by notro using this command:

and then

This custom firmware contains all the drivers needed to use the screen on the Pi. I could compile the software myself, but this is a proof-of-concept to make sure everything works. I then shut down the Pi, and hooked up the display as per this wiring diagram (please excuse the rubbish 5 minute job):


One thing to note is that I hooked the Backlight directly to 5v, so the backlight is always on when power is applied to the screen.

I then fired the Pi up, and typed the following commands:

This gave me the console on the screen. I then modified /etc/modules  (using sudo nano /etc/modules), and inserted the following lines at the end

It’s as easy as that!

Now, to learn Python!

The Raspberry Pi Dash Cam Project – Post 1

Installing an SSD

So I decided to purchase an SSD for my Mac mini using some of the Amazon Vouchers I received for Christmas. After much research, I decided on the Samsung 840 EVO 250GB SSD from Amazon UK, which, at the time came in at £85.80. I bought a small fitting kit from eBay for £10.

I’ve uploaded a video to youtube. It is a highly sped-up version of me installing a Samsung 840 EVO 250GB SSD. I run a pretty standard 2.3 GHz Intel Core i7 Mac mini, with 16Gb RAM that I installed as soon as I purchased the machine.

You need an additional kit to fit the hard drive, which I purchased from eBay for £10. Beware however. The kit I purchased came with everything I needed, but the rubber grommets were too stiff and thick! I had to cut one grommet in half which fixed the issue.

All in, it took me about an hour to do taking my time and verifying everything I was doing with the iFixit site.

Before starting, my primary and pre-installed (1Tb) hard drive was showing as the bottom hard drive caddy in System Information.

On opening the mini, the Hard Drive was sitting at the top of the caddy, which, when the mini is sitting the right way up, would make it the bottom drive. The original SATA cable was plugged into the left port as you look at the mini being disassembled, which is the one nearest the bluetooth and Wifi antenna connector.

Eventually I put the 1Tb Hard Drive into the upper bay, transferring the black sheath around the original Hard Drive to the new SSD, and used the new SATA cable for the existing Hard Drive. I then put the new SSD in the bottom part of the caddy and used the existing SATA cable.

I swapped the cables as I read a few stories about read/write errors using third party SATA cables in the mini that only affected SSD drives. Better being safe than sorry!

I have a full video of my installation, including the issue with the grommets.

Before starting, I took a quick video to see how long it took to boot. My start was switching the mini on. The Stop mark was when the TomTom update helper popped up letting me know I had updates flashed onto the screen. I was a few milliseconds slow in stopping the video after the SSD install, but even with the time given, its still an astonishing difference.

Mac mini with no SSD boot time: 3 minutes, 15 Seconds.

Mac mini with SSD boot time: 56 Seconds.

I reckon thats near to a 72% speed increase in the boot time alone.

Generally I keep the mini running 24/7, so boot up times are not all that important, but the difference in software starting is astounding. iPhoto loads lightning fast, as does pixelmator. iMovie also. Other apps don’t even blink!

I’ll give it a few months and measure the performance again to see if it can keep it up.

Installing an SSD

iOS and Mac App Store

Its been said many many many times that the App store is broken. Several of the podcasts I listen to have discussed it at length. The search is terrible. The ranking system is awful. For new apps, it must be extremely hard to gain any traction.

I’m not an App developer (as much as I wish I was), but from a user perspective both the iOS and the Mac App Store are pretty painful to use.

Don’t get me wrong, if the App has a unique name, its pretty easy to find. It’s even better if its on one of the front pages. Apart from that? Good Luck.

One of the issues I have with both versions of the Store is the lack of interoperability.

I was looking at the Desk App online, via the developers web site. It looked pretty neat, had what looked like a good feature set, but no price. To see the price, I had to check the Mac App Store.

At the time, I was on my iPhone, and not near a computer (I use a Mac mini, so its not overly portable). Safari on my iPhone detected it was an App Store link, and fired up the iOS store, where I got the ever so helpful “Desk […] is only available on OS X” with no price. There is a handy “Learn more about this App” link, however that just takes me back to the developers website,

This isn’t directed at the developer of the App, but at the App Store itself. It just put off a potential impulse sale until I was back at my Mac.

I completley forgot about the App until just now, when I was using my Mac. I was installing Xcode, and on the main page of the Mac App Store, there was a featured App called Notability, tagged as “App of the Year”. Reading the description, I saw that it was both on sale and that there is an iOS version of the App.

Now, the reason for this whole post. Even though these apps are from the same developer, and will most probably be used together, nowhere in the Mac App Store (or the iOS App Store) does it provide an easy link to view the App for the different platform, nor provide an option to purchase it immediately.

Likewise (and again, I’m not a developer) I’m guessing that App Bundles can’t be used for cross-platform purchases.

It seems like Apple is missing a trick here. And for the record – I still haven’t purchased desk.

iOS and Mac App Store