1. SAE Formula Car Display and Data Acquisition System SAEDAQ Caleb Davison Phil Jacher George Kontos Advisor: Mr. Gutschlag 2.

Post on 31-Mar-2015

216 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

Transcript

11

SAE Formula Car Display and SAE Formula Car Display and Data Acquisition System Data Acquisition System

“SAEDAQ”“SAEDAQ”

Caleb DavisonCaleb DavisonPhil JacherPhil Jacher

George KontosGeorge KontosAdvisor: Mr. GutschlagAdvisor: Mr. Gutschlag

22

OverviewOverview

SummarySummary Measurement StrategiesMeasurement Strategies LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

33

OverviewOverview

SummarySummary Measurement StrategiesMeasurement Strategies LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

44

A Typical Car…A Typical Car…

55

SAEDAQ SummarySAEDAQ Summary Society of Automotive Engineers Formula One Society of Automotive Engineers Formula One

racecarracecar Data recordingData recording

wheel speedwheel speed engine rpmengine rpm oil pressureoil pressure oil temperatureoil temperature coolant temperaturecoolant temperature

Data will be transmitted to the car’s dashboard Data will be transmitted to the car’s dashboard and an off-track laptopand an off-track laptop

66

Previous WorksPrevious Works

Project has been attempted several timesProject has been attempted several times Never been able to coordinate with MEsNever been able to coordinate with MEs

Most recently last year with Justin PetersMost recently last year with Justin Peters Using different MCU, upgraded wireless chipsUsing different MCU, upgraded wireless chips New dashboard designNew dashboard design

77

High Level Block DiagramHigh Level Block Diagram

88

OverviewOverview

SummarySummary Measurement StrategiesMeasurement Strategies LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

99

Temperature and Pressure Temperature and Pressure

Temperature sensor Temperature sensor (0-300 degrees (0-300 degrees Fahrenheit) x 2Fahrenheit) x 2

Pressure sensor Pressure sensor

(0-100 psi) x 1(0-100 psi) x 1 Requires supply Requires supply

voltage (12V)voltage (12V) Outputs current Outputs current

(4-20mA)(4-20mA)

1010

Sensor Measurement CircuitSensor Measurement Circuit

From datasheet: From datasheet: ZZLmax=Lmax=(Vs-9.6)*50(Vs-9.6)*50

Vs=12V from car Vs=12V from car battery, battery, ZLmax =120 ohmsZLmax =120 ohms

Issue:Issue: at 20mA, A/D at 20mA, A/D voltage will be only voltage will be only 2.4V2.4V

Solution:Solution: Adjust A/D Adjust A/D resolution (0-2.56V)resolution (0-2.56V)

ZL A/DVL

1111

A/D Method - TemperatureA/D Method - TemperatureA/D Res (2.56/255) Volts

Sensor Output (mA) uC Bit Number Temperature (Fahrenheit)

0.48 4.00 48 0.000.49 4.08 49 1.560.5 4.17 50 3.13

0.51 4.25 51 4.690.52 4.33 52 6.250.53 4.42 53 7.810.54 4.50 54 9.38

       2.34 19.50 234 290.632.35 19.58 235 292.192.36 19.67 236 293.752.37 19.75 237 295.312.38 19.83 238 296.882.39 19.92 239 298.442.4 20.00 240 300.00

1212

Linear Based MethodLinear Based Method Temp=(1.5625*A/D Temp=(1.5625*A/D

Value)-75Value)-75 Attempt 1: Attempt 1:

Temp=((A/D Temp=((A/D Value*3)/2)-75Value*3)/2)-75

Attempt 2: Attempt 2: Temp=((A/D Temp=((A/D Value*1563)/1000)-75Value*1563)/1000)-75

SolutionSolution: Look up : Look up table, use memory table, use memory availableavailable

Temperature vs. A/D Value

y = 1.5625x - 75

0

50

100

150

200

250

300

350

0 50 100 150 200 250 300

A/D Value

