Project

General

Profile

Firmware » History » Version 6

Luiz Fernando Lavado Villa, 2019-04-17 17:44

1 1 Luiz Fernando Lavado Villa
h1. Firmware
2 2 Luiz Fernando Lavado Villa
3 4 Luiz Fernando Lavado Villa
{{>toc}}
4
5 2 Luiz Fernando Lavado Villa
The firmware of the single-phase project consists of a static scheduler coded in C and compatible with an ATMEL Mega328P micro-controller.
6
This scheduler controls the timing of several actions and guarantees that the code has a deterministic loop time, leading to a stable operation.
7
8
Details of the scheduler itself and its actions are given in the sections below.
9 4 Luiz Fernando Lavado Villa
10
h2. General introduction
11 2 Luiz Fernando Lavado Villa
12 5 Luiz Fernando Lavado Villa
The ATMEL Mega328P family is a low-cost choice of micro-controller with sever limitations when it comes to power electronics. 
13
These limitations are many-fold, but mostly it consists of low calculation capabilities. 
14
Its use for a DC-DC converter is still feaseable maily due to the fact that no major calculation is performed. 
15
However, for more advanced applications such as inverters this micro-controller will have to be replaced by a more capable counterpart. 
16
17
The main philosophy of the code described in this section was to create a loop with a deterministic time.
18
This means that the code will execute within a certain time frame which is predictable and stable. 
19
This stability allows the converter to control its inputs and outputs, even if at limited speed.
20
21
The main technique used to achieve this deterministic time frame was to avoid coding interruptions and to use a scheduler. 
22
23 3 Luiz Fernando Lavado Villa
h2. Scheduler
24 1 Luiz Fernando Lavado Villa
25 5 Luiz Fernando Lavado Villa
h2. Inputs and Outputs
26 1 Luiz Fernando Lavado Villa
27 5 Luiz Fernando Lavado Villa
h3. SPI communication
28 1 Luiz Fernando Lavado Villa
29 5 Luiz Fernando Lavado Villa
h3. PWM duty cycle management
30 1 Luiz Fernando Lavado Villa
31 5 Luiz Fernando Lavado Villa
h3. UART communication
32 3 Luiz Fernando Lavado Villa
33 5 Luiz Fernando Lavado Villa
h2. Control loops
34
35
    h3. Fast reference tracking
36 3 Luiz Fernando Lavado Villa
37
h3. Photovoltaic MPPT 
38
39
h3. Half-leg inverter