Presentation is loading. Please wait.

Presentation is loading. Please wait.

Seongwoon Ko Ankith Cherala Jinliang Wei Kelton Stefan.

Similar presentations


Presentation on theme: "Seongwoon Ko Ankith Cherala Jinliang Wei Kelton Stefan."— Presentation transcript:

1 Seongwoon Ko Ankith Cherala Jinliang Wei Kelton Stefan

2  Design Considerations  Main Function Flow Chart  Code Modules  Hierarchical Arrangement of Code Modules  Biped Control GUI

3  14 KB RAM, 512 KB Flash – large enough  Language: Embedded C ◦ Compiler takes care of where to put variables and code.  Explicitly Put into Flash (declared as const) ◦ Look-up tables for trigonometric functions ◦ Vector arrays of foot positions for static sub- actions (later)

4  8 PWM channels to control 8 servos  Problem: not fully utilize the duty resolution ◦ Servo refresh period: 25 ms ◦ Pulse width 0.6 ms ~ 2.4 ms controls 0 ~ 180 degrees of turning ◦ Only use 7.2 % of the duty register resolution ◦ Not accurate enough

5  Solution: ◦ Set PWM period to 2.5 ms ◦ 1 servo refresh period consists of 10 PWM periods ◦ Set PWM duty register only for the first period, set others to 0 (timer is used)

6  Connected to WiFly card for communicating with control GUI  Interrupt-driven receive ◦ Not know when user will send command  Program-driven write ◦ Send status message to user periodically

7  Connected to accelerometer for measuring external force.  Micro as master, accelerometer as slave  Interrupt-driven ◦ Needs to take immediate action for external force for balancing

8  1 ATD channel connected to ultrasonic range finder to detect obstacles  Program-driven ◦ Checks output periodically ◦ Biped walks slowly, so enough time to avoid obstacles

9  Accumulate timer tickets to trigger the following actions: ◦ Set and reset PWM duty register ◦ Read output from ultrasonic range finder ◦ Send status message to PC

10  User-Control Mode ◦ Read control message, act accordingly ◦ Assume no need to self-balance or avoid obstacle – user should take care of it  Auto-Navigation Mode ◦ Read environment data, walk freely while avoiding obstacles and balancing itself

11  State Machine + Interrupt Driven + Pooling Loop  Two States: ◦ User-control state ◦ Auto-navigation state  Interrupts: WiFly, accelerometer, timer  Interrupts service routines set flags, infinite main loop checks flags and acts accordingly

12  Four Main Actions: Walk, Turn, Stop, Balance  Each action done by doing sub-actions ◦ Walk: lift left foot -> bent for balancing -> move left foot to front -> …  Static sub-actions and Dynamic sub-actions  Variables to store foot positions and states  Periodically adjust itself

13  Static sub-action: pre-defined array of foot positions and orientations (stored in flash)  Static sub-actions performed under default conditions (no significant external force other than gravity)  When a static sub-action is done, modify foot position and foot position state  If needs to change to another action, move to another sub-action based on current foot position state

14  Dynamic sub-action: calculate next foot position and orientation based on current foot position and environment information (acceleration, …)  Significant external force -> Switch from static sub-action to dynamic sub-action  When possible -> switch back to static sub- action  How to calculate next foot position? – not yet know

15 Timer Accelerometer(SPI) WiFly Card(SCI)

16 o Balance itself under significant external force (dynamic sub- actions). o In SPI ISR, SPI interrupt is also handled but simply change acceleration value. o Return with each servos at their positions before interrupt – to resume appropriate static sub- action

17  Read message from WiFly card and push it to message queue – possibly pending messages  Increment msgCnt by 1  Note: SCI interrupt is disabled/ignored when serving SPI interrupt

18 Preliminary Flowchart

19  PWM-Servo Control module ◦ Control the servo to turn to given an angle  Inverse-Kinematics module ◦ Given a foot position and orientation, calculate servo angles  Next-Sub-Action module ◦ Based on the action to perform and current feet positions, determine next sub-action to perform

20  Dynamic-Next-Position module ◦ Based on environment information and current foot positions, find next foot positions to balance itself  SCI-WiFly module ◦ Provides functions initializing SCI port 1, sending messages to and receiving messages from WiFly card  MsgParser module ◦ Parse messages received from WiFly card and set appropriate global variables.

21  SPI-Accelerometer module SPI initialization; SPI interrupt service routine  ADC–Obstacle module ◦ ATD channel initialization; Read and set obstacle distance and modify other variables if needed  Timer module ◦ Timer initialization; Timer interrupt service routine  Status LED module

22

23


Download ppt "Seongwoon Ko Ankith Cherala Jinliang Wei Kelton Stefan."

Similar presentations


Ads by Google