Setting up Torque to show BMS data

Kia Soul EV Forum

Help Support Kia Soul EV Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Thanks, I will try that in an hour or so :D

Did you manage to look into the PID for the cooling fan?
 
For me it still showed valid results, but for me the temperature was above zero.

Here are some more codes you can add:
Code:
000_Battery Inlet Temperature,Batt InletT,2105,Signed(J),0,120,C,7E4
000_Battery Min Temperature,Batt MinT,2105,Signed(K),0,120,C,7E4
000_Battery Max Temperature,Batt MaxT,2105,Signed(L),0,120,C,7E4
000_Drive Motor Speed1,Rpm1,2101,((bb<8)+bc),0,9000,rpm,7E4
000_Drive Motor Speed2,Rpm2,2101,((bd<8)+be),0,9000,rpm,7E4

Looks like Rpm1 and Rpm2 are always showing the same value.
 
Might be a small error here, one too many parenthesis?

000_Battery Current,Batt Current,2101,((Signed((K)*256)+L)/10,-100,100,Ah,7E4
 
Drive motor speed didn't seem to work for me, and batt current still does not display correctly - no real values displaying at all with the new equation. Temperature values are now displaying correctly, it was interesting to see how the temperature went from -3C to a stable 16-17C across the pack (except #8, which remained at 11-12C) after some driving!

I don't know if there's much more information to get from the BMS?

Is it possible to construct a custom PID to show SOH based on the information in the battery ageing model thread?
http://www.mykiasoulev.com/forum/viewtopic.php?p=3121#p3121
 
2soul said:
...(negative) Temperature values are now displaying correctly, ...
Good. It is currently +9°C here, but the weather forecast is cold for the weekend so I may get to test them myself.

As for Battery Current. I am not sure how to fix this one. We will have to try various combinations.
Presumably it will add this value either to Cumulative Discharge Current or Cumulative Charge Current depending on the direction.
Should help us to know the scale and sign of the value.
A possible corrected formula is (Signed((K*256)+L))/10
 
Where do people put the phone, when they use Torque Pro when driving?
Apparently there is not a good place to put the phone and still easy to see.
Actually, the phone in landscape in front of the Instrument Cluster would be the best place, but then it will cover the warning lights at the bottom.
People using holders?
 
JejuSoul said:
As for Battery Current. I am not sure how to fix this one. We will have to try various combinations.
Presumably it will add this value either to Cumulative Discharge Current or Cumulative Charge Current depending on the direction.
Should help us to know the scale and sign of the value.
A possible corrected formula is (Signed((K*256)+L))/10
Not working :)

Original equation that worked for Batt Curr (it displayed curr draw but not charge/regen)
000_Battery Current,Batt Current,2101,((k<8)+l)/10,0,100,Ah,7E4

Would this work?
000_Battery Current,Batt Current,2101,(Signed(K<8)+L)/10,0,100,Ah,7E4
 
ZuinigeRijder said:
Where do people put the phone, when they use Torque Pro when driving?
I don't use Torque when driving unless I am the passenger.
But there is useful page here http://www.electricvehiclewiki.com/Leaf_Spy_Pro. Follow the Optional Phone Holder link.

This morning we had temperatures of -6°C outside; the car battery was down to -3°C. I can now see that the temperature sensors are working below zero.
 
I am trying to understand how these custom PIDs are made, but I'm clearly lacking some knowledge and understanding.

I.e. the SOC BMS:
Name,ShortName,ModeAndPID,Equation,Min Value,Max Value,Units,Header
000_State of Charge BMS,SOC BMS,2101,e/2,0,100,%,7E4

I see in the spreadsheets that SOC BMS hex value is in frame 21 position 1 of the reply from the 02 21 01 query

However, how does that translate to "e" in the equation?


Is there any way we could make PIDs for the TPMS?
 
2soul said:
I see in the spreadsheets that SOC BMS hex value is in frame 21 position 1 of the reply from the 02 21 01 query
Finding the first value to use for Torque was trial and error.
In theory the first byte returned should be A, the next B and so on.
The data returned from querying ECU 7E4 with 2101 is
Code:
10	3D	61	01	FF	FF	FF	FF
21	6E	23	28	23	28	03	00
22	06	0E	2C	08	07	08	07
23	07	07	07	00	08	BD	01
24	BC	13	00	00	8E	00	01
25	9C	94	00	01	A2	2C	00
26	00	97	D2	00	00	95	13
27	00	4A	2B	54	45	01	6A
28	00	00	00	00	03	E8	00
The SOC BMS hex value is the eighth byte - value 6E. I tried H first, it didn't work. So I tried different letters until it did.
If someone can explain why the first 3 bytes aren't counted, it may help in future.
2soul said:
Is there any way we could make PIDs for the TPMS?
Yes, to get the Tire Pressures you will have to query ECU 7D6 with 2106
There are 4 values here. You'll need to look in the spreadsheet for the placing and the formula.
 
