Monitoring auto sensor data with the Raspberry Pi

Lead Image © Liviu Peicu, 123RF.com

Yes, Pi CAN

,

Every year, teams of students from universities around the world compete in the Formula Student auto racing competition. One team used a Raspberry Pi to monitor sensor data on the vehicle and send the results to the pit crew through a wireless connection. We'll show you how they did it.

Formula Student is an international competition in which qualifying student teams build and deploy a race car according to Formula SAE rules. The competition spans the disciplines of engineering design, cost analysis, and business presentation and provides hands-on experience designing for acceleration, autocross, endurance, and fuel efficiency.

The team known as joanneum racing graz built a Raspberry Pi into the race car to collect vehicle data and send it back to the pit crew over a wireless connection. To achieve this goal, they plugged the Pi into the CAN bus, a built-in bus found on many vehicles that facilitates communication among the on-board devices. The Pi then received and processed the vehicle data, posting it to web page using an Apache web server running on the Rasp Pi system. The support team then used a web browser to connect to the web server running on the Pi and read the device data in real time.

The rest of the story is all in the details.

The Formula Game

Competitors in the Formula Student race usually pick up most of their points in the engineering design category, which is judged by a panel of experts who examine the construction of the car. The experts ask questions about the mechanical components and also hold discussions with the teams about methods, such as computer-assisted construction techniques, that were used to build the car. Additionally, the panel of experts reviews and evaluates the testing phase of individual components, as well as the design of the entire car.

To fulfill the requirements of the cost analysis category, the team submits a statement of costs in advance, listing each individual part of the car and verifying the price paid for the part. Each team receives a standardized table that they must use to prepare the cost statement. This statement of parts costs must include the price for the raw materials used as well as machine shop production time and any subsequent reworking, such as grinding and polishing bearing housings. Teams are penalized heavily if the panel of experts discovers that a cost is missing from the statement or that a cost as stated is inaccurate.

In the business presentation category of the competition, the team introduces a business model for marketing the car to amateur race car drivers. The panel of experts evaluates the business model from the point of view of manufacturers and investors.

For the acceleration category of the competition, the team demonstrates the rate of acceleration of their car on a 75-meter track. Beginning from a standing start, each team has four chances on the track, and each team must use at least two different drivers. The team will be judged based on the best time out of the four attempts. In the skid pad category, teams must drive the race car two times each around two circuits. The high speeds maintained in the curves of the skid pad and the load change that occurs with the transition into the second circuit reveal in painful detail any weaknesses that might be present in the chassis of the car.

The autocross competition has a track approximately 800 meters in length with various start and finish points. In this category, the teams pick up points not just for their performance on the autocross track but also to qualify for the final endurance competition (Figure 1). The endurance category is the category with the greatest number of overall competition points.

Figure 1: The Graz racing team jr13 on the track. (Photograph by Michael Trzesniowski/joanneum racing graz)

The endurance track is similar to the one used for the autocross, except it has different slalom courses and is laid out as a circular track with enclosed start and finish lines. For this 22km challenge, the cars start out in the reverse order achieved in their autocross results. At the halfway point, the rules require a change of drivers, and the car must be turned off for five minutes. The fuel consumed in this part of the competition is used for evaluating fuel economy achieved by the car. The length of time necessary for the car to complete the endurance challenge is also taken into consideration, so the car's efficiency is evaluated instead of fuel consumption alone.

Figure  2 shows the value of individual challenges in the Formula Student competition on the Hockenheimring circuit. The point distribution can be slightly different in other competitions; however, engineering design is always most important in the static disciplines and endurance capacity in the dynamic disciplines.

Figure 2: Point distribution in the Formula Student Germany 2013 competition. Note that stat stands for a static test and dyn for a dynamic test.

Requirements

The most important requirements for hardware suitable for race cars are always the same: The components must be as small and as light as possible, and they have to be able to withstand bumps and vibrations without any problems.

These requirements are not features that are ordinarily found in a personal computer, but it is definitely possible to find them in a Raspberry Pi.

Long before the actual competition, the student-designed race car has to prove its capabilities on test tracks. The test phase doesn't work without the transmission of data from the car to the box, because this is the only way the racing engineer can constantly observe all data.

Additionally, it is necessary to transmit the data over the Internet to experts in the development lab so that they have continuous access (Figure  3). The architecture is designed such that the Raspberry Pi assumes the task of retrieving measurements via the CAN bus and making them available on a web server. The Pi reads out the data with the help of a program and saves it in a database.

Figure 3: An overview of the entire architecture of the monitoring project.

A modern Formula Student car is practically bristling with sensors that capture countless pieces of data. The most important measurement values for the beginning tests are oil pressure and the water and oil temperatures found in the engine. If these values exceed certain thresholds, then potential for damage to the engine exists.

Once these basic functions have been tested successfully, it is time to fine-tune the engine and chassis. Here, sensor values such as braking pressure, tire temperature, acceleration, and many others become very interesting.

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