[Ovmsdev] Remaining Charge calculator

Michael Geddes frog at bunyip.wheelycreek.net
Thu Dec 29 20:02:20 HKT 2022


Hi,

There's a remaining charge calculator currently in the hyundai base class
which I have improved upon.  This configuration allows for the charge
voltage to be part of the equation.  This is the example from data I
collected with the ioniq 5 on 800v charging .. and I've written a plugin so
I can get more charge profile information at other charge voltages.

I'm happy to leave it in the Ioniq 5 code, but was wondering if I should
put the implementation in a common area.. vehicle.h maybe?

//.ichael

---8<----------------------

// Charging profile
//  - Must be from lowest to highest to%.
//  - Higher voltages must come before lower voltages for the same to%
charging_step_t ioniq5_chargesteps[] = {
// voltage, to%, WattHours
  { 750,     10, 100000 },
  { 750,     25, 190000 },
  { 750,     45, 220000 },
  { 750,     75, 120000 },
  { 750,     80,  80000 },
  { 400,     85,  60000 },
  { 400,     90,  40000 },
  { 100,     90,   1100 },
  { 400,     95,  25000 },
  { 100,     95,   7400 },
  { 100,    100,   7200 },
  { 0, 0, 0 },
};

int CalcRemainingChargeMins(int chargeVolt, float chargespeed, int fromSoc,
int toSoc, int batterySize, charging_step_t charge_steps[])
{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20221229/a006d3a7/attachment.htm>


More information about the OvmsDev mailing list