Software to Read BMU monitoring data

Mitsubishi i-MiEV Forum

Help Support Mitsubishi i-MiEV Forum:

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

puddnig

New member
Joined
Aug 24, 2018
Messages
3
Hello,

I've written this program primarily to retrieve information on how much Ah the battery of my car (2013 Citroen C-Zero) has been charged with, as the Citroen diagnosis tool can't retrieve these values.

It works with OBDLink MX, LX and SX dongles on Windows.

To use the OBDLink SX, you need to install the appropriate FTDI driver.
After connecting the SX a COM port should appear in the device manager.
The SX's baudrate must also be changed to 500000 but the program can attempt to do this under 'Test Connection'.
Note that to change it back to the original 115200 you need a serial terminal like hterm or putty, instruction here.

When you use a bluetooth model it is lot easier because windows automatically creates two virtual COM ports after pairing, you can look them up under Bluetooth Settings -> More bluetooth Options.
uc

The port with 'direction - outgoing' is the correct one.

On the initial launch the program creates a file called 'config.ini' where you can permanently choose your port and language (only en and de).

After reading the Information you can show the values or save them as a CSV.
uc


The value 'kWh Total' is calculated from the cumulated Ah and does not contain Energy charged by regen, so the actual amount of Energy your battery has been charged with might be 10-20% higher.

Also I don't know if the odometer value the program reads on US Vehicles is in miles or km, so the consumption value might be off.
The build date might fluctuate +-15 minutes or so as the car doesn't seem to update it's age continuously.

The source is available here and the portable .exe here

If there are any problems please let me know :)
 
That is some great work, thanks for sharing. How did you discover the commands to request the BMU data?

There are data items that indicate the state of the balancers--what would be required in order to request that data?
 
kiev said:
How did you discover the commands to request the BMU data?
I noticed that whenever you send an invalid request you will get an answer starting with "037F" which makes sense as it means "End of Message - Delete" in ASCII Characters.
Then I wrote a program that sends every request in a specified range and writes the request and answer in a text file if it's valid.
It basically brute-forces valid requests. I started with the request canion uses to get the capacity.
After that you need to guess which values are represented. The values in the service manual mostly line up with the can messages.
For Example if there are values like "Auto capa. measured result ", numbered 401 to 410 in the manual, you need to find an answer also containing 10 values.
The answer of 022114 contains ten times 0x01E0 = 480 => 48Ah, so it is probably the right one.

Download

On the first starts the program creates a configuration file where you can choose the port, the start request and the end request.
On every consecutive start it scans the range and appends the results to the result file, so i'd recommend renaming the result file between runs.
So far I've found almost every value listed under "BMU monitoring items", I just need to implement the filters/decoding.

BTW if you have problems creating the bluetooth serial ports I recommend installing "Bluetooth Serial Terminal" from the Microsoft Store and connecting to the OBDLink once, as it will do all the configuration for you. After that you should be able to connect on COM10.

kiev said:
There are data items that indicate the state of the balancers--what would be required in order to request that data?
I'm not sure, so far I haven't found anything, maybe I need to scan a larger range, maybe i need to send the requests with a different ID than 761.
 
kiev said:
There are data items that indicate the state of the balancers--what would be required in order to request that data?
The answer to request "022104" should be the balancer status, but i'll have to check when my car is actually balancing.
 
This is becoming more relevant with the possibility of changing out a degraded pack to larger capacity cells.

i wonder where and how did someone discover that "761" is the ID code for the BMU ecu?

Also i wonder about the "0221xx" command codes--what is the structure, format and meaning of these commands? How was this discovered and what other commands might be available?
 
It's been a few years and we never heard back from pudding, but all this is now starting to make some sense after seeing the CAN buss captures made by piev paul while connected with a mut clone.

The MUT causes these "unknown and never seen before" PIDS to show up in the CAN traffic. These commands can also be entered manually from a terminal window, or sent with a script file from the terminal. The basic communication is established using the Hayes AT Modem commands (remember back in the AOL days). So your pc or laptop or even cell phone can be the "external test equipment for diagnostic purposes" defined in the specs, aka a scann tool.

This seems to be related to the OBD (On-board Diagnostics) Test Modes defined in SAE J1979 = ISO 15031-5 (Euro OBD version) specs, and also to the J2534 Pass-thru Programming, which is discussed in a recent thread that i started to sort thru all the documents and spec mess. For example PIDS 771, 772, 782, 783, 784, 785 were found, https://myimiev.com/forum/viewtopic.php?p=46227#p46227
 
Back
Top