MiEV-CAN

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.

MLucas

Well-known member
Joined
Jun 7, 2012
Messages
833
Location
Niagara on the Lake, Ontario, Canada
I'm going to start working on decoding the messages from the OBDII connector the way the members on the Leaf forum did. I've been in touch with Lincomatic and going to buy his V1 LeafCan to get started. If anyone wants to participate in this project and help out, that would be really helpful to the i-MiEV community. I've read dozens of messages on the Leaf forum about this topic and it looks like it took a lot of people to scan and decode the messages coming from the CAN port.

First thing we need to do is figure out the pin out on the CAN port. Does anyone have access to the i MiEV electrical schematics? If not we'll need to do some testing and hacking to figure it out. Here's the posting where they figured out the Leaf's pinout: http://www.mynissanleaf.com/viewtopic.php?f=8&t=4131

Lincomatic's blog about the LeafCan, read all the topics about the LeafCan to get a good understanding of what he did to make the LeafCan. http://blog.lincomatic.com/

GaryGid created a program to decode the messages coming from the CAN, called Can-Do. We'll probably need to modify this slightly for our i MiEVs. The 'Dash' feature which shows the Leaf's system does not quite line up with the i. I can contact him and see if I can get the source code. It's written in VB6 which I'm familiar with but much prefer .Net instead. We'll probably need to modify several other parameters as well. To get this program and experiment with it, read the instructions at this thread. I've gotten it to work and its quite impressive.
http://www.mynissanleaf.com/viewtopic.php?f=44&t=4438

There are a lot of smart people on this forum, little bit of time and some detective work is all it takes. Anyone interested.
 
I'm interested.

I'm wondering if this DIAGNOSIS CODE CHART will be usefull at some point down the road:
http://www.i-mievforum.com/forum/f11/diagnosis-code-chart-181.html
 
I'm really glad someone is doing this - Unfortunately, programming is waaaay above my pay grade so I can't be much help, but I'll follow your progress closely and no doubt I'll learn lots in the process ;)

Don
 
Don - its not all programming. Lot of the groundwork has been laid out for us by the Leaf forum members. I can handle the programming chores on the CanDo. With your electronics background and working with the OpenEVSE, there is plenty you can do. Its going to take a lot of different skill sets. Even if an individual feels there is nothing they can contribute, everyone can monitor the log files and look for patterns. This is what seemed to take the most time and why the CanDo program was developed. They were doing different operations with the cars and watching the log files to see how they reacted to these events, eventually they found the patterns and put them in a 'recipe' file that the CanDo could read.

I sent an e-mail to GaryGid to see if I can get the source code so we won't have to start at complete zero in figuring this out. I'll let you all know how this goes.
 
Info from european MY 2011 workshop manual:

The following components are connected in the CAN bus line as follows.

ETACS-ECU
ASC-ECU
EPS-ECU
Combination meter
Steering wheel sensor
G and yaw rate sensor
Battery management unit (BMU)
On board charger/DC-DC converter
Compressor/heater controller
Electric motor control unit (EMCU)
EV-ECU

Diagnosis connector:

Pin 16 - Constant +12V DC
Pin 14 - CAN-L
Pin 6 - CAN-H
Pin 4 & 5 - Ground
 
I have the "2012 iMiEV Electrical Supplement Manual" on order. I don't what it covers or in what detail.

https://www.helminc.com/helm/Result.asp?Style=helm&Mfg=MIT&Make=MIT&Model=IMIE&Year=2012&Category=&Keyword=&Module=&selected_media=
 
jjlink said:
I have the "2012 iMiEV Electrical Supplement Manual" on order. I don't what it covers or in what detail.

https://www.helminc.com/helm/Result.asp?Style=helm&Mfg=MIT&Make=MIT&Model=IMIE&Year=2012&Category=&Keyword=&Module=&selected_media=

Hopefully, it will cover the OBDII port schematics. Let us know as soon as get it and figure out if the schematics we need are in there.

I've gotten ahold of Gary Giddings (the very namesake of the GID). He's agreed to work with me on CanDo.

I have paid Lincomatic for his LeafCan v1. That is being shipped out today. He also gave me a link to buy the OBDII connector which is not included in the deal.

I found this article about software testing on the i, it states there are five electronic control units on board. Not sure if this will help out but didn't want to lose it either. http://johndayautomotivelectronics.com/?p=1694
 
TestO said:
Info from european MY 2011 workshop manual:

The following components are connected in the CAN bus line as follows.

ETACS-ECU
ASC-ECU
EPS-ECU
Combination meter
Steering wheel sensor
G and yaw rate sensor
Battery management unit (BMU)
On board charger/DC-DC converter
Compressor/heater controller
Electric motor control unit (EMCU)
EV-ECU

Diagnosis connector:

Pin 16 - Constant +12V DC
Pin 14 - CAN-L
Pin 6 - CAN-H
Pin 4 & 5 - Ground

Thank you very much. These pinouts are standard on the OBDII connector. The Leaf had some additional pairs, for other CANs (three in total present on the OBD connector and one more at the QC). I wasn't sure if we would be facing the same thing.
 
From the CAN schematics in the workshop manual, there is only one CAN-bus in the i-Miev.

There is also a K-line bus as backup between some of the critical units. I could't see that this bus is available on the OBDII connector.

And there is also an LIN bus. I'm not sure witch unit uses this, but I will check that and if this bus is available on the OBDII connector when I have the workshop manual available.
 
From my opening thread where I mention the Leaf pinout, reading that thread is a good discussion on where they sorted out the different CAN busses on the Leaf. If we only have one to deal with, that will make this whole project a lot easier. They had three different ones on the OBD connector alone.

At this point, I'm eagerly awaiting my LeafCan V1 from Lincomatic.

I've been in touch with GaryGid and this is his response to my queries about the CAN bus:

GaryGid said:
We were able to get a LEAF service manual On-Line for a modest $20 fee.

Maybe you can get one for the MiEV, or get a look at one at a dealer.
http://myimiev.com/forum/viewtopic.php?f=10&t=490 about $50 to $125 or so.
Maybe $19 AU here?
Or, much less expensive here, if it is for the correct model.
Probably the OBD pins are the same in most models.
http://www.ebay.com.au/itm/MITSUBISHI-i-MiEV-IMIEV-2009-2012-REPAIR-SERVICE-MANUAL-DVD-/271026858893
or maybe other places?

The OBD cables I use, I get from www.obd2cables.com
http://www.obd2cables.com/products/obd-cables/j1962m-ra-to/

The CAR CAN bus pins are standard for modern ICE vehicles,
and I would guess that the MiEV uses at least those same
pins for at least one CAN bus. The LEAF has 3 CAN buses on the
OBD connector, but one is the standard "CAR" bus is on 6-14.

In the LEAF:
OBD Pin 4 is shield, and 5 is ground,
usually 8 and 16 are 12v, where 8 is switched.
The CAR-CAN High is pin 6, and Low is 14

It should be 500k baud and probably 11-bit Message IDs.
That should get you something.

I have bought some "standard" OBD tools from www.scantools.com
to try and see it I can use it to get some raw message data to log.
This is one of the two I just got to experiment with:
http://www.scantool.net/scan-tools/pc-based/obdlink-sx.html
about $50

If you use the AVR-CAN board with my firmware, it should log
most of the messages (unless they come too fast) of whatever
CAN bus it is attached to.
The board is around $30 + tax and shipping from Mouser, and I can
program one and sell it to you, if you wish.

My kit is available, see the info at
http://www.wwwsite.com/puzzles/socmeter/

To connect to the pins on the AVR-CAN board's 9-pin DB9 connector:.
Four wires are sufficient, as follows:
Pin 1, 4, 5, 8 - open, no connection needed
Pin 2 - CAN-Low
Pin 7 - CAN-High
Pin 3 or 6 or both - Ground
Pin 9 - Power, 12v will work, at least for a short test ...

Cheers, Gary
 
Hi All,
I am "visiting" from the http://www.MyNissanLeaf.com forum.
I own a LEAF and have a great curiosity about how it works.

I made an attachment for the LEAF's OBD port to read the
CAN Messages going by, on the EV-CAN bus and the CAR-CAN bus.

In the iMiEV, it seems that you have the CAR-CAN bus, so
my LEAF Logging box should be able to read the messages, and
(via a GOOD (usually FTDI-based) RS232-to-USB adapter)
use a Windows PC to run CAN-Do and capture the messages,
look at the data, graph data, etc.

You can see my web sites for the GID-Meter and CAN-Do,
and get the CAN-Do program, with sample Log files and
Recipe files, and try it out. See:
http://www.wwwsite.com/puzzles/socmeter/
http://www.wwwsite.com/puzzles/cando/

I am in Orange County, CA ... Laguna Hills.
If there is an iMiEV owner near me, we should be
able to grab some logs imediately with my SOC/GID-Meter.

The present firmware does not write to the CAN bus to "Request"
any information, but just "listens" passively. That way,
there is very little chance of upsetting the car's operation.

Mitsubishi Headquarters is about 30 miles away, and
I usually go by that area about once a month,
occasionally using the Quick Charge station that
they so kindly let us "others" use.

My SOC/GID-Meter has two main functions:

1. Displaying some data decoded from the CAN bus.

We have only discovered what appear to be the meanings
of some few values in the messages, and these are probably
different for the iMiEV, but the looking and discovery
mechanism is basically the same.

To get the most mileage from this device, we could add a
LEAF/iMiEV mode setting, so that the values dislayed
would work for both cars. There might even be some
messages that appear in the iMiEV that do not occur
in the LEAF, and the meter could auto-detect the car type.

But, we need to discover the meaning of some of the
8 data bytes that come with most of the CAN Messages.
To do that, we need the 2nd feature:

2. Logging (essentially) all of the CAN Messages.

The existing SOC/GID-Meter will (most likely) Log the
CAR-CAN bus messages from the iMiEV, usiing my
existing CAN-Do program.

I can publish the Log, so that those interested can
become data detectives, with no expense at all.

For those interested in actually doing iMiEV CAN logging,
you can email me from my web pages (see above).
I have hardware available.

So, Who lives near me ... for a first trial?
 
Thank you, Gary for joining our project over here on the i-MiEV forum. Lots of good information there.

Checkout Gary's pages, he's got some good hardware for sale - the SOCMeter also known as the GidMeter that has been mentioned in many postings and news articles. I've downloaded and experimented with the CanDo software Gary developed. Very thorough and easy to use. I'm looking forward to getting our first log file to give it a try with.
 
More information taken from the workshop manual regarding the different data buses in our i-Miev.

LIN-bus:
Master and slave ECUs are connected to the LIN bus lines. The master ECU is the ETACS*-ECU, and the slave ECU is the column switch (column-ECU). The master ECU requests these slave ECUs to communicate each other via communication lines.
note *: ETACS (Electronic Time and Alarm Control System)

Chg-CAN:
Also, the EV-ECU communicates with the quick charger using the local CAN (Chg-CAN).

K-Line:
K-LINE communication has been adopted with EV-ECU, BMU, and MCU, as a backup for CAN communication.

ODBII connector:
Diagnosis connector

Terminal No. Connecting contents

1 - Diagnosis control
2, 3 -
4 - Earth
5 - Earth
6 - CAN communication line (CAN_H)
7 - K-line
8, 9 -
10 - Pulse check
11 - 13 -
14 - CAN communication line (CAN_L)
15 -
16 - Battery power supply
 
Test0,
Takk skal du ha.
Jeg var i Norge mange aar siden.
(I hope I didn't say "Your mother is a virgin", or something like that.) :lol:

My SOC/GID-Meter connects to pins 4 and 5 for ground,
pin 8 or 16 for Power, and 6 and 14 for the CAR-CAN bus.

The CAN bus should be 500,000 baud.
Message IDs are either 11 or "long" (about 28 bits), and the LEAF
uses 11 bits. Hopefully the iMiEV uses the same.

To get some experience with CAN-Do, download the program,
get it running, then download a LEAF Log file, and a recipe file.

Hopefully, I will be able to post a log from an iMiEV soon.
If we can get a log during charging, we should be able to
identify something related to battery energy "fuel" level.

Cheers, Gary
 
Bonjour from France,
I have, since a month, a Peugeot iOn. this is a kind of iMiev with another brand name...

I played a bit with the CAN bus and found some interesting data.

have a look there and please confirm it works the same on the original iMiev.

maybe you will use an online translator ;)
 
