You are on page 1of 12

FAMU-FSU College of Engineering

Department of Electrical and Computer Engineering

TEXAS INSTRUMENTS INNOVATION CHALLENGE PROJECT REPORT

Project Title: SAE Baja Data Acquisition System


Website: http://eng.fsu.edu/ece/senior_design/2015/team05/

Student Team Members:


Chris Riker, Computer Engineering (Email: cdr11c@my.fsu.edu)
Hebe Perez, Computer Engineering (Email: hp09d@my.fsu.edu)
Dewey Williams, Computer Engineering (Email: dmw10g@my.fsu.edu)
Tyler Dudley, Electrical Engineering (Email: dudleyt2004@gmail.com)

Project Coordinator: Dr. Michael Frank


Additional Reviewer: Dr. Linda DeBrunner

May 22, 2015


Table of Contents
1 Project Description .................................................................................................................. 3
2 Hardware Design .................................................................................................................... 3
2.1 Central DAQ System ........................................................................................................ 4
2.1.1 Main Microcontroller ...................................................................................................... 5
2.1.2 Sensor Bus .................................................................................................................... 5
2.1.3 Power Supply ................................................................................................................ 6
2.1.4 Printed Circuit Boards .................................................................................................... 6
2.2 Pit Unit .............................................................................................................................. 7
3 Software Design...................................................................................................................... 8
3.1 Hercules TMS570LS0432 ................................................................................................. 8
3.2 MSP430G2553 ................................................................................................................. 8
3.3 Raspberry Pi ..................................................................................................................... 9
4 Testing Results and Conclusions ...........................................................................................10
5 Future Considerations ............................................................................................................11
5.1 On-Vehicle Display ..........................................................................................................11
5.2 Batteries ..........................................................................................................................11
6 Acknowledgements ................................................................................................................11
Appendix ...................................................................................................................................12
1 Project Description
The Society of Automotive Engineers encourages college students worldwide to apply classroom
knowledge to real world design concepts through their annual competitions. SAE International
hosts five categories of competition that include Aero, Clean SnowMobile, Formula, Baja, and
Supermileage. The SAE team at the FAMU-FSU College of Engineering actively participates in
the Baja competition each year and subsequently builds upon their designs from previous
competitions for vehicle improvement.

Previously, the SAE Baja Team has made changes to the vehicle based on estimates of the
performance of the vehicle. This year, Team E#5 has introduced a quantitative approach to the
Baja design process by adding a data acquisition system (DAQ). The DAQ records values from
various vehicle systems and stores it for later use. DAQ subsystems include measurement for
speed and acceleration, as well as uptime data and a fuel timer. In addition to recording and
storing data, the DAQ system includes a wireless communications component which allows the
vehicle to be monitored from an external station. This monitoring includes collected sensor data,
as well as rudimentary communication between the pit crew and driver. This allows the pit crew
to prepare for the driver and decrease the time it takes for the vehicle to get back on the track.

The system follows the competition design rules outlined by SAE International and was designed
to hold up against the rough terrain of a Baja competition track. The system was complete in
time for the April 9th, 2015 Baja competition in Auburn, Alabama and was completed with a
budget of $750 with the aid of contributions by Texas Instruments.

2 Hardware Design
A top-level block diagram of the system is found in Figure 1. The design consists of two
sections, the pit unit, which allows the pit crew to monitor the vehicle remotely, and the on-
vehicle DAQ system which collects, stores, displays, and transmits data from the sensor network.
Figure 1 - Top level block diagram

2.1 Central DAQ System


A pin level diagram of the central DAQ system can be seen in Figure 2. It shows all
components and the necessary pin connections between them.

Figure 2 - Central DAQ Pin Level Diagram


2.1.1 Main Microcontroller
The heart of the DAQ system is a TI Hercules Launchpad with a TMS570LS0432 MCU. This
MCU was chosen due to its automotive and safety focus, as well as its high performance and
many interfacing options. The Hercules Launchpad is used to collect data from the sensor bus,
format that data, and perform all storage, transmission, and display operations. The mibSPI
interface on the Hercules is used to quickly and easily send bulk data to the display and SD card,
and a standard SPI interface is used to interface with the sensors. Additionally, the SCI interface
is used to transmit data via the XBee.

2.1.2 Sensor Bus


The vehicle sensors consist of a sensor device, and an MSP430G2553 MCU which is used to
format data and relay it to the Hercules. The MSP430s were chosen for their low power
consumption, ease of embedding, and familiarity with the product. Its dual USCIs came in handy
when communicating with a digital sensor as well as the vehicle SPI bus. A diagram of the
sensor bus can be seen below in Figure 3.

Figure 3 - Sensor Bus Block Diagram

Figure 4 shows a pin diagram of a typical sensor unit.


Figure 4 - Sensor Pin Level Diagram

2.1.3 Power Supply


