Survey

Here are some projects that can be referenced for designing an embedded control system.

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.

References

ST Motor Workbench

Hardware timer-driven system where time-critical tasks are executed in ISRs and utilizes Cortex-M’s NVIC to have preemptible interrupts with priorities. Since the hardware is optimized for motor control (specialized timer for three phase PWM), so the software can be simple.

References

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

Vehicle management unit based on Zephyr for autonomous vehicles.

It is publisher / subscriber model similar to ROS.

References

Flight Controllers

ArduPilot

ArduPilot Architecture

References

PX4

PX4 Architecture

References

3D Printers

Marlin

Code structure

Kilpper

Kilpper code overview

Other Zephyr projects

List of Zephyr applications and frameworks: awesome Zephyr

Some popular Zephyr projects: