Download presentation
Presentation is loading. Please wait.
Published byPaulina Sparks Modified over 9 years ago
1
TEAM 9 - MRAV SOFTWARE DESIGN NARRATIVE Nick Gentry, Vinayak Gokhale, Vineet Ahuja & Oliver Staton March 23, 2011
2
Design Considerations Peripherals: ADC, UArt, Timer, I2C Constants stored in Information memory portion of Flash All peripherals will be Flag driven. Why? JTAG ports will be used for debugging
3
Main Design Consideration ADC used to Sample Ultrasonic Sensors at 20 Hz Gyroscope sampled at 250 – 300 Hz Accelerometer sampled at 250 – 300 Hz Magnetometer sampled at 10Hz User inputs at 250 – 300 Hz
4
START INITIALIZE GLOBAL VARIABLES WRITE CONSTANTS TO NON-VOLATILE FLASH INITIALIZE: ADC TIMER_A, B UART / I2C VERIFY CONNECTION W/BASE STATION ENABLE PERIPHERALS W/O INTERRUPTS except UArt VERIFY SENSOR IDS CHECK ESC ARM CONDITION FLAG INITIALIZE ESCs, BEGIN IDLE CONDITION WHILE (1) SENSOR SAMPLE == 1 SAMPLE SENSORS by enabling interrupts PID COUNT == 50 CALCULATE MTR DUTY CYCLES IF HEARTBEAT == 100 SET NEW PWM VALUES TOGGLE HEARTBEAT LED YES NO YES NO YES NO YES NO YES NO
5
Timer_A Interrupt Enable interrupt, set flag & set counter to 0 Sensor counter == val Increment counter Exit YES NO
6
PID r.pN y.pN y.vN r.pE y.pE y.vE r.h y.h y.w r.yaw y.yaw y.yawRate PID ROTATE TO BODY PID PID w/ LPF MOTOR MIXER ROTATE TO BODY North tilt y.yaw East tilt y.yaw SUM (L+R+F+B) y.pitch y.pitchRate F-B L-R pitch y.rollRate y.roll roll yawRate L+R-F-B PID STABILITY LOOPS
7
LibraryWrittenTested UArtYesNo TimerYesPartially I2CYesIn process ADCYes PID controllerNoWorked with James Goppert and developed full simulation in Scicos Status
8
The END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.