Extracting useful data from your OBDII port

Mitsubishi Outlander PHEV Forum

Help Support Mitsubishi Outlander PHEV Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

anko

Well-known member
Joined
Dec 1, 2014
Messages
3,405
Location
Netherlands, Utrecht area
To extract some info from your OBDII port (for example the battery health expressed in Ah), please do the following:

Step 1: Buy an OBDII WiFi dongle and hook it up to your car (I believe you have one already, gwatpe)
Step 2: Connect your laptop to the WiFi network created by the dongle
Step 3: Open a telnet session from your laptop to the dongle. On a MAC for instance you type the following command in a terminal session (all OBDII dongles I worked with had this IP address and port number):

telnet 192.168.0.10 35000
It may take a while, before the connection is established, but finally your screen should show:

Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.

Step 4: Type the stuff in underlined font (<enter> is the enter key). Stuff in italic font are responses you would expect:

ATZ<enter>
ATZ


ELM327 v2.1

>
ATSP6<enter>
ATSP6
OK

>
ATH1<enter>
ATH1
OK

>
ATFCSH761<enter>
ATSH761
OK

>
ATFCSD300000<enter>
ATFCSD300000
OK

>
ATFCSM1<enter>
ATFCSM1
OK

>
ATSH761<enter>
ATSH761
OK

>

So far, you have:

- initialised the OBDII adapter (remember talking to modems? :mrgreen: )
- selected canbus protocol # 6 (ISO 15765-4 CAN 11 bit ID, 500 kbaud)
- enabled display of headers in responses
- enabled flow control for communication with device with address number 761 (which happens to be the "Hey, I want to talk to you" address for BMU ECU)
- defined the flow control string (300000)
- and mode (1)
- and told the dongle that the next non-AT command is targeted to device with address number 761

Now enter the mode (12) and pid (01):

2101<enter>
2101
762 10 37 61 01 82 83 0F 8B
762 21 24 0F 88 03 0C 6E 52
762 22 03 4D 1C 01 99 00 00
762 23 00 00 00 01 00 01 30
762 24 0F 0F 01 54 00 CC 9C
762 25 FE 00 03 0F 88 86 8B
762 26 64 00 00 00 00 00 00
762 27 00 00 0F 8A 00 02 00

Now you have the stuff you need, as 762 is the "Hey, I am talking back at you" address of the BMU ECU.

Find what you have where I had 01 54. Convert this from hexadecimal to decimal (see below) and divide by 10. This will give you the max charge capacity, or battery health in Ah.

I will start sharing other parameters that you can access, when time allows. In order to share in a more compact form, lets first agree on a way of referring to particular parts of the response. Take the relevant part of the response from the above example:

762 10 37 61 01 82 83 0F 8B
762 21 24 0F 88 03 0C 6E 52
762 22 03 4D 1C 01 99 00 00
762 23 00 00 00 01 00 01 30
762 24 0F 0F 01 54 00 CC 9C
762 25 FE 00 03 0F 88 86 8B
762 26 64 00 00 00 00 00 00
762 27 00 00 0F 8A 00 02 00

Not all characters are actual data, some are control characters. We do not care to much of them. I will reprint the response, replacing the control characters with XX and sequentially number the actual data bytes:
XXX XX XX XX XX 00 01 02 03
XXX XX 04 05 06 07 08 09 10
XXX XX 11 12 13 14 15 16 17
XXX XX 18 19 20 21 22 23 24
XXX XX 25 26 27 28 29 30 31
XXX XX 32 33 34 35 36 37 38
and so on, depending on the length of the response, which can differ per ECU / PID and MODE.

I can then specify the Health parameter from the example above as:

Request address = 761
Response address = 762
Mode + PID = 2101
Relevant Data Items = 27, 28
Formula = Total / 10

The actual charge in Ah could be specified as:

Request address = 761
Response address = 762
Mode + PID = 2101
Relevant Data Items = 29, 30
Formula = Total / 10

SOC in % would be:

Request address = 761
Response address = 762
Mode + PID = 2101
Relevant Data Items = 0
Formula = Total / 2 - 5

Or a bit shorter:

Parameter;Units;Request Adress;Response Address;Mode+PID;Relevant Data Byte(s);Formula
SOC;%;761;762;2101;0;Total / 2 - 5
Batt Health (how much charge can the battery contain);Ah;761;762;2101;27+28;Total / 10
Current Charge (how much charge does the battery current contain);Ah;761;762;2101;29+30;Total / 10
Charge Current (how much is going into or out of the battery);A;761;762;2101;14+15;Total - 1
Battery Total Voltage;V;761;762;2101;8+9;Total / 10