Rough translation of the priusfan French post:

... research for the exploitation of data taken diag. Can Bus is available on the diag plug, it is the same type as the HSD Toy, ie 11 bits MsgID at 500kbps.

52 posts ago, about 1600 frames / sec I use a set ODBLINK @ 500k, connected via USB to a laptop that runs realterm conducting a capture with timestamp.

MsgID 0x373 (frequency 100/sec):
1. The battery current (A) bytes 2 & 3 ( num 0-7),
formula (B [2] * 256 + B [3] - 128 * 256) / 100
Extreme values observed: -164.18 + 76.54
2. Voltage: bytes 4 & 5
formula (B [4] * 256 + B [5]) / 10 V
Excursion between 343.2 & 389.7 V
3. From these two facts, it is easy to integrate kilowatts inbound / outbound

Frequency 10/sec 412 PID:
1. byte 1 Speed kM / H
2. Byte 3 & 4 Odometer kM (certainly also in byte 2)

MsgID 346 frequency 50:
1. In byte 7 is the kM remaining autonomy

MsgID 0x6E1, 6E2, 6E3, 6E4 frequency 25:
1. Byte [0] is an index ranging from 1 to 12.
2. Found in pairs of bytes 4 & 5 and 6 & 7
QQC that resembles the voltage 88 battery cells.
3. found 64 temperature sensors in bytes 1 2 3
(value obtained by removing ° C 50 °)
 
A wonderful lead with some helpful values, Thanks.

Can you send a log file to me, and the format of the log file? (PM me)

What OBD hardware and what PC software did you use
to read the messages from the OBD bus, time-stamp the
messages, and write them to a file?

Perhaps I can add reading this file type to my CAN-Do program?

Or, use your logging and analysis program?

Where did you get the program?

What is a link to the hardware that you used?
 
Bonjour Gary
so many questions...
regarding hardware: first analysis were done using http://www.obdsol.com/obd-interfaces/obd-interfaces-standard/ with USB link on a laptop.
Also, I used a self made interface with a mbed microcontroller.
now, I am using this interface: http://batman.homelinux.com/blog/bluetooth-obdii-adapter/

for logging, I started using realterm on a windows laptop.
Also, I crosschecked using the "garagetool"...

your question: Where did you get the program?
realterm: on the www
others: self made
now, I am working for android phablets using a wonderful dev tool http://www.basic4ppc.com/

I suggest you to follow the discussion in the initial link, you will see a lot of pictures....

I come back to your translation:
in normal conitions ( ie not charging) there are 52 different CAN messages, some details in the link in this post here:http://prius-touring-club.com/vbf/showpost.php?p=166594&postcount=5

FYI, here is the init sequence for my interface:
Code:
str_init(0)="ATI" 	&Chr(13)&Chr(10)	' just for fun
		str_init(1)="ATSP6" &Chr(13)&Chr(10)	' CAN 11 bits @ 500k
		str_init(2)="ATE0" 	&Chr(13)&Chr(10)	' Echo OFF
		str_init(3)="ATH1" 	&Chr(13)&Chr(10)	' Header ON
		str_init(4)="ATL0" 	&Chr(13)&Chr(10)	' no crlf
		str_init(5)="ATS0" 	&Chr(13)&Chr(10)	' suppress spaces
		str_init(6)="STFCP" &Chr(13)&Chr(10)	' Clear Filters						
		str_init(7)="STFAP 346,FFF" &Chr(13)&Chr(10)	' put filter
		str_init(8)="STFAP 373,FFF" &Chr(13)&Chr(10)	' put filter
		str_init(9)="STFAP 412,FFF" &Chr(13)&Chr(10)	' put filter
		str_init(10)="STM"  &Chr(13)&Chr(10)    ' show frames

ps: we met somewhere in another life...
no, in fact I sent you a stub of my dev on MBED and you sent me your dev....
 
Back
Top