9

Add MG5 EV to ODB2 support

  • Done

Avatar
Biffo

Given that the MG5 and Long Range are now listed on ABRP and the ZS has ABRP ODB Connection - can this be added for the MG5 too?

Using Vgate iCar Pro OBD2 Bluetooth 4.0 Adapter which is listed as compatible


A

Activity Newest / Oldest

Avatar

Samuel_ABRP

Hey there, we just pushed an update to the SoC calculation for MG5 SR, can anyone please verify it works better now? Please provide feedback here or send me a mail to samuel@iternio.com if you have feedback on the MG5 SR. Thanks!


Avatar

craig simmonds

Hello, sorry to rebump this thread. ABRP via ODB is showing 22% where as the car dashboard is showing 27%. Any idea what I'm doing wrong?


Avatar

Katya_ABRP

Status changed to: Done

Avatar

Katya_ABRP

Post moved to this board

Avatar

David Patterson

Used on a long run from Essex to Manchester last week, the ABRP reported charge was fairly accurate to the actual on the dials, but the estimated was crazily off by around 10% over the full journey. I know I pretty much get 2.5 miles per 1% (250 mile range almost all the time). I would have assumed by now (4ish months) it would have a good estimate of my drive style etc.

Not a complaint, just an observation.


Avatar

Samuel_ABRP

Hi everyone,

we just noticed on another car, that many cars seem to use available energy divided by total available energy. As the SoC is still a little bit off for the MG cars, we want to try that here too. Does anybody know the commands and equation on how to get total available energy and currently available energy?


Avatar

Biffo

On the MGEV forum - LiamWhales posted the following (he has been commenting on thread on old ABRP forum too) - I haven't confirmed it's accuracy.

"It's just a 4% buffer at the bottom and a 3% at the top, so you take off 4% from the reported value then divide that result by 93% to get the right SoC.

The original value comes out with a scale of 0 to 1000 so it's

(INT16(A:B)-40)/9.3

I have one of the older 50kWh models, looking at the spec's for the new 60kWh models it should still work for those as I think they still have the same 4% bottom buffer and 3% top buffer"

From my own makings, it looked like these equations gave a fairly accurate (although perhaps excessively complex) translation too

Polynomial : y = -0.0039x2 + 1.0929x - 0.0331
Linear : y = 1.0889x - 0.0323


Avatar

Samuel_ABRP

Well, that is if the battery has full health. But if the soh drops, this will get inaccurate again.


  • Avatar
Avatar

Craig and Lucy

Did a long trip over the weekend. ABRP seemed to be 2% higher than the car. Standard range


Avatar

Samuel_ABRP

Hey, thanks for feedback. If possible provide more values so we can make sure the 2% error is linear across the whole soc range. Lets say every 10% should be sufficient, so on your next trip (when you have someone travelling with you) please note down the values for
Car --- ABRP
10% - ?
20% - ?
30% - ?
...


Avatar

Samuel_ABRP

Merged with: MG M5 SoC incorrect

D

Strange

Current SoC of the vehicle is 97% and abrp via obd2 shows 92%


D

Strange

Current SoC appears correct at 100% but then falls out of line massively. Vehicle currently showing 97% but ABRP via OBD is showing 92%. MG5 LR


Avatar

Samuel_ABRP

The easiest way to get all the correct values would be a fast charging session from 10(or lower)-80%, values above exist already, but the more the better. So if anyone will do a fast charging session soon please monitor the values and not down the ABRP shown values and the car shown values for the lower SoC regions, so we can find the right multiplication factor.


Avatar

Samuel_ABRP

Next try, just pushed the fixed pids again. This time they should stay active. Please try it again now.


M

Mark Coundley

Just had a quick test in the MG5 SR and all looks good.
Hope to update on findings over the coming weeks
Thanks for the hard work.


Avatar

Samuel_ABRP

Awesome. Thanks for feedback. SoC might be still a tiny bit off as we only have the BMS soc yet. Let me know if it is way off at some point.


Avatar

Biffo

Connection good but think it’s using the SR capacity rather than LR?

Car shows : 71% of 57 kWh = 40.47 kWh
ABRP shows : 77% of 52.5 kWh = 40.43 kWh


Avatar

Samuel_ABRP

