1 / 14

Electrics Bicycle Display

A real-time multitasking system to display and monitor various data on an electric bicycle, including speed, distance, motor's state, power, battery level, and duty cycle.

jonb
Download Presentation

Electrics Bicycle Display

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Electrics Bicycle Display By Philippe Ng April 26, 2005 Western Washington University Electronics Engineering Department

  2. Kernel Selection MicroC/OS-II • Real-time multitasking

  3. Tasks and Priorities • Start Task Priority: 4 • Data Task Priority: 5 • Key Task Priority: 6 • User Interface Task Priority: 7

  4. Start Task • Initializes MicroC/OS and creates the other tasks • Priority: 4 • Period: Executes once at startup • Execution Time: ~50μs estimated • CPU Load: approximately zero

  5. Data Task • Initializes and monitors CAN bus • Receives CAN frames • Determines throttle percentage • Priority: 5 • Period: Periodic – 10ms • Execution Time: 14μs • CPU Load: 0.0014

  6. Key Task • Scans pushbuttons for keypress and stores entry in buffer • Priority: 6 • Period: Sporadic – 10ms • Execution Time: 2us • CPU Load: 0.000 2

  7. User Interface Task • Allows users to change LCD display and to select user mode. • Updates the LCD screen with new values displays speed, distance, motor’s state, power, battery level, and duty cycle. • Priority: 7 • Period: Periodic – 500ms • Execution Time: 3ms • CPU Load: 0.03

  8. CPU Load

  9. Modules • eBike.c • LCD.c • ATD.c • UcosKey.c • CAN.c

  10. Module Libraries

  11. Dataflow Diagram eBike.c Push buttons I/O Keypad Driver Module Left_key Right_key Regen_key 10ms KeyInit() KeyTask() Key.buffer KeyPend() Key.flag

  12. Dataflow Diagram eBike.c LCD Screen LCD Driver Module KeyInit() LcdSpeed() LcdDistance() LcdState() LcdPower() LcdBattery() LcdDuty() LcdClrLine() LcdClrDisp() LcdDispStrg() 100ms UITask() LCD

  13. Dataflow Diagram eBike.c A-to-D Throttle I/O ATD Driver Module KeyInit() ATDCTL5 10ms ATD0DR0 DataTask() ATDRead() ATD0 Throttle ATD0DR1 ATD0DR2 Avg

  14. Dataflow Diagram CAN Bus Physical Layer eBike.c CAN Driver Module CANInit() CANFilter() CANGetStatus() DataTask() TXCAN0 RXCAN0 CAN0Controller Transmit Buffer CANPushMessage() ID Filter Receive Buffer CANPullMessage()

More Related