Upload
ozzie
View
16
Download
0
Tags:
Embed Size (px)
DESCRIPTION
ATV INSTRUMENTATION DISPLAY. System Design Ed Raezer Senior Project Western Washington University. Desired Functions. Speedometer 0-99 MPH 1 MPH Resolution Tachometer 0-12000 RPM 100 RPM Resolution Odometer 0-9999.9 Miles 0.1 Mile Resolution Clock 12 Hour Clock HH:MM:SS. - PowerPoint PPT Presentation
Citation preview
ATV INSTRUMENTATIONDISPLAY
System Design
Ed RaezerSenior Project
Western WashingtonUniversity
Desired Functions Speedometer
0-99 MPH 1 MPH Resolution
Tachometer 0-12000 RPM 100 RPM Resolution
Odometer 0-9999.9 Miles 0.1 Mile Resolution
Clock 12 Hour Clock HH:MM:SS
Designing “To Do” List
Hardware Which MCU to use? How to interface system with ATV? What to use for user interface?
Software Which software kernel to use? What tasks are needed? How much memory needed?
MicroController Choice
Motorola MC9S12C32 32k Bytes EEPROM, 2K Bytes RAM
Estimated Memory Needed 8k Bytes EEPROM, 1.5K Bytes RAM
26 I/O Ports
Interfacing with ATV for RPMs
RPM Readings
3.57KR8
1.02KR9
D1
D2
ComparatorU2
1.02kR12Splice into
Pulse Signal
+5V
DG
ND
+5V
DGND
+5V
MAX931
+
-
IN-
IN+
V-
GND
HYST
REF
V+
OUT
4
3
2
1
5
6
7
8
-1.7Vpk pulse generated every engine rotation.-Needed to be converted to a digital 0-5V square wave
signal so the MCU could read it.
RPM Sensing circuit
0V
5V
t
Wheel Rotation Magnetic Reed
switch Magnet mounted
on brake rotor trips switch every rotation
Creates a 0-5V square wave
User Interface 2x16 LCD Display
Large Characters W/ backlight
Shift Light Green LED
Redline Light Red LED
RPM LED Bargraph 3 Pushbuttons
MODE
LCD DISPLAY
PUSH BUTTONS
LEDS
10 Seg. LED
BARGRAPH
Schematic
Kernel Selection
Kernel Choice: MicroC/OS-IIReal-time preemptive multitasking kernel with a 1 ms tick period
Configured for my program Modify (os_cfg.h)
Task Needed & Priorities
4- Start Task5- Clock Task6- U.I. Task7- Button Monitor Task8- RPM Task9- Speed Task
Start Task
Description:-Initializations: LCD, Keys, OSTick-Intialize Port Directions and Initial Values -Creates Tasks-Priority #4-Period: once (at startup)
Clock Task
Description:-Keeps time using a software clock-Runs timer for speed task-Updates time buffer-Period: 10 msec (Periodic)
User Interface Task
Description:-Reacts to button presses-Clock Setting-Activates LEDs-Changes Display Modes-Displays data on LCD Display
RPM Task
Description: -Retrieves pulse count from pulse accumulator every 600 msec and converts to RPMs-Updates RPM buffer.-Controls LED Bargraph-Period: 600 msec (periodic)
ISR
Interrupt caused by input from wheel rotation sensor
Counter incremented every time wheel makes one rotation.
Period: Dependent on speed of ATV
Speed Task
Description:-Every 5 wheel rotations, speed is calculated using timer ran in the clock task.-Unless 3 secs. have elapsed, then speed is calculated using # of tire rotations in that 3 second period.-Updates odometer -Updates speed buffer
Dataflow Diagram
Reed Switch
Ignition Pulse
Pulse Accum.
RPMTask
RPM Buffer
UserInterface
Task
LCD Display
Clock Task
CloickBuffer
Speed Task
Speed Buffer
OdometerBuffer
Physical MCUDisplays
ISRRotation Counter
LED Bargraph
User Interface State Diagram
SPEED XX MPH
CLOCK XX:XX:XX
SPEED XX MPH
TACH XXXXX RPM
SPEED XX MPH
ODOM XXXXX MILES
RESETODOMETER
UP + DOWN
MODE
MODE
MODE
START
SET CLOCK
UP +DOWN
UP + DOWN
Prototype
Learning Process
Leave time for the unexpected Teamwork
Questions?
Thank You For Your Time