PWM switch: Bug fixed + some improvements

- Serious bug: Switch did not go below 90% duty cycle (left-over from testing code). Could result in overcharging of battery.
- Improvement: Preventing very short on/off times (duty cycles close to 0 or 1) as switching time is quite slow
- PWM frequency now configurable via PCB config (and increased from 20 to 25 Hz)
- Some unused parameters in PwmSwitch struct removed and variables renamed
- Overcurrent setting now via solar_bus
This commit is contained in:
Martin Jaeger
2019-08-16 11:37:25 +02:00
parent e51a6384fb
commit 3f4f52ea18
9 changed files with 88 additions and 71 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ void dcdc_control(Dcdc *dcdc, DcBus *high_side, DcBus *low_side);
* @param high_side High-side power port (e.g. solar input for typical MPPT charge controller application)
* @param low_side Low-side power port (e.g. battery output for typical MPPT charge controller application)
*/
void Dcdcest(Dcdc *dcdc, DcBus *high_side, DcBus *low_side);
void dcdc_test(Dcdc *dcdc, DcBus *high_side, DcBus *low_side);
/** Prevent overcharging of battery in case of shorted HS MOSFET
*