Example from OBC (On board Charger) ECU:

Number of charges at 100V;Count;765;766;2101;00+01;Total
Number of charges at 200V;Count;765;766;2101;02+03;Total

Example from Front Motor ECU:

RPM;Count;753;754;2102;2+3;Total - 20000

Example from Rear Motor ECU:

RPM;Count;755;756;2102;2+3;Total - 20000

Would that work?

Converting from hex to decimal for dummies guide

Replace each character in the hexadecimal string with a value, as follows
0=0, 1=1, 2=2, .... 9=9, A=10, B=11, C=12, D=13, E=14, F=15

Reading right to left, multiply the first value with 1, the second with 16, the third with 256 and the fourth with 4096. Than add everything you have together.

Arbitrary first example: BF8A =

B = 11 * 4096 = 45056
F = 15 * 256 = 3840
8 = 8 * 16 = 128
A = 10 * 1 = 10
Total = 49034

Second example: 0154 = 0 * 4096 + 1 * 256 + 5 * 16 + 4 * 1 = 340. Divided by then it gives 34.0, my lays battery health.
 
I can confirm that my android phone with telnet app and WiFi OBD car interface can extract the same hex data from the PHEV computer. The computer %SOC does not seem to be reflected in the battery meter display on the dash very well. The key seems to be the WiFi OBD interface.
 
Anko:
Have you tried talking to the people that make the Canion app. for the iMiev? I suspect it's only a few parameters that has to be changed for it to work with the Phev.

It would be awesome if we could see individual battery voltages and temperatures, Soc and so forth on the Phev also.
 
Must give that a thought .......

By the way, I have the parameters for individual cell voltages. Even have created a dashboard with 80 gauges ;-)

ECU is request address is 761
ECU response address is 762
Mode + PID = 1202
Results must be divided by 1000
Relevant data bytes are according to the next list, where x needs to be read as X and X+1, so two bytes for each cell.
Mind the gaps :mrgreen:

0
2
4
6
8
10
12
14
24
26
28
30
32
34
36
38
48
50
52
54
56
58
60
62
72
74
76
78
80
82
84
86
96
98
100
102
104
106
108
110
144
146
148
150
152
154
156
158
168
170
172
174
176
178
180
182
192
194
196
198
200
202
204
206
216
218
220
222
224
226
228
230
240
242
244
246
248
250
252
254
 
mckajvah said:
Anko:
Have you tried talking to the people that make the Canion app. for the iMiev? I suspect it's only a few parameters that has to be changed for it to work with the Phev.

It would be awesome if we could see individual battery voltages and temperatures, Soc and so forth on the Phev also.

I gave it a try:
Hello Anko,

no plans, sorry.


Martin

Von: Anko
Gesendet: Samstag, 5. September 2015 16:19
An: [email protected]
Betreff: caniOn app for Outlander PHEV

Hi Martin, Xavier,

As far as I know, there is no version of the caniOn app for the Mitsubishi Outlander PHEV. Do you have any plans / would you consider creating such as version?

If the issue is accessing the right parameters (addresses, modes and PID’s and so on), I might be able to help as I’ve been able to ‘discover’ quite a lot of them and might be able to find what you would be missing.

While we are at it, would you consider modifying your app so it can connect via WiFi?

Met vriendelijke groet, With kind regards,
Anko
No explanation, whatsoever. But does not seem as if we could convince them to make plans :cry:
 
Hello anko,

Don't worry, it's not you ... ;)

An extract of their facebook page :

Peter Galbavy Has anyone used this with a Mitsubishi Outlander PHEV ?
19 mai, 15:00

e-mobility.at caniOn does only work with Citroen C-Zero/Peugeot iOn/Mitsubishi i-MiEV.
19 mai, 15:06

Peter Galbavy Any chance of adding support in the future? Of course, the additional petrol engine would mean more complexity
19 mai, 15:06

e-mobility.at No
19 mai, 15:17


So it seems they have definitely other priorities ... and no time to waste in discussion ! :D
 
I have developed an Android App using the "Anko codes" so we can have a screen on our Android phones to show the internals of the battery pack. So far I can display the Max Charge capacity of the battery and mine is 36.3Ah (newish PHEV). Next to the voltages of each cell and make it pretty.
The app is called BatMon (Battery Monitor). You can start posting a wishlist if you want.

