Monitoring auto sensor data with the Raspberry Pi

Enhancements

In addition to reading and interpreting the data from the car via the CAN Bus, the Raspberry Pi working inside the race car can also assume other tasks. For example, the Rasp Pi can connect a wireless action camera mounted inside the car to the Internet (see the "Live Video" box for details). The action cam gives the pit team the added opportunity to follow the race from the perspective of the driver.

Live Video

If you want a live video feed, you can use a wireless action cam connected to the Rasp Pi via a wireless stick, thus reducing the number of cables in the car. When the pit team wants external access over the UMTS stick to the internal network, one way to create the access is to install port forwarding to the camera via iptables.

Because Apache already runs on the web server and forwards all requests made to a particular URL to the webcam, we only installed a simple reverse proxy, which passes queries from the Internet along to specified internal servers, thus hiding the server infrastructure while assuming responsibility for tasks like authentication or encryption. To set up this procedure, activate the Apache proxy module using the following configuration:

ProxyPass /live/    http://10.5.5.9:8080/live/
ProxyPassReverse /live/    http://10.5.5.9:8080/live/

This redirects requests made to the UMTS web address of the Rasp Pi to the internal URL of the camera, which in the example is http://10.5.5.9:8080/live/. If the webcam doesn't support authentication by username and password, Apache can take care of that, too.

To create a minimal feedback function for the cockpit, the Rasp Pi can control LEDs via the GPIO to signal things like "system ready."

The Rasp Pi also delivers up-to-date data about the position of the race car on the track and plots it on a map with the help of a GPS module connected via USB. As with CAN bus sensor values, this data is collected in the database and then displayed via Google maps on the website.

First Application

This telemetry solution was developed as part of work on a masters thesis by Helmut Hammerschmied during his studies in the automotive engineering department of the FH Joanneum GmbH. The solution was installed in the jr13-evo race car and will have its real-life inauguration in the Formula Student competition scheduled to take place in May 2014 in Detroit.

The Author

Wolfgang Dautermann works as a system administrator at FH Joanneum, a university of applied science in Graz, Austria. He is one of the organizers of the "Grazer Linux Days."

Helmut Hammerschmied studies automotive engineering at FH Joanneum and developed the solution described in this article as part of a master's thesis.

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content