Tem

per

atu

re

1313

A/D Method - PressureA/D Method - PressureA/D Res (2.56/255) Volts

Sensor Output (mA)

uC Bit Number Pressure (PSI)

0.48 4.00 48 0.000.49 4.08 49 0.520.5 4.17 50 1.04

0.51 4.25 51 1.560.52 4.33 52 2.080.53 4.42 53 2.600.54 4.50 54 3.12

       2.34 19.50 234 96.872.35 19.58 235 97.402.36 19.67 236 97.922.37 19.75 237 98.442.38 19.83 238 98.962.39 19.92 239 99.482.4 20.00 240 100.00

1414

Linear Based MethodLinear Based Method Temp=(0.5208*A/D Temp=(0.5208*A/D

Value)-25Value)-25 Attempt 1: Attempt 1:

Temp=(A/D Value/2)-Temp=(A/D Value/2)-7575

SolutionSolution: Look up : Look up table, use memory table, use memory availableavailable

Pressure vs. A/D Value

y = 0.5208x - 25

0.00

20.00

40.00

60.00

80.00

100.00

120.00

0 50 100 150 200 250 300

A/D Value

Pre

ssu

re (

psi

)

1515

Engine RPM MeasurementEngine RPM Measurement

ACI Hall-effect ACI Hall-effect current sensorcurrent sensor

TTL outputTTL output Induced supply Induced supply

powerpower Meets amperage Meets amperage

rangerange

1616

OverviewOverview

SummarySummary Measurement StrategiesMeasurement Strategies LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

1717

LabVIEW Interfacing: Front LabVIEW Interfacing: Front PanelPanel

1818

LabVIEW Interfacing: Front LabVIEW Interfacing: Front PanelPanel

1919

LabVIEW Interfacing: Front Panel LabVIEW Interfacing: Front Panel (cont.)(cont.)

RS232 communication protocolRS232 communication protocol Complete control over settingsComplete control over settings Data logging featureData logging feature

2020

LabVIEW Interfacing: Front Panel LabVIEW Interfacing: Front Panel (cont.)(cont.)

2121

LabVIEW Interfacing: Front Panel LabVIEW Interfacing: Front Panel (cont.)(cont.)

Pressure and temperature updated in real Pressure and temperature updated in real time along with engine RPM and speedtime along with engine RPM and speed

Warning lights indicate dangerous levelsWarning lights indicate dangerous levels2222

LabVIEW Interfacing: Front Panel LabVIEW Interfacing: Front Panel (cont.)(cont.)

2323

Data vs time displays operate independentlyData vs time displays operate independently

LabVIEW Interfacing: Front Panel LabVIEW Interfacing: Front Panel (cont.)(cont.)

2424

LabVIEW Interfacing: Parallel LabVIEW Interfacing: Parallel ComputingComputing

2525

OverviewOverview

SummarySummary SensorsSensors LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

2626

Microcontroller: Amtel Microcontroller: Amtel ATmega 128 MCUATmega 128 MCU

16 MHz clock16 MHz clock 8 A/D converters8 A/D converters Voltage regulator Voltage regulator

(5.5-15V)(5.5-15V) Dual UARTSDual UARTS Additional power Additional power

and ground and ground connectorsconnectors

2727

Programming PhasesProgramming Phases

A/D ConverterA/D Converter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

2828

Programming PhasesProgramming Phases

A/DA/D ConverterConverter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

2929

A/D ConversionA/D Conversion

Records oil pressure, oil temperature, and Records oil pressure, oil temperature, and coolant temperaturecoolant temperature

A/D inputs: 0-2.56VA/D inputs: 0-2.56V Sensor voltages: 0.48-2.4VSensor voltages: 0.48-2.4V Scaled into single byte valueScaled into single byte value

3030

A/D ConversionA/D Conversion

ADC clock machine cycle: 8usADC clock machine cycle: 8us 11stst conversion: 200us conversion: 200us Normal conversions: 104usNormal conversions: 104us Three conversions: 312usThree conversions: 312us

