Building a Data Acquisition Architecture for a Formula SAE Racecar

"The combination of CompactRIO and LabVIEW offers rugged hardware, a high-resolution execution cycle, and-real time control, making it the perfect solution for data acquisition on the FSAE car."

- Yousi NG, National University of Singapore

The Challenge:

Developing a custom data acquisition system architecture for the National University of Singapore (NUS) Formula SAE (FSAE) team.

The Solution:

Using NI CompactRIO real-time hardware and NI LabVIEW software to develop a highly customizable, comprehensive GUI and data acquisition system architecture that can operate in real time and withstand noise, vibration, and heat.

Introduction to Formula SAE

Formula SAE (FSAE) is an annual intervarsity competition organized by SAE International that challenges undergraduate students to design and build Formula-style (open wheeled and open cockpit) racecars. The students must use their knowledge, creativity, and imagination to create an optimal racecar while working within set limitations. Credit is not necessarily given for the most novel or technologically advanced racecar. Genuine knowledge and application of engineering considerations are the competition’s true essence.


Teams build the cars over a period of about one year and take them to annual competitions for judging and to compete with approximately 140 other vehicles from colleges and universities throughout the world. The end result is a great experience for young engineers where they work on a meaningful engineering project that requires a dedicated team effort.


Defining the Problem

During the designing and testing phase, team members need onboard data to verify the performance of their design against calculated figures. Some of this data cannot be individually validated since it needs to be plotted together against time to confirm its accuracy. The team also needs to know if the engine experiences any pressure or temperature change that may render the car dangerous to operate. The team can improve and fine-tune the car more deliberately with this data and analysis method. Overall, the team needs to simulate what an FSAE car experiences on the track.


Our Approach to a Solution

We needed a complete data acquisition system with the following specifications:

1. Runs on a maximum 12 V DC battery supply for onboard operations

2. Acquires both analog and digital signals from multiple channels with varying sampling frequencies
3. Contains enough memory to store data for the duration of a test run, which is approximately half an hour
4. Compatible with any NUS FSAE car
5. Receives real-time data from the pit monitor using a telemetry system



System Design Overview

The data acquisition system consists of both CompactRIO hardware and LabVIEW software. Figure 1 illustrates the system design using dataflow diagrams.


Students must design the entire system-from the sensors to the pit monitor display to the hardware sensor implementation and the filter circuit on board the car. The software development involves field-programmable gate array (FPGA) implementation, a real-time operations program, and on-pit display programs. The wireless telemetry system uses a transmitter and receiver to transfer data through the serial port.


Hardware Implementation

We used an NI cRIO-9004 real-time embedded controller and a 4-slot NI cRIO-9103 reconfigurable embedded chassis. The ruggedness of CompactRIO is perfect for the system because it prevents damage from the vibrations and movements of the car.


We used the 8-channel, 12-bit NI 9201 analog input module. We acquire signals from six sensors using this setup, including the throttle position sensor (TPS), engine water temperature, engine oil pressure switch, engine speed (RPM), and two wheel-speed sensors. The data is correlated with respect to time from this multichannel data acquisition setup. Some of the data requires a high sampling rate for precision and accuracy, and the 40 MHz execution cycle of the CompactRIO FPGA chassis offers this. We use a filter circuit consisting of resistors, capacitors, and opto-isolators to ensure the signals to the input channels do not exceed the maximum safety voltage and are noise free.


Software Development of the FPGA Module

We easily handled software development using the LabVIEW FPGA Module. It extracts the 12-bit data from the analog input module and outputs it to a target-to-host DMA with a defined delay time. It also easily converts the digital signal input acquired by the analog input channel into pulse period values. The 40 MHz execution cycle of the FPGA ensures high-resolution data is acquired. The DMA is also used to isolate between data writing from the FPGA and data extraction from the real-time controller program. This allows the FPGA program to work independently and avoid delay.


The Real-Time Controller Module

We developed the real-time controller module using the LabVIEW Real-Time Module. The real-time controller performs the following four tasks: 1. Extracts data from the DMA
2. Writes data to the allocated memory
3. Truncates data
4. Sends truncated data to the reconfigurable I/O (RIO) serial port


Dividing processor time across these four tasks is clearly defined by the timing cycles provided by LabVIEW Real-Time. This ensures that each task meets its deadline every time.


Data is extracted from the DMA 700 elements at a time. The data is written to the allocated memory in a binary format. Each second of the six data elements at a 1,000 Hz sampling rate uses 10,200 bytes of space. The cRIO-9004 has 512 MB of nonvolatile storage, which is sufficient for the project’s objective.



Pit Display Software

We developed the on-pit display program using LabVIEW. With LabVIEW we can connect to the on-pit wireless modem and receive streaming truncated binary data frames. Additionally, LabVIEW offers a simple, comprehensive GUI for users. Figure 2 shows the monitor display of the final product.


We programmed the serial port by configuring the parameters using NI-VISA. The read and write functions of the serial port are already defined in the LabVIEW library and all the program has to do is read from and write to its buffer.


Because of the different natures of the sensor signals, we use different conversion methods for each signal and make use of the various LabVIEW functions.





The combination of CompactRIO and LabVIEW offers rugged hardware, a high-resolution execution cycle, and real-time control, making it the perfect solution for data acquisition on the FSAE car. Using a systematic design approach, the final product is a versatile data acquisition system that can operate in real time and withstand noise, vibration, and heat. It is now possible to use rapid control prototyping to port this program to a microcontroller to optimize space and resources.


Author Information:

Yousi NG
National University of Singapore
Design Lab, Department of Mechanical Engineering # 03-02 Blk EA, 9 Engineering Drive 1

Figure 1: A Dataflow Diagram of the Data Acquisition System
Figure 2: On-Pit Display Software Screenshot