Ok this is interesting, so the SoC needs a multiply factor on SR but not on LR. Have to add a seperate file then for LR and SR. Will deal with that this evening. You can already use it still for building the consumption model, as for the consumption model only current and voltage is relevant.


Avatar

Samuel_ABRP

BTW could that mean that SR and LR both have the same battery but are restricted by BMS?


Avatar

Biffo

Should be physically different packs as LR rides 0.9cm higher but has 0.1cm less ground clearance - suggests pack is 1cm deeper on the LR model.


Avatar

Biffo

There probably still is a multiplication factor needed for both models - but a different one each.

SR : 48.8kWh usable / 52.5kWh actual
LR : 57kWh usable / 61.1kWh actual


Avatar

Jan Koubik

On LR 61KW battery is SoC litle bit different. I will try pull few more data from BMS with multiple SoC.


Avatar

Samuel_ABRP

I just pushed the updated soc lists. So now we have a short range version with the multiplaction factor, and a long range version without the multiplication factor. Please check if everything works as expected. Apart from soc all values should be correct. As for SoC please provide some data points where you compare abrp reported soc vs car reported soc (during a charge for example), so we can work out the right multiplication factor.


Avatar

Biffo

Did a quick charge tonight - looks to be a 2 to 3% difference around 80%

ABRP vs Car
81% - 79%
83% - 80%
84% - 81%
85% - 82%
86% - 83%
87% - 84%

Shortly after ABRP incrementing charge, the car would increment so felt like around a 2.5% offset.

It’s 2oC here and I forgot to initially switch battery heater on so got 22kWh rather than usual 42kWh on this charger.

So, multiplier at this range feels roughly 1.03


Avatar

Samuel_ABRP

Thats good information. Please also check in the lower range later on, so we know it is linear.


  • Avatar
Avatar

Biffo

I’ve got 150 mile drive this Saturday so should get lower range values then 👍


  • Avatar
Avatar

David Patterson

So did 150 mile trip yesterday, reading on ABRP was generally 2% higher than car was reporting. But was stable all journey, no jumping readings.
Evening trip I assume after new settings has been pushed it's now showing roughly 2% LOWER than what the car is showing. 5LR


Avatar

Biffo

I started at 100% on car SOC display, ABRP showed 95%.

At one point, the app crashed and kept crashing until I unplugged iPhone - app also lost OBD connectivity which might have caused the crash or happened because of it. Unplugging dongle and reinserting resolved.


Avatar

Samuel_ABRP

That is most likely a separate issue and not related to MG5 OBD values. We just fixed some crashes today, latest version is 4.2.0 (881) which should be available after a restart of the app. If you still see crashes please report them in a separate issue in the bug section.


Avatar

Biffo

Today, 32% was roughly the point where both car’s SOC and ABRP app displayed the same the same reading.


Avatar

Biffo

Some numbers from charging today

ABRP CAR
38% - 39%
40% - 40%
44% - 45%
45% - 46%
48% - 50%
50% - 51%
53% - 55%
55% - 57%
58% - 60%
60% - 62%
62% - 65%
65% - 67%
67% - 70%
70% - 72%
72% - 75%
75% - 78%
76% - 80%
80% - 83%

Multiplier feels something along the lines of 1.035. So, Car displayed SOC = ABRP SOC * 1.035 (although this may not be linear!)


  • D
Avatar

Samuel_ABRP

perfect, i'll use these to adjust the soc. Thanks


  • Avatar
Avatar

Samuel_ABRP

I just adjusted the SoC with the data Biffo provided for the LR version of the car. Let me know if the SoC is more close to what the car reports now. If it is like 1% off a maximum, it should be fine, could be also caused by rounding. Le me know if it is stable throughout the whole SoC range.

Still need values for the SR version.


  • D
Avatar

Biffo

In the mid 80% down to high 70% the ABRP SOC either matches the car or is 1% lower - so at this limited range check, looks close enough. Thanks 👍


Avatar

Biffo

Do you only support a multiplier or do you support a linear, power or polynomial function to calculate the SOc?

Currently logging lots of data from OBD app Car Scanner for SOC along with the value car display is showing and getting Excel to generate the equation for the graph.


Avatar

Samuel_ABRP

Right now i just use a multiplier, but if you have something more accurate let me know.


Avatar

Biffo

This graph is still a work in progress - so the formulas are still changing as I get more data but able to log the OBD SOC to 1 decimal place - need to collect sub 40% and over 70% values in the next few days.