JejuSoul said:
2soul said:
I see in the spreadsheets that SOC BMS hex value is in frame 21 position 1 of the reply from the 02 21 01 query
Finding the first value to use for Torque was trial and error.
In theory the first byte returned should be A, the next B and so on.
The data returned from querying ECU 7E4 with 2101 is
Code:
10	3D	61	01	FF	FF	FF	FF
21	6E	23	28	23	28	03	00
22	06	0E	2C	08	07	08	07
23	07	07	07	00	08	BD	01
24	BC	13	00	00	8E	00	01
25	9C	94	00	01	A2	2C	00
26	00	97	D2	00	00	95	13
27	00	4A	2B	54	45	01	6A
28	00	00	00	00	03	E8	00
The SOC BMS hex value is the eighth byte - value 6E. I tried H first, it didn't work. So I tried different letters until it did.
If someone can explain why the first 3 bytes aren't counted, it may help in future.
2soul said:
Is there any way we could make PIDs for the TPMS?
Yes, to get the Tire Pressures you will have to query ECU 7D6 with 2106
There are 4 values here. You'll need to look in the spreadsheet for the placing and the formula.

When I did capture the OBDII response with a terminal window, this was shown:
Code:
5 > at sh 7e4
at sh 7e4OK
6 > 2101
210103D 0: 61 01 FF FF FF FF 1: 6E 23 28 23 28 03 00 2: 06 0E 2C 08 07 08 07 3: 07 07 07 00 08 BD 2B 4: BC 58 00 00 8E 00 01 5: 9C 94 00 01 A2 2C 00 6: 00 97 D2 00 00 95 13 7: 00 4A 2A DC 45 01 6B 8: 00 00 00 00 03 E8 00

So the first part of the response is already 21 01. I even believe 7e4 is returned, but can be switched off not to be shown by the terminal program, that is why it starts with E for the interesting data.
 
000_Battery Power,Energy draw,2101,(((k<8)+l)/10)*(((m<8)+n)/10)/1000,0,100,kW

Works for displaying the total energy draw. As it is based on the battery current equation, it is not good for negative values until that equation is worked out.
 
Hi,

I will try to explain how the lettering in equations works with Torque:

But before, when playing in terminal, use the command AT H1 to show the header...

Here is a short real data sniffing using Torque

Code:
"16/01/2016 13:42:11",7E4 02 21 01 00 00 00 00 00 
"16/01/2016 13:42:11",7EC 10 3D 61 01 FF FF FF FF 
"16/01/2016 13:42:11",7E4 30 00 00 00 00 00 00 00 
"16/01/2016 13:42:11",7EC 21 92 19 1F 23 28 03 00 
"16/01/2016 13:42:11",7EC 22 00 0E CB 04 03 04 04 
"16/01/2016 13:42:11",7EC 23 03 03 03 00 05 C5 2A 
"16/01/2016 13:42:11",7EC 24 C4 09 00 00 82 00 01 
"16/01/2016 13:42:11",7EC 25 18 57 00 01 1A 80 00 
"16/01/2016 13:42:11",7EC 26 00 68 2C 00 00 65 1E 
"16/01/2016 13:42:11",7EC 27 00 2A A6 7B 45 01 82 
"16/01/2016 13:42:11",7EC 28 00 00 00 00 03 E8 00

The first line is the request . 7E4 is the ECU, 02 is the length of the request , 2101 is the request

