The firmware of the single-phase project consists of a static scheduler coded in C and compatible with an ATMEL Mega328P micro-controller.
This scheduler controls the timing of several actions and guarantees that the code has a deterministic loop time, leading to a stable operation.

Details of the scheduler itself and its actions are given in the sections below.

General introduction

The ATMEL Mega328P family is a low-cost choice of micro-controller with sever limitations when it comes to power electronics.
These limitations are many-fold, but mostly it consists of low calculation capabilities.
Its use for a DC-DC converter is still feaseable maily due to the fact that no major calculation is performed.
However, for more advanced applications such as inverters this micro-controller will have to be replaced by a more capable counterpart.

The main philosophy of the code described in this section was to create a loop with a deterministic time.
This means that the code will execute within a certain time frame which is predictable and stable.
This stability allows the converter to control its inputs and outputs, even if at limited speed.

The main technique used to achieve this deterministic time frame was to avoid coding interruptions and to use a scheduler.


Inputs and Outputs

SPI communication

PWM duty cycle management

UART communication

Control loops

Fast reference tracking

Photovoltaic MPPT

Half-leg inverter

Updated by Luiz Fernando Lavado Villa over 5 years ago · 6 revisions