Commit graph

16 commits

Author SHA1 Message Date
Thomas Kolb c7a4eb16bf Add web visualizer based on python+plotly 2024-02-15 22:27:24 +01:00
Thomas Kolb 31da2af078 Adapt impedance control to new generator 2023-06-03 00:10:09 +02:00
Thomas Kolb 55e6d5d9db Add impedance control mode
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.
2023-03-18 12:21:42 +01:00
Thomas Kolb 8746b51bd5 Various fixes and improvements 2023-03-17 19:41:13 +01:00
Thomas Kolb c1ec46305d More fancy LED flashing 2023-01-22 00:32:09 +01:00
Thomas Kolb 4cd5266653 SwitchControl: auto-switching between MPPT and CV + more
- 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
2023-01-16 23:10:49 +01:00
Thomas Kolb 4de016eb30 Implement maximum power-point tracking 2023-01-15 22:34:10 +01:00
Thomas Kolb a8ba1add0e Moved switch controller to separate module 2023-01-15 21:42:41 +01:00
Thomas Kolb d50f2cd723 Make the timing more predictable
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.
2023-01-15 00:47:55 +01:00
Thomas Kolb 2f8516cce7 Added nonblocking UART logging module 2023-01-15 00:42:58 +01:00
Thomas Kolb accfc73248 Implement a simple output voltage regulator
To be improved: inconsistent timing, very slow iteration time.
2023-01-07 23:21:43 +01:00
Thomas Kolb edf697d22b Cleanup: remove superfluous LED pwms 2023-01-07 17:25:04 +01:00
Thomas Kolb 5682479aad adc: fixed channel readout and convert values 2023-01-06 23:42:08 +01:00
Thomas Kolb 28bd3b20ab Read multiple ADC channels (maybe)
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.
2023-01-06 01:25:10 +01:00
Thomas Kolb 1a6e442815 Add dummy code to read from the external ADC 2023-01-03 22:29:01 +01:00
Thomas Kolb f172e071f8 Project created: just a test program so far
LEDs, PWM Switch Control, UART basically working.
2023-01-02 00:00:00 +01:00