Download presentation
1
Formula SAE Ryan Langley 2104584
GPS & Sensor Telemetry HPV Sensor Suite Thomas Cross Formula SAE Ryan Langley
2
HPV Super Series Human Powered Vehicle Multiple riders per vehicle
Endurance races Manual lap timing
3
Project Aims Sensor suite onboard vehicle
Location, speed and lap times Data logging Display data to pit crew
4
Vehicle Module GPS + Accelerometer Speed display Data logging Data communications Pit Module Graphical User Interface View real-time data Log/display lap times Data communications
5
Hardware Firmware GUI
6
Hardware Firmware GUI
7
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
8
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
9
Circuit Protection Reverse polarity protection Overvoltage protection
Transient suppression
10
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
11
Power Supply 3.3V and 5V rails Linear regulator for each rail
5V SMPS powering 3.3V linear regulator SMPS for each rail 0.1A 5V @ 0.9A Ploss (W) Efficiency Cost($AU) 2 x Linear 7.17 40.3% $3.30 1 x SMPS 1 x Linear 1.42 77.3% $9.41 2 x SMPS 1.21 80% $15.52
12
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
13
Inputs GPS Module Accelerometer Updates at 10Hz
UART - NMEA Data and checksum 2.5m location accuracy Accelerometer MMA8451Q 3-Axis I2C
14
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
15
Outputs LCD SD Card RF Module - RFD900 UART 40km LOS I2C
Displays data to rider SD Card SPI microSD
16
Reverse Polarity & Overvoltage Protection
Input Power Reverse Polarity & Overvoltage Protection Switched-Mode Power Supply (5V) Linear Regulator (3.3V) GPS Module Accelerometer UART I2C Microcontroller Microcontroller UART I2C SPI RF Module Liquid Crystal Display SD Card
17
Microcontroller 2 x UART - GPS & RF Module
1 x SPI - SD Card (SPI Mode) 1 x I2C - Accelerometer, LCD PIC18F46K22 2 x UART, 2 x SPI/I2C 64KB Program Memory 64MHz oscillator
18
Protection Circuitry 5V SMPS GPS Programming Header 3.3V Linear Regulator Accelerometer SD Card
19
Hardware Firmware GUI
20
Hardware Firmware GUI
21
Formula SAE Design & build race car Students of all disciplines
Annual competition Flinders’ first year
22
GPS Telemetry Project Basis for sensor addition
Build car and driver feedback Improve performance of team
23
Firmware Goals Configure sensors Read in, send and process data
Log data Handle errors All in real time – or close to
24
GPS Configure UART peripheral Configure GPS module Receive NMEA data
Process & Send data
25
Configure UART 1 start – 8 data – 1 stop – no parity 115,200 baud
Interrupt based Ring buffer TAIL HEAD $ G P R M C
26
Configure UART
27
GPS Configure UART peripheral Configure GPS module Receive NMEA data
Process & Send data
28
Configure GPS Module Send only GPRMC and GPGSA
Lat & long Date & time Speed, heading Precision Configure baud to 115,200 Send data at 10 Hz
29
GPS Configure UART peripheral Configure GPS module Receive NMEA data
Process & Send data
30
Receive NMEA Data $ \n GPS_msg_flag Receive ISR N N Y Y RXIF
Framing error? Buffer overflow? ‘$’ or ‘\n’ Put in buffer Exit Flush buffer Receive ISR N N Y Y $ GPS_msg_flag \n
31
GPS Configure UART peripheral Configure GPS module Receive NMEA data
Process & Send data
32
Process & Send Data Pull msg from RX buffer N Y Y N $ G P R M C … \n
Pull char from buffer Is it ‘$’ Place in array Is it ‘\n’ Place 0 in array Check Checksum N Y Y N $ G P R M C … \n
33
Accelerometer Configure I2C peripheral Configure Accelerometer module
Obtain data
34
Configure I2C 400 kHz speed Set as Master device Generic code
35
Accelerometer Configure I2C peripheral Configure Accelerometer module
Obtain data
36
Configure Accelerometer
Read latest data (not FIFO) 8G, 4G, or 2G mode 8-bit resolution
37
Accelerometer Configure I2C peripheral Configure Accelerometer module
Obtain data
38
Obtain data Read the values at 10 Hz
Use ‘get’ functions to access X, Y, and Z values.
39
The Main Loop
40
The Results
41
The Results ACC IN RFD OUT GPS IN
42
Data Logging Easy to use Windows compatible file system
Different files for GPS and ACC data
43
Data Logging Main Loop SD_Card.h SD_Card.c FatFs Files diskio.h
diskio.c SPI.h SPI.c
44
Main Loop SD_Card.h SD_Card.c FatFs Files diskio.h diskio.c SPI.h SPI.c
45
SD Card Provides high-level logging functions Create/open files
Log ACC data Log GPS data Save files
46
Main Loop SD_Card.h SD_Card.c FatFs Files diskio.h diskio.c SPI.h SPI.c
47
FatFs Generic FAT File System Module Designed for embedded systems
3rd party open source Platform independent
48
Main Loop SD_Card.h SD_Card.c FatFs Files diskio.h diskio.c SPI.h SPI.c
49
Disk IO Provides low-level disk IO functions Initialize Read Write
Disk Status
50
Main Loop SD_Card.h SD_Card.c FatFs Files diskio.h diskio.c SPI.h SPI.c
51
SPI Portable SPI peripheral code Various initialization options
Byte transmit, receive and exchange
52
Logging Result
53
Hardware Firmware GUI
54
Hardware Firmware GUI
55
10 Hz New Message Received? No Update Lap/Race Timer Yes No Valid Message Header? Get Message Type Plot GPS Location Display Acceleration Yes Reset No Valid Message? Lap Detected? Yes Yes Extract Message Data Log Lap Time
56
Receiving Data Scan until new message is received
Check for valid header e.g. “$GPRMC…” Check for correct length and checksum Extract message data Lat & long Date & time Speed, heading
57
Update GUI Update lap/race counter every 0.1s
Plot most recent GPS location Display accelerometer data Display heading/speed
58
Lap Detection Check if travel line crosses finish line
Log lap time and display on graph/table Reset lap timer
59
GUI
60
Summary Designed generic hardware Data processing and transmission
Display real-time data on user interface Autonomously log lap times
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.