Vref = 2.56 VVref = 2.56 VVref

VinADC

255*

3131

Programming PhasesProgramming Phases

A/D converterA/D converter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

3232

RS-232 InterfacingRS-232 Interfacing

Previous experience with Previous experience with transmit/receivetransmit/receive

Stair step progress:Stair step progress: PollingPolling Interrupt drivenInterrupt driven Timer basedTimer based

3333

RS-232 InterfacingRS-232 Interfacing

Hyper Terminal problems Hyper Terminal problems Incorrect Hyper Terminal settingsIncorrect Hyper Terminal settings ASCII Setup – echo typed characters ASCII Setup – echo typed characters

locallylocally Transmitting/Receiving settings:Transmitting/Receiving settings:

9600 baud9600 baud 8 data bits8 data bits 1 stop bit1 stop bit

3434

Example RS-232 Example RS-232 CommunicationCommunication

Receive key press Receive key press from computerfrom computer

ASCII ‘F’ sent back ASCII ‘F’ sent back to computerto computer

Hyper Terminal Hyper Terminal displays displays appropriate valuesappropriate values

3535

Example RS-232 Example RS-232 CommunicationCommunication

String based String based communication communication with timerwith timer

Sends “1abcde” Sends “1abcde” every 5 secondsevery 5 seconds

Practical Practical applicationapplication

3636

Programming PhasesProgramming Phases

A/D ConverterA/D Converter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

3737

RPM CounterRPM Counter

Example simulationExample simulation Set up basic pulse Set up basic pulse

counting programcounting program 100ms (10 Hz) 100ms (10 Hz)

sampling period sampling period Counts rising Counts rising

edgesedges30 Hz Pulse Input 30 Hz Pulse Input

3838

RPM Counter

Problems with 16-bit counter Had to use external interrupts

Rising edge triggers interrupt Counter increments Inefficient

3939

Programming PhasesProgramming Phases

A/D ConverterA/D Converter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

4040

TouchscreenTouchscreen

ASCII protocolASCII protocol CRC protocolCRC protocol Used XON/XOFF to simplifyUsed XON/XOFF to simplify

4141

XON/XOFF CommunicationXON/XOFF Communication

4242

ASCII ProtocolASCII Protocol Set byte variable 1 to 0xFESet byte variable 1 to 0xFE

Set IR word variable 0 to 0x02C9Set IR word variable 0 to 0x02C9

OOppccooddee

IInntteerrnnaall RRAAMM aaddddrreessss

IInntteerrnnaall RRAAMM vvaalluuee

0xD0xD55

0x30x300

0x30x311

0x40x466

0x40x455

‘‘0’0’ ‘‘1’1’ ‘‘F’F’ ‘‘E’E’

0xD0xD66

0x30x300

0x30x300

0x30x300

0x30x322

0x40x433

0x30x399

‘‘0’0’ ‘‘0’0’ ‘‘0’0’ ‘‘2’2’ ‘‘C’C’ ‘‘9’9’

4343

Jump to Page FunctionJump to Page Function

Does not use the normal ASCII protocolDoes not use the normal ASCII protocol Reads in hexadecimal formatReads in hexadecimal format Jump to page 0x103:Jump to page 0x103:

0xA00xA0 0x020x02 0x010x01 0x030x03 0x5A0x5A

CommandCommand Page # Page # MSBMSB

Page # Page # LSBLSB

checksumchecksum

OpcodeOpcodeInternal RAM Internal RAM addressaddressInternal RAM valueInternal RAM value

4444

Calculating the Checksum Calculating the Checksum ValueValue

X=0xA0+0x02+0x01+0x03=0xA6X=0xA0+0x02+0x01+0x03=0xA6 The sums of the LSB must be 0xNN00The sums of the LSB must be 0xNN00 0x100-0xA6=0x5A0x100-0xA6=0x5A

0xA00xA0 0x020x02 0x010x01 0x030x03 0x5A0x5A

CommandCommand Page # Page # MSBMSB

Page # Page # LSBLSB

checksumchecksum

4545

Programming PhasesProgramming Phases

A/D ConverterA/D Converter RS-232 InterfaceRS-232 Interface RPM CounterRPM Counter TouchscreenTouchscreen All TogetherAll Together

4646

All TogetherAll Together

4747

Software FlowchartSoftware Flowchart

4848

OverviewOverview

SummarySummary SensorsSensors LabVIEW User InterfaceLabVIEW User Interface MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

4949

TouchscreenTouchscreen

Amulet Amulet TechnologiesTechnologies

GEMStudioGEMStudio µµHTML HTML 9600 Baud9600 Baud Resistive Resistive

technologytechnologyLCD GUI from 2010 Project

5050

TouchscreenTouchscreen

DesignDesign Numerical displaysNumerical displays Warning indicatorsWarning indicators Inter-widget communicationInter-widget communication Multiple pagesMultiple pages

5151

Touchscreen Design

5252

TouchscreenTouchscreen

WidgetsWidgets Function ButtonsFunction Buttons

Calls a function when hitCalls a function when hit

Numeric FieldsNumeric Fields Pulls the values from bytes in the Amulet’s Pulls the values from bytes in the Amulet’s

internal RAMinternal RAM

5353

TouchscreenTouchscreen

Communications with microcontrollerCommunications with microcontroller ASCII protocolASCII protocol CRC protocolCRC protocol

Amulet as slaveAmulet as slave XON/XOFF protocolXON/XOFF protocol

5454

OverviewOverview

SummarySummary SensorsSensors LabVIEWLabVIEW MicrocontrollerMicrocontroller LCD ScreenLCD Screen Wireless ChipsWireless Chips

5555

Wireless ChipsWireless Chips

Chipcon CE2500MChipcon CE2500M Voltage RegulatorVoltage Regulator RS-232RS-232 PacketsPackets Infinite Infinite

transmissiontransmission

5656

Wireless ChipsWireless Chips

5757

Aerocomm AC4790Aerocomm AC4790

5858

Aerocomm Software

5959

Future WorkFuture Work

Noise suppression circuitryNoise suppression circuitry EnclosuresEnclosures Sampling rates

Temperature, RPM, land speed Land speed calculation Support documentationSupport documentation

6060

ScheduleWeek of: Caleb Phil George

12/5/2010 finalize parts list with mechanical engineers

winter break order parts, research

1/23/2011 program temperature sensor research touchscreen softwaredesign interface for LabVIEW

setup

1/30/2011 program pressure sensor work on example programsprogram LabVIEW for receiving

data

2/6/2011 program wheel speed sensorwork on design options for

touchscreen GUItest LabVIEW for receiving data

2/13/2011 program displacement sensor design GUI for touch screen work on sensor circuitry

2/20/2011 program and combine modules design GUI for touch screen make sensor test bench

2/27/2011 program and combine modulesfinalize design and construct

GUImake sensor test bench

3/6/2011set up analog to digital

converterswork on communications with

microcontrollerwork on LabVIEW datalogging

3/13/2011 spring break

3/20/2011 implement countersfinalize GUI / communications

with microcontrollerwork on LabVIEW datalogging

3/27/2011program microcontroller totransmit data to LabVIEW

finish all touchscreenelements. start on wireless

finalize LabVIEW design andsensor circuitry

4/3/2011 interface all devices together. work on wireless devices

4/10/2011 interface all devices together. work on wireless devices

4/17/2011 work on wireless devices. documentation/finalization/final report/presentation

4/24/2011documentation/finalization/final report/presentation

5/1/20116161

QuestionsQuestions

??6262

Calculating Timer Value for Calculating Timer Value for Pulse CounterPulse Counter

OCRnAN

MhzfOCnA

1

16

OCRnA

Mhz

164

16

1.0

1

761024999 AhOCRnA 6363

top related