Second line is the first answer
7EC (" 7E4 + 8) the answer comes from ECU 7E4
second info is a kind of sequence number we will get 10 , 21 22 23 ...
10 is the first answer
3D is the number of bytes in the answer
61 01 the answer is for 21 01 (21+40 01)
so in this line, there are only 4 data bytes (the 4 FF end of frame), their names will be A B C D

we can forget the 3rd line: it is a CCF continuation control frame.

4th line and following:
after the sequence number, there are 7 data bytes , and the letters are sequentially given
Code:
21 E F G H I J K
22 L M N O P Q R
....

after Z, we continue with AA AB ....
 
priusfan said:
I will try to explain how the lettering in equations works with Torque:
Thanks, useful info. One more question. How do you get Terminal mode in Torque? Is this a plugin?

Here are the TPMS codes. Updated to fix a typo - 29/1/2016
Code:
, TPMS data for Kia Soul EV using Torque Pro
, You need to drive more tham 100m for the sensors to send the data
, To see pressures in bars change the unit settings in Torque 
Name,ShortName,ModeAndPID,Equation,Min Value,Max Value,Units,Header
001_TPMS_ID Front Left,TPMS_ID_FL,2106,(a<24)+(b<16)+(c<8)+d,0,100,,7D6
001_TPMS_ID Front Right,TPMS_ID_FR,2106,(i<24)+(j<16)+(k<8)+l,0,100,,7D6
001_TPMS_ID Back Left,TPMS_ID_BL,2106,(q<24)+(r<16)+(s<8)+t,0,100,,7D6
001_TPMS_ID Back Right,TPMS_ID_BR,2106,(y<24)+(z<16)+(aa<8)+ab,0,100,,7D6
001_Tire Pressure Front Left,Tire Pre_FL,2106,e/4,0,120,psi,7D6
001_Tire Pressure Front Right,Tire Pre_FR,2106,m/4,0,120,psi,7D6
001_Tire Pressure Back Left,Tire Pre_BL,2106,u/4,0,120,psi,7D6
001_Tire Pressure Back Right,Tire Pre_BR,2106,ac/4,0,120,psi,7D6
001_Tire Temperature Front Left,Tire Temp_FL,2106,f-55,0,120,C,7D6
001_Tire Temperature Front Right,Tire Temp_FR,2106,n-55,0,120,C,7D6
001_Tire Temperature Back Left,Tire Temp_BL,2106,v-55,0,120,C,7D6
001_Tire Temperature Back Right,Tire Temp_BR,2106,ad-55,0,120,C,7D6
 
Hi
Sorry, I was not clear enough about terminal mode...
To create the previous capture, I used a Y on the diagplug.
on one branch a BT interface used for Torque,
on the other branch an OBDLINK USB interface connected to a Windows laptop running Realterm to collect the capture...

I am surprised by the equation for TPMS Temps: usually, the offset is -40 or -50 (anyway with japanese cars)...
 
JejuSoul said:
Updated the code here to use Capital Letters in the signed function!

Thanks for the tips.
The (possibly) corrected code using the Signed operator.
I have not tested any of these. Can someone please post if they are working.
Code:
000_Battery Current,Batt Current,2101,((Signed((K)*256)+L)/10,-100,100,Ah,7E4

There was something wrong with the brackets, find the one and only difference :lol:. This is working, so also negative values are shown:
Code:
000_Battery Current,Batt Current,2101,((Signed(K)*256)+L)/10,-100,100,Ah,7E4
 
2soul said:
000_Battery Power,Energy draw,2101,(((k<8)+l)/10)*(((m<8)+n)/10)/1000,0,100,kW

Works for displaying the total energy draw. As it is based on the battery current equation, it is not good for negative values until that equation is worked out.

This must be:
Code:
000_Battery Energy,Energy,2101,(((Signed(K)*256)+L)/10*((m<8)+n)/10)/1000,-100,100,kW,7E4

EDIT: There is something wrong with the formula above, because it shows 0 :twisted:
 
Here are some screenshots of Torque Pro with the Kia Soul EV information:

torque1.jpg


I did change the pressure from psi to bar, because that is more common here.

Code:
001_Tire Pressure Front Left,Tire Pre_FL,2106,e/58.0152,0,4,bar,7D6
001_Tire Pressure Front Right,Tire Pre_FR,2106,m/58.0152,0,4,bar,7D6
001_Tire Pressure Back Left,Tire Pre_BL,2106,u/58.0152,0,4,bar,7D6
001_Tire Pressure Back Right,Tire Pre_BR,2106,ac/58.0152,0,4,bar,7D6

torque2.jpg


torque3.jpg


Energy formula does not work yet :evil:

Got it to work with these codes:

Code:
000_BatteryEnergy,Energy,2101,val{000_BatteryCurrent}*val{000_BatteryVoltage}/1000,-100,100,kW,7E4
000_BatteryCurrent,Batt Current,2101,((Signed(K)*256)+L)/10,-100,100,A,7E4
000_BatteryVoltage,Batt Volts,2101,((m<8)+n)/10,0,100,V,7E4
 
Nice work! Will add the TPMS info to my dash straight away ;)

How about this, using the VAL parameter?
Code:
000_Battery Power,Energy,2101,VAL("000_Battery Current")*VAL("000_Battery Power")/1000,-100,100,kW,7E4
 
JejuSoul said:
priusfan said:
I will try to explain how the lettering in equations works with Torque:
Thanks, useful info. One more question. How do you get Terminal mode in Torque? Is this a plugin?

Here are the TPMS codes. You need to drive for about 100m before the readings will display.
Code:
, TPMS data for Kia Soul EV using Torque Pro
001_Tire Temperature Back Left,Tire Temp_BL,2106,v,0-55,120,C,7D6

There was a typo for this temperature. Must be:
Code:
001_Tire Temperature Back Left,Tire Temp_BL,2106,v-55,0,120,C,7D6

Maybe it is good to edit the start post and add the correct and new formula's there, so people do not have to find the correct codes in the posts.
 
Back
Top