first commit

This commit is contained in:
Christian Lind Madsen
2025-05-11 22:33:48 +02:00
parent 9f1fd6b1c1
commit 61d13470de
14 changed files with 389 additions and 0 deletions

25
mppt_app.c Normal file
View File

@@ -0,0 +1,25 @@
/*
* mppt_app.c
*
* Created: 11-05-2025 21:49:02
* Author: Christian L. V. Madsen (OZ1CM)
*/
#include "mppt_app.h"
// We are using resistor dividers that has a divide down factor of 8.
uint16_t voltLowToHigh(uint16_t low_voltage){
if(low_voltage > 2500) return 20000;
return low_voltage << 3;
}
// We are using differential amplifier with gain of 16.
uint16_t voltToCurrent(uint16_t low_voltage){
if(low_voltage > 2500) return 1000;
return low_voltage << 4;
}