Data acquisition sub-systems for Formula Student car

September 1, 2014

Other Contributors – Akarsh Pandey, Rajat Sahore, Jatin Mehta

Formula Student is a engineering design competition in which student teams from all across the globe design and build a formula style single-seat race car which competes in a variety of static and dynamic events such as safety analysis, sprint racing and endurance. In 2014, I got an opportunity to lead the electronics department of Team Fateh, the formula student team of Thapar University. We created the Data Acquisition (DAQ) and display sub-systems for the car. In this post, I describe the design and technical implementation of the same.

SYSTEM OVERVIEW

The stand alone data acquisition sub- system was implemented using MPC5606B PowerPC architecture based micro -controller from Freescale Semiconductors.  The system was designed as a cost effective solution to overcome the limited data logging functionality of Motec M-84 Engine control unit (ECU).

The system could acquire data from fourteen channels comprising of analog signals and variable frequency digital signals by utilizing the ADC (Analog-Digital Convertor) and eMIOS (Modular Input- Output system) peripherals respectively. LINflex module was used to implement UART (Universal Asynchronous Receiver- Transmitter) in order to communicate with GPS (Global positioning system) receiver.  SPI (serial peripheral Interface) was utilized to communicate with SD (Secure digital) card used for data logging. Information critical to the driver was displayed via the display sub system.

Algorithms to acquire, filter and process the information were developed and tested using the Codewarrior IDE V 2.10. Matlab was utilized to analyze the data acquired.

Untitled-3-01.png
System Overview – The green components represent the Data-Acquisition and display sub-systems that we fabricated. The red ones indicate other equipment that our system interfaced with

 

DATA ACQUIRED

  • Wheel Speed: Hall Effect inductive proximity sensors coupled with PNP transistor switches were used as counters to sense wheel speed. The period of variable frequency digital output signal was estimated using IPM (input period measurement) mode of eMIOS peripheral to obtain RPS (rotations per second). A suitable minimum measurable frequency was restricted in software to prevent excessive delay while measuring low speeds.
  • Shock travel: Conductive plastic (CP) type of linear potentiometer was used to sense magnitude of linear displacement caused due to shock. The analog output was fed to the 10 bit ADC. The data acquired proved to be critical in evaluating the damping performance in various loading scenarios.
  • Acceleration: The MMA7260Q, three axis capacitive accelerometer was utilized to monitor the vehicle accelerations. The sensor output voltages proportional to the experienced g-force were fed to the ADC.
  • Engine RPM: The TACHO output of the M-84 ECU having frequency proportional to the engine RPM was fed to an eMIOS channel operating in IPM (input period measurement) mode. The RPM count was utilized to control a gear shift indicator module designed to facilitate gear shifts at appropriate engine RPM in order to achieve maximum torque.
  • Fuel level: A fuel gauge comprising of a float that is mounted on the end of a pivot arm was used as a fuel level sensor. The analog output voltage changing with the fuel level due to variation caused in gauge resistance was fed to the ADC.
Graph
Engine RPM, as acquired by the Data Acquisition system

HARDWARE DESIGN AND IMPLEMENTATION

A display module comprising of a gear shift indicator, gear position indicator and vehicle speed indicator was designed and implemented. For enhanced visibility to the driver, independent LED components such as seven segment displays were used instead of LCD display. The control circuitry comprising of 4×16 line decoder IC (74154), hex inverter IC (7404) and BCD to seven segment convertor IC (7447) was modeled and tested using Proteus ISIS and then implemented on a low cost printed circuit board (PCB).

Capturedcdvfv
PCB layout designed using Eagle – CAD software
gfh
Display components integrated on fabricated PCB

A noise free power card based on low cost linear voltage regulators was designed to power the data acquisition and display sub- Systems. The circuit was protected against surge voltage, over voltage, reverse voltage and over current.

SOFTWARE OVERVIEW

The three main layers of the software designed to program the microcontroller are as follows:

  • The lower most layer comprises of the register level programming used to initialize and configure the various peripherals of the PowerPC architecture based microcontroller.
  • The middle layer comprises of the subroutines responsible for acquiring, filtering and processing the data.
  • The top most layer comprises of the subroutines responsible for controlling the display module and logging the data into the SD card.

Various polling and interrupt based software structures were implemented and tested in order to satisfy the specific requirements of the data acquisition system. Some of the important concerns are as follows:

  • Firstly, the time required to measure period of a variable frequency signal via the IPM mode of eMIOS module is not fixed. The hardware has to wait for two consecutive pulses in order to determine the period. Thus, there is a delay involved and the duration of this delay is inversely proportional to the frequency being measured.
  • To address this concern, the data acquisition sub routine was called by a periodic interrupt created via PIT timer and not by regular polling. Otherwise, data packets would be logged at irregular intervals of time. The frequency of this interrupt was adjusted to allow a suitable maximum time for completion of data acquisition sub routine.
  • Secondly, some events such as gear change require immediate attention. Thus, a higher priority hardware interrupt was utilized to implement the sub routine of such events.

IMPROVEMENTS AND FUTURE POSSIBILITIES

  • The display module can be controlled by a secondary microcontroller which can communicate to the main controller via CAN (Controller area network) protocol. This reduces the length of hardwire connections significantly.
  • In order to reduce wiring length further, wireless sensing platforms can be used. The acquired data is transmitted wirelessly and is received by the main microcontroller.
  • Variable intake manifold is the concept of varying the length of the intake runner with the engine RPM in accordance with the Helmholtz Resonator concept to achieve maximum torque. This application can be realized using an electronically controlled linear actuator to vary the length of the manifold. A PWM control signal having duration corresponding to the appropriate length of Helmholtz Resonator calculated for the current value of engine RPM can be produced using the eMIOS peripheral.  This PWM signal can control the actuator via H-Bridge circuit.
10655313_823858680992589_1445527194896943347_o
Team Fateh at Formula Student Germany 2014
IMG_2632
We got out MPC5606B development board (and some other stuff as well) sponsored from Freescale Semiconductors. Big cheers to them!

 

65653_446184098805517_622108887_n
Team Fateh shed – the place we spent our days and nights

Eat Sleep Race Repeat. The story of human ambition.