To provide power to the system, two 3.2 V LiFePO4 (Lithium Iron Phosphate) batteries are
connected in series and TI TL2575 switching voltage regulators are used to provide stable 5V
and 3.3V supplies for the components. The regulators circuits were built according to the
datasheet, with the following component values:

Component Value

Cin 100 uF

D1 1N5819

L1 150 uH

Cout 330 uF

Figure 5 - TL2575 circuit, taken from the datasheet

2.1.4 Printed Circuit Boards


In order to simplify installation and provide more hardware stability to the system, circuit boards
were designed for each system – the main MCU, the sensors, and the power regulation circuits.
The boards were designed in CadSoft EAGLE and milled in-house at the FAMU-FSU College of
Engineering.
Figure 6 - MSP430 Sensor PCB

The sensor PCBs were designed to house the MSP430 MCUs, and provide reset line stabilization
as well as breaking out necessary pins. The final design incorporates an option reset button as
well as a power input filter capacitor. The board breaks out both of the MSP430G2553’s USCIs
which can also be multiplexed to GPIO or analog inputs for other applications.

The PCB designed for the Hercules Launchpad includes a 3.3V and 5V power input, and
provides individual breakout headers for 4 sensors, the XBee module, and the display. It is
designed as a booster pack in order to preserve modularity.

The power regulation PCB incorporates both TL2575 regulators on one board, and has large
copper pads for attaching the batteries, and a 3pin header for outputting 3.3V, 5V, and ground to
the Hercules boosterpack.

2.2 Pit Unit


The main component of the pit unit is a Raspberry Pi Model B+. It receives periodic wireless
transmissions from the main MCU via a paired XBee module whenever the vehicle is in range.
This unit serves as a supplement to the onboard vehicle data acquisition, and is not required for
standard operation. As the Raspberry Pi offers a full operating system, the pit unit can be
operated using a standard keyboard and mouse which allows it to be used with minimal
instruction or prior training for members of the pit crew.
The XBee is connected to the Raspberry Pi using the onboard UART, and a 12 V LCD display is
connected to the Pi’s composite video out.

3 Software Design
3.1 Hercules TMS570LS0432
All Hercules software was written in C using Code Composer Studio, with interface drivers and
other help from HALCoGen. New code had to be written in order to interface with the other
components on the bus, such as the display, SD card, and the MSP430 slave devices.

The display used is a 2.2” TFT LCD display from Adafruit with an onboard ILI9340 SPI LCD
driver. In order to interface with the display, provided driver code from Adafruit was ported to
use the mibSPI interface on the Hercules. Additionally, a 9x5 console font was incorporated and
driver code was added to support it.

SD card reading and writing was implemented using FatFS, an open source FAT file system
interface implementation. Low level code was added to use the mibSPI to initialize the card and
handle the reading and writing of sectors as requested by the higher level FatFS software. This
driver software is based on the SD documentation as well as example code available online, and
is optimized to use the many features of the mibSPI interface. Data is logged to the SD card in
csv format, which allows it to be written easily by the microcontroller, and allows it to be opened
in spreadsheet applications like Excel for any higher level analysis that needs to be done.

In order to ensure data reliability between the pit unit and the DAQ system, a frame structure was
used which includes 3 preamble bytes for byte alignment followed by 4 data bytes. This structure
is the same for pit-to-vehicle communication, except that commands sent to the DAQ are only 2
bytes.

A real-time interrupt is used to send data to the pit every 500ms, and schedule a write to the SD
card every 1s if logging is enabled. This interrupt is also responsible for decrementing the fuel
timer, and keeping track of system uptime.

3.2 MSP430G2553
All of the software for the two MSP430G2553 microcontrollers was written in C using Code
Composer Studio. The MSP430 microcontrollers collected data from the DRV5053 bipolar
analog Hall effect sensor as well as the LSM303DLHC Accelerometer/Magnetometer, and
communicated with the Hercules LaunchPad over SPI.

The LSM303DLHC accelerometer is written to and read from using I2C. A driver for this
specific device was made based on a previously existing driver for an Arduino microcontroller
and adapted to the needs of the DAQ system. The accelerometer is read in a “burst-mode”
fashion, using auto-increment registers to read from multiple sequential registers in one I2C
transmission. The MSP430 reads the four accelerometer registers (two for each axis) when the
Hercules LaunchPad requests a data transmission from the MSP430. To ensure alignment of the
data between the Hercules and the MSP430, a framework much like that used to communicate
between the Hercules and the Raspberry Pi was was implemented to ensure that the data
remained aligned during the multi-byte SPI transmissions. The developed framework used a 2-
byte preamble to notify the Hercules of incoming data.

