Welcome to FAURO! This repository houses the Flight Software source code for an avionics platform that has a small form factor and can fit into an amateur rocket kit. While the focus of this project is the Flight Software for the avionics, you will also find source code for ground support equipment, design documentation, and log files from flights. It is a follow-on to the AURO project. While AURO was implemented in C using a custom-designed FSW architecture, FAURO will be implemented using the F' Flight Software Framework
Before going further, I would like to cover my motivation for this project so many of the architecture decisions make more sense. I am interested in developing a system that allows me to challenge and showcase my capabilities as a Flight Software Engineer. While the term Embedded Software Engineer is used more broadly across different industries, I am using the term Flight Software
(FSW) throughout to signal that the expectation for autonomy and fault tolerance of this code should be on par with design principles used in spaceflight applications.
This project is made up of four distinct systems. When referred to all together, the term Mission System
is used. At an individual system level, there is FAURO
or the Flight System
, the Launch Station
, the Base Station
, and the Ground System
. Sometimes, the final three are jointly referred to as the Ground Segment
.
-
FAURO
- The flight vehicle and where much of the development effort is focused. The 3D printed Avionics Bay that accompanies FAURO can fit into 76mm diameter rocket kits.
- The hardware consists of:
- 3.7v 500mAh Lithium Ion Polymer Battery
- Flight Computer: ATSAMD21G18 ARM Cortex M0 processor
- Micro SD storage flight logger
- 915 MHz radio
- Accelerometer
- Magnetometer
- Gyroscope
- Altimeter
- GPS receiver
- Developed in C++ using the F' Flight Software Framework. While the aforementioned AURO project used the FreeRTOS kernel, the barmetal scheduler needed to be utilized for FAURO due to image size constraints.
The integrated FAURO system
-
The Base Station
- A device that receives flight data from FAURO and passes it along a serial interface to the ground system
- The hardware consists of:
- ATSAMD21G18 ARM Cortex M0 processor
- 915 MHz radio
- Developed in C++
The integrated Base Station
-
The Ground System
- For this project, the F' GDS that ships with F' will be used.
-
The Launch Station
- A device that energizes the launch circuit when commanded to ignite the rocket motor
- Hardware consists of:
- 3.7v 500mAh Lithium Ion Polymer Battery
- Flight Computer: ATSAMD21G18 ARM Cortex M0 processor
- 915 MHz radio
- Power and safety switches
- Igniter cables
- 9V battery
- Developed in C++
The integrated Launch Station
While those FAURO-specific conventions are more aesthetic in nature, external standards are also in effect to make the code more reliable and fault tolerant. In 2009, NASA's Jet Propulsion Laboratory published the JPL Institutional Coding Standard for the C Programming Language. As this standard aligns nicely with the objectives for this project, it was consulted extensively to improve FAURO's FSW.
In order for everything to work properly, the following board support packages and libraries must be installed:
- Board Support Package:
- Arduino SAMD Boards by Arduino
- Adafruit SAMD Boards by Adafruit
- Real Time Operating System:
- Arduino-FreeRTOS-SAMD21 by BriscoeTech (a port of Richard Barry's FreeRTOS)
- Radio:
- RadioHead Adafruit Fork
- General Adafruit Sensors:
- Adafruit Unified Sensor by Adafruit
- Adafruit BusIO by Adafruit
- IMU/Gyro and Magnetometer:
- Adafruit_LIS3MDL by Adafruit
- Adafruit_LSM6DS by Adafruit
- Barometric Pressure Sensor:
- Adafruit_BMP3XX by Adafruit
- GPS Sensor:
- Adafruit_GPS by Adafruit
While extensive unit testing and Hardware in the loop testing is not yet implemented, basic examples of this functionality exist for the FswManager component. The build files can be generated with the command fprime-util generate --ut
, compiled with the command fprime-util build --ut
, and run with the command fprime-util check
.
The Ground Segment comprises the Base Station, Launch Station, and Ground System.
Code for the Base Station can be found in the top level project directory. It is designed to be lightweight and simple since the task it performs is simple. The Base Station:
- receives any data transmitted on the radio for relay back to the host computer so it can be displayed with the Ground System
- sends FSW commands from the operator to AURO
Code for the Launch Station can is not yet implemented for FAURO. In AURO, its purpose was also simple so the code will be lightweight. The launch station:
- listens on the radio link for one of the few FSW commands from the Base Station that requires it to act
- takes the commanded action (namely energize a non-latching relay to complete the launch circuit and ignite the rocket motor)
- report with LAUNCH level EVRs the launch station's actions
For both the Base Station and Launch Station, transmission on the radio link is only allowed if AURO cedes transmission rights by initiating a Groundspeak session. FAURO does this by transmitting a special packet to indicate some other system may transmit for a short time. The Ground System implements logic that deconflicts usage of the Groundspeak session between the Base Station and Launch Station by disabling user transmission of FSW commands for a short time.
While the aURO project had a custom-made GDS, building that was mostly done out of necessity. Since the main purpose of this series of projects is to develop FSW expertise, the fact that F' ships with a a basic ground system was helpful and allowed greater focus on the FSW. FAURO works nicely with the F' GDS out of the box, but one small modification was made to display the unix epoch offset in seconds in the terminal each time FAURO reset. This allows the operator to use the TIME_FROM_EPOCH_SET
command so the GDS-reported time for telemetry matches the actual time.
- FAURO
- Adafruit Feather M0 Adalogger
- Adafruit Radio FeatherWing - RFM69HCW 900MHz - RadioFruit (includes male headers)
- Lithium Ion Polymer Battery - 3.7v 500mAh
- Adafruit BMP390 - Precision Barometric Pressure and Altimeter - STEMMA QT / Qwiic = Adafruit LSM6DSOX + LIS3MDL FeatherWing - Precision 9-DoF IMU
- Adafruit Mini GPS PA1010D - UART and I2C - STEMMA QT
- STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long (2x)
- uFL SMT Antenna Connector
- Stacking Headers for Feather - 12-pin and 16-pin female headers
- Header Kit for Feather - 12-pin and 16-pin Female Header Set
- Simple Spring Antenna - 915MHz
- SanDisk Ultra 16GB Ultra Micro SDHC
- Low voltage wiring for jumpers
- BASE STATION
- Adafruit Feather M0 RFM69HCW Packet Radio - 868 or 915 MHz - RadioFruit (includes male headers)
- 915MHz LoRa Antenna Omni 5dbi Gain SMA Male (one for Base Station and one for Launch Station)
- uFL SMT Antenna Connector
- LAUNCH STATION
- Adafruit Feather 32u4 RFM69HCW Packet Radio - 868 or 915 MHz - RadioFruit
- Adafruit Non-Latching Mini Relay FeatherWing (includes male headers)
- 915MHz LoRa Antenna Omni 5dbi Gain SMA Male (one for Base Station and one for Launch Station)
- uFL SMT Antenna Connector
- Header Kit for Feather - 12-pin and 16-pin Female Header Set
- Lithium Ion Polymer Battery - 3.7v 500mAh
- JST-PH Battery Extension Cable - 500mm
- Illuminated Toggle Switch with Cover - Red
- Illuminated Toggle Switch with Cover - Green
- 9-volt battery
- Low voltage wiring for jumpers
- High voltage wiring for launch circuit
- ASSEMBLY HARDWARE
- 3D PRINTED PARTS (Avionics and Ground Equipment Boxes)
- see stl files in AURO repository for:
- FAURO Parts
- Battery Enclosure
- Fixed Avionics Bay
- Removable Avionics Bay
- Base Station Parts
- Base Station Base
- Base Station Top
- Launch Station Parts
- Launch Station Base
- Launch Station Main Top
- Launch Station Antenna Top
- FAURO Parts
- see stl files in AURO repository for:
- Melt embedment nuts into 6 holes on the Fixed Avionics Bay using soldering iron
- Melt embedment nuts into 2 holes on the side of the Removable Avionics Bay where the Battery Enclosure screws enter
- Melt embedment nuts into 4 holes on the side of the Removable Avionics Bay where the board mounts
- Add screw standoffs to the 4 holes where the board mounts
- Solder a jumper from pin 12 to the reset pin on Adafruit Feather M0 Adalogger
- Solder jumper from pin 11/A to pin RST on Adafruit Radio FeatherWing
- Solder jumper from pin 6/D to pin CS on Adafruit Radio FeatherWing
- Solder jumper from pin 5/E to pin IRQ on Adafruit Radio FeatherWing
- Solder the spring antenna into the antenna hole on the Adafruit Feather M0 Adalogger
- Solder Female Header Set to Adafruit Feather M0 Adalogger with black connector on the top side of the board
- Solder Stacking Header to Adafruit Radio FeatherWing with black connector on the top side of the board
- Solder Male Header Set to Adafruit LSM6DSOX + LIS3MDL FeatherWing - Precision 9-DoF IMU with the longer portion of the pins on the bottom side of the board
- Screw the Adafruit Feather M0 Adalogger into the Removable Avionics Bay
- Insert the stacking header male pin into the Adafruit Feather M0 Adalogger female pins
- Insert the IMU male pins into the stacking header female pins
- Add a standoff to two holes that share a long side of the IMU using a nut from the screw kit
- Screw the GPS antenna into one of the two standoffs on the IMU
- Screw the BMP sensor into the other standoff on the IMU
- Use the two STEMMA QT cables to connect the IMU and GPS and the GPS and BMP
- Thread the battery cable through the opening, place the battery in the appropriate position, and attach the battery enclosure with screws
- As desired, finish assembly by plugging in the battery, adding the SD card, and connecting the Removable and Fixed Avionics Bays
The integrated FAURO system
- Melt embedment nuts into the 8 2.5mm holes on the Base Station base using soldering iron
- Insert four standoff screws on the bottom surface of the inside of the Base Station base
- Solder uFL SMT connector to appropriate pad on the Adafruit Feather M0 RFM69HCW
- Mount the Adafruit Feather M0 RFM69HCW board inside the Base Station using the standoffs and M2.5 screws
- Mount the LoRa Antenna to the hole in the Base Station top
- Connect the Lora Antenna cable to the uFL connector that was previously soldered
- Mount the top of the Base Station to the base using M2.5 screws
The integrated Base Station
- Melt embedment nuts into the 9 2.5mm holes on the Launch Station base using soldering iron
- Insert four standoff screws on the bottom surface of the inside of the Launch Station base
- Mount the illuminated toggle switches in the two appropriate holes (the larger two) on the Antenna Top
- Mount the LoRa Antenna to the remaining hole in the antenna top
- Solder uFL SMT connector to appropriate pad on the Adafruit Feather 32u4 RFM69HCW
- Solder the Female Header Set to the Adafruit Feather 32u4 RFM69HCW with the black connector portion facing the top of the board
- Solder the Male Header Set to the Adafruit Non-Latching Mini Relay FeatherWing so that the longer portion of the pin faces the bottom of the board
- Connect the Adafruit Feather 32u4 RFM69HCW and Adafruit Non-Latching Mini Relay FeatherWing using the pins soldered
- Cut and splice the JST-PH Battery Extension Cable - 500mm and the Lithium Ion Polymer Battery so that red wire can be run through the green toggle switch
- Attach the wiring, battery, green switch, and Adafruit Feather 32u4 RFM69HCW such that the board is only powered when the green toggle is flipped up and lighted
- Wire the 9V battery, red switch, relay, and launch wiring so that the circuit can only completed if the red toggle is flipped up and lighted
- Solder the jumper wire from pin 12 to the relay set pin
- Connect launch circuit leads to the appropriate relay outputs
- Mount the boards to the Launch Station using the standoffs and M2.5 screws
- Place the Lithium Ion Polymer Battery and 9V battery in the appropriate compartments
- Mount the top of the Launch Station to the base using M2.5 screws
The integrated Launch Station
TO BE COMPLETED - procedure for cloning the project properly
TO BE COMPLETED - procedure for how this project was setup from scratch
- Force the Feather M0 to enter programming mode by doing EITHER:
- Double tap the physical reset button on the microcontroller
- Using vscode serial monitor, open a connection to the board with a 1200 baud rate then immediately close it. Once programming mode is entered, it is recommended to switch the baud to 115200 immediately to prevent an inadvertent entry into programming mode.
- Using the windows explorer GUI, copy the fauro_deployment.bin binary from the WSL filesystem into one directly accessible by Windows. The “Documents” folder will be used here and referenced later on during the command to flash the image.
- Confirm the adafruit libraries required for the FeatherM0 are installed in Windows using the Arduino IDE (adafruit and arduino M0/SAMD packages)
- Note the complete file path of the Windows copy of the binary and the COM port for use in the command below. The following powershell command may be used to ascertain the correct COM port:
usbipd list
- Flash the image using the following Powershell command:
C:\Users\snowicane\AppData\Local\Arduino15\packages\adafruit\tools\bossac\1.8.0-48-gb176eee/bossac.exe -i -d --port=COM22 -U -i --offset=0x2000 -w -v C:\Users\snowicane\Documents\Fauro.bin -R
- Once flashing completes, the serial monitor of vscode can be used to confirm the target is active and printint things over the serial connection
- Bind and attach the base station or target device to WSL so the serial data can be fed to the GDS. Note, if you wish to bind to the target device directly the serial connection opened in step 6 must first be closed. The following powershell command can be used with the appropriate busid from the usbipd command above:
usbipd bind --busid 1-10
usbipd attach --wsl --busid 1-10
- Note that usually the bind command is only required once even if the board is disconnected and reconnected
- Note that the command to detach a port is:
usbipd detach --busid 1-10
- On the linux side, the following two commands can be used to see the attached COM port was successful:
lsusb
ls /dev/tty*
(will usually be attached as ttyACM0)
- Run the GDS with the following linux command:
- `fprime-gds -n --dictionary ./build-artifacts/featherM0/Fauro/dict/FauroTopologyAppDictionary.xml --comm-adapter uart --uart-device /dev/ttyACM0 --uart-baud 115200
FAURO demo video
https://youtu.be/RNxwbEgiWnk