Survey

Here are some embedded control system projects.

Motor Controllers

SimpleFOC

Simple framework based on Arduino that emphasize on simplicity. Motor is controled in a while loop that;

  1. First acquires sensor data such as phase current from ADC or position/speed sensor.

  2. Then caculates the PWM duty cycles.

  3. Finally, applies the PWM duty cycles to each phase.

SimpleFOC code

ST Motor Workbench

Interrupt-based loops with sensor data acquired in the control loop.

The hardware is optimized for motor control, so the software can be simple.

ST motor control course: FOC library about interrupt

Spinner

Motor controller based on Zephyr as a proof of concept project.

For STM32 implementation (currently the only one available), it uses Zephyr’s Direct ISR for;

  • Phase current sampling using ADC [1].

  • Hall effect encoder using timer [2].

PWM duty cycle is calcuated and set in the current sampling loop [3].

References

Vechicle Controllers

CogniPilot - Cerebri

Publisher/subscriber model.

GitHub: CogniPilot/cerebri

Flight Controllers

ArduPilot

ArduPilot Architecture

ArduPilot code overview

PX4

PX4 Architecture

Software architecture

3D Printers

Marlin

Code structure

Kilpper

Kilpper code overview

Zephyr projects

List of Zephyr applications and frameworks: awesome Zephyr

Popular Zephyr projects: