220 likes | 329 Vues
This project outlines the design of an ATV instrumentation display system, featuring essential functions like a speedometer (0-99 MPH), tachometer (0-12000 RPM), odometer (0-9999.9 miles), and a 12-hour clock. Key considerations involve selecting an appropriate microcontroller (Motorola MC9S12C32) and interfacing with the ATV systems. The project outlines tasks for software, hardware, and user interface, including task prioritization for real-time operation. A focus on teamwork and adaptability during the design process ensures a functional prototype is developed.
E N D
ATV INSTRUMENTATIONDISPLAY 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
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
RPM Readings -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
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
Kernel Selection • Kernel Choice: MicroC/OS-II Real-time preemptive multitasking kernel with a 1 ms tick period • Configured for my program • Modify (os_cfg.h)
Task Needed & Priorities 4- Start Task 5- Clock Task 6- U.I. Task 7- Button Monitor Task 8- RPM Task 9- 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
Learning Process • Leave time for the unexpected • Teamwork
Questions? • Thank You For Your Time