How to update auto pilot, power boards quick attach, and raspberry pi

Follow these instructions to update firmware for all of the components on Draganfly drones.

Autopilot

 

Mission planner is (usually) the easiest way to do this.  

  • Open mission planner and go to setup→firmware update.  Use the “load custom firmware” button and select the appropriate .apj file.
  • Immediately power on the aircraft
  • 2-3s after powering on the aircraft connect the micro USB port on the autopilot to the computer running mission planner
    • It may be necessary to dismiss a popup in mission planner
    • if there is a VM running this may take control of the USB port for long enough that the bootloader gets skipped
  • If successful, the steps “connecting”, “erasing”, and “programming” should be seen.  
  • If this firmware version is already on the autopilot, a message will be displayed indicating that no update is needed.
  • Wait until the startup beeps are heard before disconnecting

 

Use device manager to ensure that two com ports are present during both the bootloader phase as well as the normal running phase.  It may be necessary to update drivers to get proper USB connectivity.

 

 

USB port location on XL

 

USB port on Commander 2

 

 

 

 

Power boards and quick attach

 

Xl power boards (front and rear), commander 2 power board, and quick attach board (XL and commander 2) are updated as follows:

  • Copy the firmware file to the root of a fat16, fat32 or exfat formatted micro SD card.  It is fine to use the one already in the socket.  File names must be exactly as follows (case sensitive).  Keep in mind that some operating systems (i.e. windows) may hide file extensions by default
    • Commander 2 power board - bootpwr.fx6 or bootpwr9.fx6
      • The commander 2 power boards were built with two different processors due to supply chain constraints.  It is fine to put both files on the card at once, it will choose the correct file
    • quick attach board - bootq.fx6
    • XL power board - bootpxl.fx6
  • Remove any previous loaded firmware files from the SD card (these have the same names as above, but have a .ldd extension)
  • Insert the SD card into the socket on the board to be updated.  
    • On the XL, it may be necessary to remove the cover on the quick attach pcb to access the SD card socket.  This is accomplished by removing 6 4-40 button head bolts using a 1/16" hex driver.  4 are in the cover and 2 are holding the payload release tab.  The screws are different lengths, so don't mix them up.  
    • Remove these screws on the XL to access the quick attach PCB
  • Hold down the bootloader button while powering on the aircraft
    • The button has a 160g operation force, so excessive force is NOT required
    • Button is right angle so operates along the plane of the PCB vs into the plane of the pcb
    • button will have a “click” that can be felt when properly depressed
    • The bootloader button and power button can be released after about 3 seconds
    • Quick attach PCB LED, button, and SD card slot
    • button operation direction

 

 

  • Observe the LED blink pattern
    • LED should blink rapidly at first
    • LED will pause (off or on) for 5-10 seconds
    • LED will resume blinking again, but slower than it did initially
    • LED will resume standard operation (1Hz) blink when complete
    • (add pictures of LED locations here)
  • Power down the aircraft and remove the SD card.  Insert the card into a computer and confirm that the firmware file has been renamed to have an .ldd extension
  • Reinsert the original (if any) sd card into the slot

 

 

 

Raspberry pi boot image

  • Write the image to a new micro SD card.  Creating a new card is recommended as if there is an error the existing boot image will not be destroyed.  The micro sd card should have at least an 8GB capacity.
  • Use a program such as raspberry disk imager (select choose OS → custom), balena etcher, win32 disk imager, or dd to write the image to the side card.
    • DO NOT just copy the image file to the sd card.  This won't work
    • It is normal for windows to give errors about the disk not being formatted when inserting a card that was already created for the raspberry pi or on completion of writing the image to a new card.  DO NOT format the disk
  • Remove the existing SD card from the raspberry pi and insert the new one
  • (insert pictures here)
  • Power on the aircraft
    • First boot on a “fresh” sd card may take longer due to some extra steps that happen to resize the file system during boot