Currently -
1. no iPhone support (Android only) however I will write an iPhone version of BatMon if enough people say they are interested.
2. Supports bluetooth ODB2 dongles, I plan to support Wifi OBD2 dongles once I have finished making BatMon look pretty.
 
zzcoopej said:
I have developed an Android App using the "Anko codes" so we can have a screen on our Android phones to show the internals of the battery pack. So far I can display the Max Charge capacity of the battery and mine is 36.3Ah (newish PHEV). Next to the voltages of each cell and make it pretty.
The app is called BatMon (Battery Monitor). You can start posting a wishlist if you want.

Currently -
1. no iPhone support (Android only) however I will write an iPhone version of BatMon if enough people say they are interested.
2. Supports bluetooth ODB2 dongles, I plan to support Wifi OBD2 dongles once I have finished making BatMon look pretty.

It would be great !
My wishlist :
- Max charge capacity of course
- total voltage of the battery
- voltage of the weakest cell (= min voltage), if possible of the 10 weakest cells ... with cell IDs of course ;)

I could later help to translate the app in french.
 
I bought a bluetooth ODB adapter. Then i paired this to my tablet. There's a few free ODB apps on GooglePlay, I can't remember off hand which one I picked.

Lists all sorts of data you can look at, including real time, you can set up a little "dashboard" of gauges and dials to distract you from the road whislt you' drive i mean er for you to look at whislt someone else drives....
 
Indeed, there are several apps available. And many people use them. These apps show standard data, such as RPM, coolant temp, fuel consumption ad such, but non of them (as far as I know) reveal any of the PHEV specific secrets, such as SOC, Charge current, E-motor RPM, battery health, etc., etc.

Even if you know the proper ECU addresses, modes and PID's, and select an app that allows you to define custom PID's, you will not be able to get to the data in a stable manner. At least not with the four of five apps that I tried.

FYI: using the info I have collected I manage to create a dashboard on my iPhone looking like this:

IMG_3155_zpsjhzmbmyr.jpg


Top half of the dashboard you could make with standard apps. And even better looking, that's for sure. But the bottom half, you will not be able to get from a standard app (I think).

Note: the data in the screenshot is fictional, but it does work in the real world and it is near real-time (forget about the Refresh button, it auto refreshes in < 1 second). Actually, a red light flashes next to the Brake Pressure label when the physical brakes are applied ;-)

All info I used to create this dashboard and more has been shared with zzcoopej. Can't wait to see what he will come up with .....
 
anko said:
Can't wait to see what he will come up with .....

Progress so far, my Android App displays the 80 Cell voltages in my PHEV via OBDII, including highlighting the lowest cell voltage! I need to make the graph more meaningful by scaling the values so only the overall differences are displayed rather than the total value of each voltage.
I have also been working on some screens where you can choose a PID (Data feed) and a location and way to display it eg value, gauge etc like the other OBD tools.
Still so much more to do....



Evbatmon.png
 
V nice, both of you.

My request would be for saving the data - either as a CSV log with accurate timestamps or a sqlite database with the same.

It's nice to see realtime, but it's also interesting to review performance over a drive.
 
This is a great effort.

Since I have had my PHEV, I find that the car lacks key data like simultaneous L/100km as well as kWh/100km, with a breakdown of % going directly to the wheels as well as that going in or out of the battery. The usable Ah remaining in the battery as well as the petrol remaining the tank in litres would make estimating range remaining more than a guess.

I also notice that, presumably the data example above for the battery cell data is real data, a lack of 3.890 from the mix of numbers. This should be the mean value and for a data set of 80, I would expect approx half the numbers to be 3.890.

From my own BMS measuring my house battery of a Lithium type Chemistry, most of the cell voltages are at the mean value, with some on either side within a few mV.

As an analyst in a prior life, I suspect that there may be a measurement or calculation issue in the car, so I would only display data to 2 decimal points on the app. By all means store the raw data.

Processing power within the app for determine if rounding all the data for display can be achieved in the display update time.

I would expect to use a dedicated tablet for any monitoring, and even make a permanent home for one if a mix of data screens gave access to driving useful measurements.
 
I have had 0.0L/100km on many occasions. It takes the tiniest amount of ICE operation to give a number. I suspect that if an actual number for mpg is reported, that this will be changing quite rapidly and possibly not very useful. The next step will be what happens over 1000mpg. :roll:
 
I have l/100 km on my dashboard. So it is possible. But in my case, it is instantaneous, not average fuel consumption.

Personally, I find that more interesting, as if tells you what is going on and what the direct effect of driving styles / techniques is.
 
Back
Top