update ARDUINO_MPPT_FIRMWARE_V2.1/4_Charging_Algorithm.ino.

pull/1/head
慕炎 2022-08-11 06:07:59 +00:00 committed by Gitee
parent 922e3692b8
commit 7b95458f77
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ void Charging_Algorithm(){
//psu模式和psu充电模式还是要区别一下充电模式为了充电可以榨干输入源psu模式则并不一定需要所以暂时关闭此判断 20220811
//if(currentOutput>PSUcurrentMax) {PWM--;} //电流高于外部最大值 → 降低占空比
else if(voltageOutput>voltageBatteryMax){PWM--;} //电压高于 → 降低占空比
//else if(voltageInput<voltageInputMax-1){PWM--;PSUcurrentMax=PSUcurrentMax-0.02;} //当带载输入电压与空载电压相差1v降低占空比及降低额定电流以保证能获得外部电源最大电流20220806
else if(voltageInput<voltageInputMax-1){PWM--;} //当带载输入电压与空载电压相差1v降低占空比20220806
else if(voltageOutput<voltageBatteryMax){PWM++;} //当输出低于充电电压时增加占空比(仅用于 CC-CV 模式)
else{} //当达到设定的输出电压时什么都不做
PWM_Modulation(); //将 PWM 信号设置为 Buck PWM GPIO