This repository contains the source code for the firmware utilized in the Cubli project of a PhD Thesis.
It was developed with ARM Mbed OS open-source operating system targeting the STM32 NUCLEO-L432KC development board:
For Cubli attitude estimation it utilizes the SparkFun 9Dof Sensor Stick inertial measurement unit (IMU) composed by the ST LSM9DS1 motion-sensing system-in-a-chip:
For reaction wheel estimation and control it utilizes the Maxon EC 45 flat motor together with the Maxon ESCON Module 50/5 controller:
All the remaining mechanical and electrical parts (aluminuim structure, PCBs, etc.) were tailor-made in Autodesk Fusion 360 and Autodesk Eagle and can be found in this other repository.
The source code is organized as follows:
./ | Root
main.cpp | Main source code (call one of the programs)
+ programs | Programs files
| + examples | Example programs
| + drivers | Driver example programs
| + modules | Modules example programs
+ src | Source files
| cubli.h | Include all header files
| + drivers | Drivers files
| hall.h/.cpp | Hall sensor class [header / source code]
| lsm9ds1.h/.cpp | IMU sensor class [header / source code]
| motor.h/.cpp | Motor controller class [header / source code]
| + modules | Modules files
| estimator_speed.h/.cpp | Speed estimator [header / source code]
| estimator_attitude.h/.cpp | Attitude estimator [header / source code]
| controller_attitute_wheel.h/.cpp | Attitude and wheel controller [header / source code]
| + utils | Utility files
| parameters.h | Parameters (physical constants, controller gains, etc.)
| pin_names.h | Pin names
+ mbed-os | ARM Mbed OS source files (automatically imported)
You can import this project directly to Mbed Studio or Mbed Online Compiler.
File
>Import Program...
https://github.com/fbobrow/cubli-firmware/
under URL
and then click Add Program
Import
>Click here
to import from URLhttps://github.com/fbobrow/cubli-firmware/
under Source URL:
and then click Import
You should choose the NUCLEO-L432KC
platform as Target
while builging the project or adapt it to your Mbed compatible board.