• We are having a problem with new Hotmail members being unable to receive activation emails. Please avoid using a Hotmail email address. Thanks.

PID's for Torque Pro app

Thanks for the work you have done on this as well much appreciated. I have posted in another thread (Torque Pro) and have found that if you want to display the same temp as the car does then you need to select "22bb05" row 25 in your PID list. if I use Ambient Temperature (22e01b) row 29 it displays no value. I have also created a "Cell Variance" virtual PID as @Vince31 did. For anyone who is interested here is the Equation I used. Note my "Long Names" are slightly different to yours.

View attachment 3305

Torque Dashboard

View attachment 3306
If you want to calculate the cell imbalance for the whole battery pack then you have to do it a different way (according to the way MG do it).
First you need to calculate the delta voltage for each CMU pack 1 to 9, this can be done as follows for CMU1, then just do the same for the rest up to CMU9:
CMU1 Delta, 22b001, equation INT16(C:D)/2000 - INT16(A:B)/2000, header 781
CMU2 is 22b009, CMU3 is 011, CMU4 is 019,CMU5 is 021, CMU6 is 029, CMU7 is 0a3, CMU8 is 0ab, CMU9 is 0b3.
Then you need to create a new virtual PID to add up all of these and then divide by 9 to give the average delta for the pack. MG say this is the value used to determine the pack imbalance, if its over 0.100 v then the light will come on the dash telling you to slow charge. Mine is 0.020 v.
As you will see its a different value to the simple Cell Delta calculation, which means nothing really.

The battery Charge/Discharge rate is also a simple calculation using Battery Volts x Amps as follows:
(VAL{MG_HV_Battery_Volts}VAL{MG_HV_Current}/1000)-1
Substitute your own PIDs into the equation above. the minus 1 at the end converts the display so that it correctly shows minus values when discharging and positive values when charging. Works great when sat on a Rapid charger.
 
Many thanks for the info much appreciated. Certainly see the logic of getting the cell variance using values form all the packs, be intersting to see what the difference is when all packs are used. (y)
 
If you want to calculate the cell imbalance for the whole battery pack then you have to do it a different way (according to the way MG do it).
First you need to calculate the delta voltage for each CMU pack 1 to 9, this can be done as follows for CMU1, then just do the same for the rest up to CMU9:
CMU1 Delta, 22b001, equation INT16(C:D)/2000 - INT16(A:B)/2000, header 781
CMU2 is 22b009, CMU3 is 011, CMU4 is 019,CMU5 is 021, CMU6 is 029, CMU7 is 0a3, CMU8 is 0ab, CMU9 is 0b3.
Then you need to create a new virtual PID to add up all of these and then divide by 9 to give the average delta for the pack. MG say this is the value used to determine the pack imbalance, if its over 0.100 v then the light will come on the dash telling you to slow charge. Mine is 0.020 v.
As you will see its a different value to the simple Cell Delta calculation, which means nothing really.

The battery Charge/Discharge rate is also a simple calculation using Battery Volts x Amps as follows:
(VAL{MG_HV_Battery_Volts}VAL{MG_HV_Current}/1000)-1
Substitute your own PIDs into the equation above. the minus 1 at the end converts the display so that it correctly shows minus values when discharging and positive values when charging. Works great when sat on a Rapid charger.
Hi again. have tried to calculate the charge/discharge rate, but I get a Zero value for both PID's I have used for HV_Current. I have tried:

22b043 min val -200.0 max val 200.0 unit A Equation (INT16(A:B) - 40000) * 0.25 / 10 Header 781
and
22b043 min val -200.0 max val 200.0 unit A Equation ((((A*256)+B)0.025)-1000)(SQRT(B)/SQRT(B)) Header 781
Do you have an alternative PID I can use or a fix for the above equations? Thanks in advance for help.
 
I have managed to get the HV Battery Current PID working in Torque. I checked the value with the Thai app and its the same.

This is the PID I have added:

"Name" MG HV Battery Current
"ShortName" Current
"ModeAndPID" 22b043
"Equation" (INT16(A:B) - 40000) * 0.25 / 10
"Min Value" -200
"Max Value" 200 "Units" A
"Header" 781
"startDiagnostic"
"stopDiagnostic"
"Scale" 1
 
Yes that is the correct PID and equation for current.
You now need to create a new PID:
"Name" MG Charge_Discharge Rate
"ShortName" Charge
"ModeAndPID" (Leave this blank)
"Equation" (VAL{MG HV Battery Volts} * VAL{MG HV Battery Current}/1000) * -1
"Min Value" -80
"Max Value" 80
"Units" Kw
"Header" (Leave this blank)
"startDiagnostic"
"stopDiagnostic"
"Scale" 1

If you create a new gauge (I use the Half Dial (Needle)) and map it to this new PID then it should show you the Charge rate. This type of PID is called a virtual PID because it does not refer to a raw ECU command address, but uses data from one or more other PIDs to give a calculated result based on your equation.
 
Last edited:
Hi @Vince31
In-fact the file you've used is a historical one that I received part-way through development from the Thai ZS EV user group. My PID list is called "MG ZS EV.csv" (as you can see in the instructions) and it does not have any leading dots. It also already contains a Virtual PID called "MG BMS Voltage Delta" which should give you the info you are looking for :)
 
Hi @Vince31
In-fact the file you've used is a historical one that I received part-way through development from the Thai ZS EV user group. My PID list is called "MG ZS EV.csv" (as you can see in the instructions) and it does not have any leading dots. It also already contains a Virtual PID called "MG BMS Voltage Delta" which should give you the info you are looking for :)
Can you. Tell me where to put the PID please as all I can see on tourqe pro after opening hidden files and encles screen shot any help would be great please
 

Attachments

  • Screenshot_20210527_172325_com.huawei.hidisk.jpg
    Screenshot_20210527_172325_com.huawei.hidisk.jpg
    75.7 KB · Views: 245
Can you. Tell me where to put the PID please as all I can see on tourqe pro after opening hidden files and encles screen shot any help would be great please
Try creating a new folder in there called extendedpids, and then paste the PIDs in there. In mine the folder already exists.
 
Yes that is the correct PID and equation for current.
You now need to create a new PID:
"Name" MG Charge_Discharge Rate
"ShortName" Charge
"ModeAndPID" (Leave this blank)
"Equation" (VAL{MG HV Battery Volts}VAL{MG HV Battery Current}/1000)-1
"Min Value" -80
"Max Value" 80
"Units" Kw
"Header" (Leave this blank)
"startDiagnostic"
"stopDiagnostic"
"Scale" 1

If you create a new gauge (I use the Half Dial (Needle)) and map it to this new PID then it should show you the Charge rate. This type of PID is called a virtual PID because it does not refer to a raw ECU command address, but uses data from one or more other PIDs to give a calculated result based on your equation.
i have downloaded the pids on to tourqe pro the full list earlier do i also need to addon as well the two extra pids the one you did and the one john in the post before you did..
thank you for your help on this really appreciate as unsure so better to ask.
 
I'm in UK (Swindon) and use the UK specific PIDs available from the MGZSEV Owners Facebook group. I think you may be using different PIDs.
Have not done yet as know they said Australian mg so though ask as that's why I asked so will see if I can find uk pid S then and the two pids that you and jhon g did those two have to be added as well thanks again
 
If you want to calculate the cell imbalance for the whole battery pack then you have to do it a different way (according to the way MG do it).
First you need to calculate the delta voltage for each CMU pack 1 to 9, this can be done as follows for CMU1, then just do the same for the rest up to CMU9:
CMU1 Delta, 22b001, equation INT16(C:D)/2000 - INT16(A:B)/2000, header 781
CMU2 is 22b009, CMU3 is 011, CMU4 is 019,CMU5 is 021, CMU6 is 029, CMU7 is 0a3, CMU8 is 0ab, CMU9 is 0b3.
Then you need to create a new virtual PID to add up all of these and then divide by 9 to give the average delta for the pack. MG say this is the value used to determine the pack imbalance, if its over 0.100 v then the light will come on the dash telling you to slow charge. Mine is 0.020 v.
As you will see its a different value to the simple Cell Delta calculation, which means nothing really.

The battery Charge/Discharge rate is also a simple calculation using Battery Volts x Amps as follows:
(VAL{MG_HV_Battery_Volts}VAL{MG_HV_Current}/1000)-1
Substitute your own PIDs into the equation above. the minus 1 at the end converts the display so that it correctly shows minus values when discharging and positive values when charging. Works great when sat on a Rapid charger.
The battery charge rate PID calculation in your example appears to not be correct. This is what I got working (VAL{MG_HV_Battery_Volts} * VAL{MG_HV_Current}/1000)-1 the multiply symbol "" needs to be added between the 2 values and and after "1000)"

I have also added a new Cell Inbalance guage using your example that sums each pack and then is divided by 9 which shows an inbalance of 6.7mV with SoC around 16%.

Charging Value kW.JPG
 
Sorry typo in the equation: (VAL{MG_HV_Battery_Volts} * VAL{MG_HV_Current}/1000) * -1 As you can see added the "*" symbol
Yes, The PID equation I use in Torque Pro has the multiplication (x2) as you show, looks like I missed them out when typing it again for you, sorry
 
Can I find somewhere the pod files you are referring to with the new calculation or shall we follow the post and do it manually ourselves?
 
Thanks. Does have anyone had UI files for torque to tablet landscape? The UI for with the gauge seem to be only for phone portrait
 
Hello EV friends!

Downloaded pids from github.com/peternixon and I can't find the battery power sensor, tried MG Charging Rate (kW) but the readings were not very accurate.

Edit: deleted the *-1 in the pid equation so that it can show Power = Volts x Amps
 
Last edited:
Support us by becoming a Premium Member

Latest MG EVs video

New EVs from MG: MG S9 & MG9 plus hot topics from the forums
Subscribe to our YouTube channel
Back
Top Bottom