uhi22 / ccs32clara

STM32 with QCA7005 as CCS charge controller
GNU General Public License v3.0
59 stars 18 forks source link

Analog HV measurement does not support an offset #23

Open uhi22 opened 3 months ago

uhi22 commented 3 months ago

The analog input for measuring the inlet voltage is usually driven by an isolated voltage conversion board (e.g. muehlpower board), which has an output voltage >0 in case of zero inlet voltage. (typical the 4mA to 20mA for full range) But the software just calculates Param::SetFloat(Param::InletVoltage, AnaIn::udc.Get() / Param::GetFloat(Param::UdcDivider)); which does not consider the offset.

Discussed here: https://openinverter.org/forum/viewtopic.php?p=72086#p72086

Todo: add the offset, either as parameter or even fixed to the existing, LIM compatible boards.

uhi22 commented 1 month ago

As first step, added the hardcoded offset. Next steps: