A Raspberry Pi Helmet Cam With GPS Logging

20140126_222809-1 Over the last 20 years, [Martin] has been recording snowboarding runs with a standard helmet cam. It was good but he felt like he could improve upon the design by building his own version and logging additional data values like speed, temperature, altitude, and GPS. In the video shown after the break, a first person perspective is displayed with a GPS overlay documenting the paths that were taken through the snow. [Martin] accomplished this by using a python module called picamera to start the video capture and writing the location to a data file. He then modified the program to read the current frame number and sync GPS points to an exact position in the video. MEncoder is used to join the images together into one media file.

The original design was based on the Raspberry Pi GPS Car Dash Cam [Martin] developed a few months earlier. The code in this helmet cam utilizes many of the same functions surrounding the gathering of GPS data points, recording video, and generating the overlay. What made this project different though were the challenges involved. For example, a camera inside a car rarely has to deal with extreme drops in temperature or the wet weather conditions of a snowy mountain. The outside of the vehicle may get battered from the snow, but the camera remains relatively safe from exposure. In order to test the Raspberry Pi before venturing into the cold, [Martin] stuck the computer in the freezer to see what would happen. Luckily it worked perfectly.

Click past the break for the rest of the story.

Another obstacle [Martin] encountered was circumnavigating around a bug in the Raspberry Pi custom Linux kernel which caused the camera to fail when using a 1-wire sensor at the same time. Reverting to an older kernel version fixed the problem allowing him to hook up a temperature sensor to record the data.

Once everything was in place, [Martin] tried his helmet cam out on the slopes. Surprisingly, the Pi powered system was more robust than he expected. He was able to capture hours of footage within a week’s time with few issues. The only component that failed was a micro USB power cable that split. This caused the Raspberry Pi to continuously reboot, shorting out, and ultimately leading to a corrupt file system.

The overall outcome is a great combination of GPS tracking, environment sensing, and video recording. This type of design can be transitioned to work in motorcycle helmets and other sporting equipment. We see potential of this system being integrated into scuba diving, dirt biking, and football playing (among other things); all of which gives people a chance to step into the perspective of these athletes.To see what it is like to be flying down a snowy mountain, check out [Martin]’s video below:

9 thoughts on “A Raspberry Pi Helmet Cam With GPS Logging

  1. He could also have gone out and spent $50-$150 (depending on if he wanted SD or HD) and bought a commercial solution which logs all of this and is about 5x smaller. I wouldn’t want to carry around that much unprotected electronics while running.

    1. Where’s the fun in that? No sense of satisfaction at having created something from the ground up yourself. No feeling of accomplishment if you just went and bought a commercial solution. Half of the fun in doing stuff like this is the creation process itself.

  2. Martin,

    Very cool! Great work on the mounting and cabling. Thank’s for sharing your hard work.

    Could you advise me on extending a smart phone camera module cable 3 to 4 feet from the phone body. What trouble would I see?

    thanks

      1. Thanks, I want to take two old smart phones and mount the screen(body of the phone) below my motorcycle mirrors. Then have the cameras from each phone facing front and back.

  3. Hmm I wonder if the Pi is powerful enough to process the video with MEncoder and stream the video over an Ethernet connection. With a minimum of latency, course I haven’t had much luck getting it down below half a second or so just normal streaming.

Leave a Reply to othoapCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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