Purdue Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

12
Purdue Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny

Transcript of Purdue Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Page 1: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Purdue AirbusSoftware Design

Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny

Page 2: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Software Development Status

• PWM – written and tested*• UART – written but not tested• Camera – outlined in pseudo code• SD Card – written but not tested• Battery Management – outlined in pseudo code• Ground Station – outlined in pseudo code

Page 3: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Software Design Considerations

• We need to spend as little time as possible in interrupts because we have so many.

• We need as much of SRAM as possible for image buffering.

• We need the transfer speed to the SD card to be as high as possible so we will not be using SPI.

• We need a compression ratio that strikes a balance between image quality, time spent compressing and image size.

Page 4: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Arrangement

Page 5: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

PWM

• Interrupt Based• Our transmitter only has the four channels necessary for

manual flight control.• The Autopilot board requires a fifth channel to control

what flight mode is currently activated.• The PWM output of our microcontroller will emulate a

RC transmitter and output specific pulse-widths.

Page 6: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

PWM Program Flow Chart

Page 7: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

UART

• Interrupt Based• Autopilot/Microcontroller UART• Receive telemetry data from the Autopilot.• Transmit new GPS coordinates to the Autopilot.

• Microcontroller/XBee UART• Receive a new flight mode from the ground station.• Receive new GPS coordinates from the ground station.• Transmit telemetry, battery, and image data to the ground

station.

Page 8: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

UART Program Flow Chart

Page 9: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Camera

• VBLK indicates the period in which the camera will be outputting data

• HBLK indicates that the camera has data ready to be captured

Page 10: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

SD Card

• Operates as a state machine.• After initialization, the card will enter an idle state.• When the image buffer on the microcontroller receives

data from the camera, a data ready signal will be sent to the card.

• The data will be sent to the card using 4-bit SD mode until the FIFO is empty, at which point the card will be sent a command telling it there is no more data.

• The card will then return to the idle state.

Page 11: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Battery Monitor

• Operates as a state machine.• To query the battery monitor from the idle state, a logic

high must be pulsed for a specified duration on the bus.• Once a second pulse is returned from the battery monitor,

a hexadecimal command can be sent to the monitor.• The command will execute, return the results asked for

and then return to the idle state.

Page 12: Purdue  Airbus Software Design Jigar Gandhi - John-Taylor Smith - Chandler Wall - Eric Zarowny.

Ground Station

• The Ground Station will be run on an Intel Atom board.• It will overlay the telemetry and battery data onto the

image data received from the microcontroller.