The DRV5054 Hall effect sensor was read using the MSP430s built-in 10-bit analog to digital
converter. The sensor was polled whenever the ADC module was done converting, and edge
detection was used to detect a pulse from a magnet passing the sensor. Once the time was found
between two adjacent pulses using the MSP430 Timer A module (using ACLK at 12kHz), the
speed of the wheel was calculated from that time. The speed was calculated using floating point
operations, and the result was stored as a UQ6.2 fixed-point number, using 6 bits for the whole
part and 2 bits for the fractional part. This byte was then sent to the Hercules over SPI when
requested. Floating point operations were used because the optimal sampling rate was only 20
Hz, and floating point operations were done fast enough to achieve this rate while simplifying
the code.

3.3 Raspberry Pi
The Raspberry Pi was configured to run Raspbian, a Debian-based linux distribution built for the
Raspberry Pi. The Pi’s software was written in C++ using the Qt application framework. A UI
was developed to allow the pit crew to see some data at a glance, such as the speed, long-axis
acceleration, and the fuel timer. It also provides some indicators for the status of DAQ
subsystems, and buttons to enable or disable DAQ features such as logging or the notification
system.
4 Testing Results and Conclusions
Overall, the design team is happy with the final product. Even after some of the subsystems and
features were ultimately cut from the project for various reasons, the team still feels that the
project was extremely successful. The two-way communication between the driver and the pit is
something that could prove to be very useful, and something that the Baja team was very excited
about. Unfortunately, with the destruction of the pit unit’s XBee module, this usefulness could
not be tested in competition, which was what the system was originally designed for.

Initially, the design team had great hopes for how the DAQ system would propel the Baja team
to higher placement. However, the problems that the Baja team faced during the Auburn,
Alabama competition were not things that could have been solved/helped by the DAQ system.
Additionally, with the use of walkie talkies and the sheer amount of time it took for the vehicle
to be towed off of the course and to the paddocks (as it is when something major goes wrong),
the Baja team had fair warning of the vehicle’s arrival. Perhaps if the pit station were set up near
the refueling area it would have proved useful, however the distance between the refueling
station and the paddocks made it unquestionable as to what the driver was returning for (e.g. the
driver would never return to the refueling area for a flat tire, and would never return to the
paddocks to refuel). However, it is not to say that the application of the DAQ system to tuning
the vehicle would have proved useless, as the system can still collect some very useful
information when it comes to tuning the vehicle for specific events. With the timeline of project
completion, however, the Baja team did not get any time to actually use the system for tuning
purposes, as very little (if any) tuning is done at the competition.

Although the system lost the bulk of its functionality right at the beginning of the Auburn,
Alabama competition, completing this project still turned out to be a great learning experience
for all of those involved, including some of the Baja members that showed a genuine interest in
the system and how it works. The use of various communication protocols along with the
development of data-transmission frameworks was invaluable experience that will surely prove
useful in real-world applications. All things considered, the design team is very happy with the
product that it produced and the lessons that came with the production of that product, and hopes
that any future DAQ teams receive the same learning experience.
5 Future Considerations
5.1 On-Vehicle Display
The display used on the vehicle, while attractive, was not
robust enough to withstand the torturous conditions of the
Baja competition, and broke before very early on in the
competition. This is something that the entire design team
unfortunately overlooked during the design process. In the
future, a 7-segment display paired with different colored
LEDs would be able to provide the same functionality and
information as the LCD display used, while proving to be
more robust, and this more useful in competition. Analog
gauges, much like those used on automobiles, could also
prove to be a viable solution.

Figure 7 - Broken display after Auburn


competition
5.2 Batteries
To be used through the entire competition, the system was required to have a battery life of 5
hours under full operation. As such, batteries with a very large capacity were chosen. Those
batteries had outer dimensions of 250mm x 136mm x 11.5mm (L x W x H). The large size of the
batteries severely limited the choices for enclosures that housed the power system as well as the
Hercules Launchpad. As a result, there was only one position on the vehicle that proved to be a
viable mounting solution. Choosing smaller batteries (dimensionally as well as capacity) could
have added flexibility to the mounting options of the enclosure, and those batteries still could
have met the required 5 hour battery life, as the chosen batteries last for well over 20 hours.

6 Acknowledgements
The SAE Baja DAQ design team would like to acknowledge our project advisors, Dr. Frank and
Dr. Linda DeBrunner, for any advice, input and ideas offered on how to proceed during the
design phase of the DAQ. The team would like to acknowledge the FAMU-FSU Society of
Automotive Engineers for the sponsorship and advice they provided and for including this design
team in this year’s Baja car. The team would also like to thank Arrigo Dodge of South Florida
for their contribution of four tire pressure monitoring system sensors to the Baja DAQ team.
Finally, the team would also like to thank the FAMU-FSU Electrical and Computer Engineering
department for their financial contributions towards the project.
Appendix
More info, including additional class papers and presentations, part datasheets, budgets,
development photos, and more can be found on the team website at:

http://eng.fsu.edu/ece/senior_design/2015/team05/

You might also like