Avatar

Biffo

Out of curiosity - since ABRP displays SOC as whole numbers only with no decimal, whereas the OBD (which I have) reports one decimal place - how do you round the number displayed? Half round down? Half round up? Floor? Ceiling? And do you use the 'raw' number including decimals to calculate the display number before rounding to a whole number?


Avatar

Biffo

Okay - I've mapped a few hundred data transition points from 6% on the car display to 100% - I got Excel to plot these and work out both a linear and polynomial formula - I think the polynomial is a slightly better approximation but not not by much. Would have been more accurate if I'd had two decimal places.

x = OBD reading via CarScanner
y = Car's SOC display

Polynomial : y = -0.0039x2 + 1.0929x - 0.0331
Linear : y = 1.0889x - 0.0323


Avatar

Biffo

Just to bump this thread - any indication when an updated OBD SOC -> Car display SOC mapping using either the Polynomial or Linear function above can be implemented?


Avatar

Samuel_ABRP

Just added it to our Todo list so we do not forget.


  • Avatar
Avatar

alan Stone

I used ABRP today with torque pro. Not used it for a week. There was a notification that there had been an update. The current SOC was correct at 95% but the calculated end was 194%. This remained out throughout the 35 mile journey with both figures ending up at the correct amount.
I have changed nothing.


Avatar

Samuel_ABRP

Merged with: Calculated finish SOC is really wrong

Avatar

Samuel_ABRP

Hi Alan, as far as i remember you use the MG5 LR, right? That one had a bug with live data which messed up the consumptiopn (positive current was reported as negative current for example) which results in a negative estimation which increases the soc instead of decreasing it. We fixed the OBD commands for MG5 and i will upload them this evening, so please try again tomorrow and reset your consumption for that car before the next drive.


  • D
Avatar

alan Stone

Tried today on 3 short trips. All good. SOC is a little out higher up, around 3% too low. But reporting correct SOC at 39%. Predicted end SOC is also looking to be correct.
Does this work in the normal version or just in the plasma emba version?


Avatar

Samuel_ABRP

This is working on public release as well.


Avatar

Samuel_ABRP

Hi Everyone, i just improved the OBD commands again, howver it's still experimental until anyone confirms they show the real values. Can anyone please try it again and let me know if the values look correct?


  • D
Avatar

Biffo

