This mode regulates the input current such that the load to the
generator has a constant, defined impedance. The impedance is set
such that it matches the ratio between the specified motor voltage and
current. In that case, the power extracted from the motor/generator ist
maximized.
- MPPT improved
- Status logging
- Smooth transition between MPPT and CV modes
- MPPT -> CV, when target voltage is reached
- CV -> MPPT, when regulation cannot hold target voltage due to
insufficient source power
This implements multiple measures for a more consistent control loop:
- Use Alarm0 to generate a trigger signal every millisecond. This
ensures that the loop’s update rate is constant.
- Introduces the Logger module to handle UART communication in a
non-blocking way (no interrupts, though). The Logger module has a
internal, statically allocated queue to accomplish this.
At least this is compiling without errors now.
- Added the ext_adc module abstracting the ADC communication (with the
AdcContext struct).
- SPI and necessary DMA channels are now passed into the AdcContext
struct and moved around on each transfer.
- Transfers seem to be triggered, but the returned values are still
wrong (either 0 or 4095). This still needs to be debugged.