Just tried a few minutes ago on my MG5LR and after removing the previous OBD connection details (as it wasn't connecting correctly), I tried again and got a failure


Avatar

Samuel_ABRP

Sorry, my bad, looks like they were reset again to old value. I will publish the new obd pid list again this evening and post again here.


Avatar

Samuel_ABRP

We just disabled MG5 OBD commands for now and reset the consumption of the connected models as they seemed to be way off due to the wrong data. We will let you know, if we have anything new to report here.


  • D
D

David Patterson

Hope so as just paid for subscription to allow Android Auto, fingers crossed you get it back up and running again quickly.


Avatar

Samuel_ABRP

There is nothing we can do from our side unfortunately, as we do not own such a car. If you want to help out check this post:
forum.abetterrouteplanner.com/topic/2514-new-car-mg-mg5-ev


  • D
Avatar

Biffo

Looks like there is something happening where the OBD connection is initially working, but then something goes wrong after a few seconds and defaults to 37% and inaccurate battery temperature - occasionally the correct values appear again but then it drops back to 37%, etc.


  • D
D

David Patterson

I have this, it seems that the my Live Data reference consumption on the MG5 is -0.52 so I guess it thinks I just gain energy as we travel ?


  • Avatar
Avatar

alan Stone

That's what I'm seeing too. Was fine before the last update


Avatar

Samuel_ABRP

Merged with: MG5 LR - Understating %'age

D

David Patterson

The battery %'age is being understated it seems as though a calculation is being based on capacity against 61.1kWh rather than the usable 57kWh. So at 96% reading on the dials, it's reading 90% on the app.


M

Mark Coundley

I am finding that when connected direct to ODB dongle SOC is reporting two values one which is correct and the same as reported by the car 83% and another value of 37%. This is confusing the route planning.


Avatar

Biffo

I'm seeing the same issue too - was concerned it was my car or dongle - but it's stable when checking on Car Scanner so looks like a ABRP issues. Also noticed the battery temperature is wrong when showing the 37% value too


Avatar

Samuel_ABRP

Hi, mg5 support is not really properly working yet, we are on it.


Avatar

Bo_ABRP

Could you replicate the issue on ABRP to be able to send us a link to the plan?


Avatar

alan Stone

It does it on any plan. Screen shot attached. Not using live data


Avatar

Biffo

This now looks to be working! The SOC is slightly wrong (using 61.1kWh rather than 57kWh available perhaps?) but connection to car worked. Time to buy a CarPlay subscription I think 👍


Avatar

Samuel_ABRP

Hi, please send debug data so we can analyze how to improve soc and so on. When you are connected to OBD and get data go to settings, scroll to bottom and click on Support & feedback, then click on contact/give feedback and then click yes to attach logs to feedback and then open with your favorite mail client and send data to samuel@iternio.com.


Avatar

Samuel_ABRP

The MG5 LR OBD profile is completeley untested, actually it did not work until now for most people. Do you already use the new beta?

If you want to help us getting it right you can do the following:
When connected to the car and receiving data first make a screenshot of the data you got, click on the settings icon behind the car and make a screenshot of the overview of the data. Then mark the values that are wrong (or mention it in the text). To check if voltage and current are correct the easiest way is to do this during a charging session with fixed current, for example while charging on type2 11kW (or whatever you can find and works and is stable).

Then while still being connected and getting data click on settings, scroll down to support & feedback and then use the first button which is either "give feedback" or "contact support" and click yes in the next dialog, to send us the debug data. Then it will ask you to share the text, use your favorite mail application and send the data to samuel@iternio.com

This will send us the sent OBD commands and received data, we can then check if we can improve the OBD commands to work better.


  • Avatar
Avatar

Craig and Lucy

ODB Support for the MG5 would be phenomenal. Hope this happens soon! 😁


  • Avatar
Avatar

Samuel_ABRP

We just noticed on the MG ZS EV, that the Long Range 2022 version does not work with the same PIDs as the normal range version. So we have to wait until someone provides the OBD commands for the LR version. If anyone knows where to get them let us know.


  • Avatar
Avatar

stéphane harié

hello
i have the MG ZS EV 2022 Long range and the OBD2 vgate icar pro ble 4.0 that failed on step 3....
I just run the nRFconnect and please find here after the result of Unknown Characteristic:

1) Inside Unknow Service 0x18F0
2) Inside Unknow Characteristic 0x2AF0
=> INDICATE, NOTIFY
3) Inside Unknow Characteristic 0x2AF1
=> WRITE, WRITE NO RESPONSE

But there is another Unknown Service with an Unknown Characteristic with a long UUID that include all properties... ??
Hope the opne i give you is the good one!
Thanks for your help,

Take care of you,
Stéphane


Avatar

Samuel_ABRP

Hi, it is not the dongle that is at fault, but the OBD commands. The LR version seems to use different commands than the standard range version.


Avatar

Jan Koubik

Hi, I do have MG5 long range and it give me same error with this adapter


Avatar

Samuel_ABRP

Hi,

i adjusted something on the PID list, could you please try again? If it does not work again, send in debug data when it asks to send data when it fails and let me know the time.


Avatar

Samuel_ABRP

Just added the MG5. Please try it and let me know if it works.


Avatar

Samuel_ABRP

Status changed to: In progress

Avatar

Biffo


Avatar

Biffo

I can now see the option to link to the car, my Adapter is found but initialisation failed - I tried both MG5 and MG5LR


Avatar

Samuel_ABRP

Did you turn on the car or was it off? Some data is not returned when car is off. We receive some non EV specific data, but the EV specific data is not returned. Please try again when car is turned on. Maybe try another 1 or two times, as sometimes it could be a bit shaky what OBD returns.


Avatar

Biffo

Cheers - car was turned on but I’ll give it another few tries 👍


Avatar

Biffo

On any other ODB app, I’m not seeing a lot of information so will check firmware of dongle and ask on MGEV forum for others to check different adapters/cars 👍


  • Avatar
Avatar

Biffo

Having no success so trying with NEXAS NexLink Bluetooth 5.0 OBDII Scanner, which identifies as NEXAS21110559. With this, on iOS and using Car Scanner, I can see the SOH and SOC values for the battery. Ticket raised to add support for this dongle.