User avatar
garygid
Gold Member
Posts: 12464
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 8:37 am

http://www.ebay.com/itm/310651672153?ss ... 1439.l2649

Good, an in-USA source, thanks. Do you know where they ship from?

Looking at your session log, I do not understand how the ELM327 knows
how many responses to ask for:
Please correct my comments below, for my better understanding.
Thanks.

Do you have a good link to the "ELM327" version 1.5 (clone) programming manual?

Code: Select all

>atz (asks for device info?) 
ÿ

ELM327 v1.5

>at sp 6 (set the OBD interface type to CAN, 11-bit MsgID, and 500kbps?) 
OK

>at h1 (show headers as mode 1,or On?) 
OK

>at d1 (show data length???) 
OK

>at sh 79b (set the send-command MsgID, or header?) 
OK

>at fc sh 79b (set the get-next-response MsgID?) 
OK

>at fc sd 30 00 20 (set the get-next-response data?) 
OK

>at fc sm 1 (must specify when to send,or not send, the get-next-response???) 
OK

>21 00 (sends 79b 21 00, a short message?????) 
7BB 8 06 61 00 FF 80 00 01 (the single response, did you set a filter to show only the 7bb MsgIDs???) 

>21 01
7BB 8 10 29 61 01 00 00 00 95 (how does the ELM327 know to request more responses???) 
7BB 8 21 02 88 00 00 02 9C FF 
7BB 8 22 FF FF FF 0F 90 2A F8 
7BB 8 23 91 2F 2D 1C 03 9F 00 
7BB 8 24 5C 21 81 00 06 18 0F 
7BB 8 25 00 08 DD 59 80 00 01 

>...  snip... 
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 12:59 pm

Gary,
You do realize this is my command sequence that I developed for the ELM327 project. I have the ELM327 tell the Leaf to send all the data with a 32 msec delay between lines. So you don’t need to know how many lines to expect for any command. If the Leaf supports the command/group it know how to respond.

Jim

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 1:22 pm

Jim, thanks a lot for your efforts! I don't have an Android device w/ BT yet, so I can't run your app, which is why I was playing with it through a serial terminal on my PC.

Gary, yes, the command sequence is still gibberish to me.. I copied it from Jim's ELM327 thread. The only things I figured out myself are:
1) "at sp 6" - sets 11-bit 500kbps CAN
2) the 2nd byte in "21 xx" selects the group number.
You can get a copy of the ELM327 manual here: http://elmelectronics.com/DSheets/ELM327DS.pdf. I haven't been able to find one that specifically addresses the V1.5 clone.
To talk to my fake ELM327, just pair it with your PC using PIN: 1234. Enable the SPP virtual serial port, and write down the comm port number.
Then, you can just open up the virtual comm port in any terminal emulator, such as Putty using 38400,n,8,1

The eBay seller that I bought mine from ships from Corona. It took only a couple of days to arrive. I selected this particular one because it looks like the one that Jim uses, and it's easy to open in case I want to modify it (though it's probably better to just buy an extension cord, and make a little jumper box to switch among the CAN busses). I've only used it for a few minutes so far, but it seems to work fine, and it also was able to retrieve OBD-II data from my BMW w/o any problems.

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 10:19 pm

GregH wrote:
garygid wrote:Group 6, with 24 bytes of zero data, at two bits per cell-pair,
might possibly be a cell-pair status. One bit might indicate
that the equalizing shunt is turned on.
Cool! Good catch! I could have sworn I tried these other group IDs.. hmm.
I wonder if it's because I ran it on the CAR-CAN instead of EV-CAN, though I would expect the BMS to respond to these kind of messages on the EV-CAN

GregH
Posts: 860
Joined: Fri Jul 01, 2011 4:16 pm
Delivery Date: 13 Jun 2011
Leaf Number: 26967
Location: Irvine, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 10:32 pm

lincomatic wrote:
GregH wrote:
garygid wrote:Group 6, with 24 bytes of zero data, at two bits per cell-pair,
might possibly be a cell-pair status. One bit might indicate
that the equalizing shunt is turned on.
Cool! Good catch! I could have sworn I tried these other group IDs.. hmm.
I wonder if it's because I ran it on the CAR-CAN instead of EV-CAN, though I would expect the BMS to respond to these kind of messages on the EV-CAN
Yeah, I'm getting group 6 now (over EV-CAN). During charge every now and then I see a 00 turn to 0F, 0E, 05 or 01.. But mostly 0F.. It will pop on for a few seconds then back to all zero...not really what I was expecting. This is during charge at about 50% SOC.. Will check again in the morning when I continue charging closer to full...
'17 blue Volt Premier w/ACC
'12 SL black Leaf
'11 SL blue Leaf
RAV4-EV 2002-2005
Gen1 & Gen2 EV1 1997-2003
PV 2.4Kw, 10kWh lithium battery SCE TOU-DA

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Tue Apr 23, 2013 10:46 pm

GregH wrote:
Looks like there are also controllers at:
0x744
0x746
0x784
0x792
0x79d
.. I haven't tried pinging any yet, but based on my time with the Consult tool I did see activity there..
OK, I don't know if I'm doing it right, but I pinged all of these ID's and all but 0x746 returned data:

Code: Select all

>atsh744
OK

>atfcsh744
OK

>atfcsd300020
OK

>atfcsm1
OK

>21 00
764 8 06 61 00 80 01 80 00

>21 01
764 8 10 0D 61 01 FD AE 00 00
764 8 21 FB FF F8 FF F1 BF FF

>21 02
764 8 03 7F 21 12

>21 03
764 8 03 7F 21 12

>21 04
764 8 03 7F 21 12

>21 05
764 8 03 7F 21 12

>21 06
764 8 03 7F 21 12

>atsh746
OK

>atfcsh746
OK

>atfcsd300020
OK

>atfcsm1
OK

>21 00
NO DATA

>21 01
NO DATA

>atsh784
OK

>atfcsh784
OK

>atfcsd300020
OK

>atfcsm1
OK

>21 00
78C 8 06 61 00 B0 00 00 00

>21 01
78C 8 03 61 01 98

>21 02
78C 8 03 7F 21 12

>21 03
78C 8 04 61 03 03 B9

>21 04
78C 8 04 61 04 00 00

>21 05
78C 8 03 7F 21 12

>21 06
78C 8 03 7F 21 12

>21 07
78C 8 03 7F 21 12

>atsh792
OK

>atfcsh792
OK

>atfcsd300020
OK

>atfcsm1
OK

>21 00
793 8 06 61 00 E0 00 00 00

>21 01
793 8 10 1A 61 01 CB C9 CD C2
793 8 21 C0 CB C2 C0 CB C8 C7
793 8 22 CA C1 BC C9 C4 C3 C6
793 8 23 C9 C8 CB C2 BF C8 C6

>21 02
793 8 10 1A 61 02 96 96 97 96
793 8 21 95 99 96 95 98 96 96
793 8 22 97 96 95 99 96 95 99
793 8 23 96 95 97 96 95 98 99

>21 03
793 8 10 12 61 03 04 11 12 31
793 8 21 12 31 05 11 13 31 04
793 8 22 11 05 10 12 31 31 04

>21 04
793 8 03 7F 21 12

>21 05
793 8 03 7F 21 12

>21 06
793 8 03 7F 21 12

>atsh79d
OK

>atfcsh79d
OK

>atfcsd300020
OK

>atfcsm1
OK

>12 00
7BD 8 03 7F 12 11

>21 00
7BD 8 06 61 00 C0 01 F0 00

>21 01
7BD 8 10 50 61 01 25 39 01 95
7BD 8 21 8D 8D 4B 4C 4C 4C 4C
7BD 8 22 4C 00 00 5B 06 5A 06
7BD 8 23 01 06 06 08 00 03 00
7BD 8 24 08 00 01 00 00 00 03
7BD 8 25 00 00 00 00 00 00 00
7BD 8 26 00 03 00 00 00 00 00
7BD 8 27 00 00 00 00 00 00 00
7BD 8 28 00 00 00 00 00 00 00
7BD 8 29 00 00 00 00 00 00 00
7BD 8 2A 00 00 00 00 00 00 00
7BD 8 2B 00 00 00 00 00 00 00

>21 02
7BD 8 10 50 61 02 00 12 45 00
7BD 8 21 01 00 47 D2 00 00 00
7BD 8 22 00 00 00 00 20 86 59
7BD 8 23 59 00 38 00 00 00 00
7BD 8 24 00 00 00 00 00 00 00
7BD 8 25 00 00 00 00 00 00 00
7BD 8 26 00 00 00 00 00 00 00
7BD 8 27 00 00 00 00 00 00 00
7BD 8 28 00 00 00 00 00 00 00
7BD 8 29 00 00 00 00 00 00 00
7BD 8 2A 00 00 00 00 00 00 00
7BD 8 2B 00 00 00 00 00 00 00

>21 03
7BD 8 03 7F 21 12

>21 04
7BD 8 03 7F 21 12
I hope I'm doing it right .. maybe Turbo3 can comment. I ran exactly the same commands that I used for 79B, except for substituting in the new ID. Curiously, I typed in 12 00 instead of 21 00 on the last id, and the 2 commands returned different data:

Code: Select all

>12 00
7BD 8 03 7F 12 11

>21 00
7BD 8 06 61 00 C0 01 F0 00
Can someone explain the numeric command's format? I'm having trouble understanding the description in the ELM327 manual.

FYI, one thing bad about these cheap BT ELM dongles is that they don't stay paired after you unplug them. My Win8 machine has issues when I try to delete/re-pair the device, so I end up wasting 15 minutes or more each time I need to reconnect it.

User avatar
garygid
Gold Member
Posts: 12464
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Wed Apr 24, 2013 7:06 am

Apparently these are Error Responses:

>12 00
7BD 8 03 7F 12 11

have 3 bytes of following data (the 03),
the 7F error indicator
the Request-Function that caused the error (the 12, but 21 elsewhere),
and an Error-Type code (11 here, that probably means that the
Request-Function is not supported)

>21 05
793 8 03 7F 21 12

The other Error-Type we have seen is 0x12, which apparently
means that the Request-Function (here 21) is supported, but
the requested Group (here 05) is not supported.
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12464
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Wed Apr 24, 2013 7:30 am

Note that all of these tests, using the ELM327 type device,
are being done on the CAR-CAN bus.

Perhaps the Consult 3 Plus only connects to the CAR-CAN bus
for most of its diagnostics, but still might need to connect
elsewhere to do firmware upgrades.

Apparently the Consult 3 Plus can do most of the updates.

However, it seems that updating the TCU (telecommunications unit)
requires an SD card in the left slot of the center console, probably
because the TCU is only connected (by USB?) to the center console,
and not to any CAN bus?

Then, the center console itself, although connected to at least the AV bus,
seems to get at least its major programming from the "Nav" SD chip.

Warning: Everybody should write down their Nav system's CONFIRMATION
CODE NUMBER, in case they need/want to replace the Nav SD card.
Having the Set "Number" (Model), and Serial Number might be useful,
but these can still be read even without the SD card.
Perhaps even put it on a sticker on the back of the Nav screen, or
behind the Nav screen?
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

thimel
Posts: 133
Joined: Fri Apr 23, 2010 6:10 pm
Delivery Date: 11 Jun 2011
Location: SF bay area

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Sat May 11, 2013 3:57 pm

With the hope of finding out how to get the tire pressures, I did some googling.
First of all. I found that Nissan mostly uses the Schrader brand of TPMS.
I also found the CAN codes to get pressures on a Prius. They are at http://priuschat.com/threads/obdii-codes.73944/. I'm hoping they might be standardized so the same ones would work on the LEAF. Anyone care to check?
That's all I found after an hour of searching. It does seem that several scan tools can give the pressures on many brands of cars. Also, the OEM CAN codes are proprietary and they charge of order $50k for them.

GregH
Posts: 860
Joined: Fri Jul 01, 2011 4:16 pm
Delivery Date: 13 Jun 2011
Leaf Number: 26967
Location: Irvine, CA

Re: Active EV-CAN sampling: cell voltages, pack temperatures

Sun Jun 30, 2013 1:29 pm

Just an update.. I am still trying to track the temperature conversion points to get accurate temperatures down to 0.1C (0.2F) I've been updating the first post in this thread periodically. Here is the latest known data from 12C to 43C. Note the slope of the impedance on the thermistor is not linear.. The car doesn't seem to be using a look up table but rather a series of linear approximations.. ie 10 clicks per degree C from 18 to 28 but 8 clicks per degree C from 36C to at least 43 (as high as we have confirmed data for).. The "clicks" are the raw data reported from the car. The car reports the raw data as well as the temp in degrees C (no decimal precision). Both Jim (on the ELM app) and I (on LeafDD) attempt to derive a more precise temperature in C or F based on the raw data. LeafDD is accurate from 13C to 43C but in order to extend that accuracy to lower and higher temps we need more data. On the LeafDD page 2, holding the button will show the raw thermistor and degree C value directly from the car.. otherwise you're seeing my derived values.

13 degrees starts at 589
14 degrees starts at 579
15 degrees starts at 569
16 degrees starts at 558
17 degrees starts at 548
18 degrees starts at 537
19 degrees starts at 527
20 degrees starts at 517
21 degrees starts at 507
22 degrees starts at 497
23 degrees starts at 487
24 degrees starts at 477
25 degrees starts at 467
26 degrees starts at 457
27 degrees starts at 447
28 degrees starts at 438
29 degrees starts at 428
30 degrees starts at 419
31 degrees starts at 410
32 degrees starts at 401
33 degrees starts at 392
34 degrees starts at 383
35 degrees starts at 374
36 degrees starts at 365
37 "" 357 ?
38 "" 349 ?
39 "" 341 ?
40 "" 333 ?
41 "" 325 ?
42 "" 317 ?
43 degrees starts at 309
44 "" 301 ?
45 "" 293 ?
'17 blue Volt Premier w/ACC
'12 SL black Leaf
'11 SL blue Leaf
RAV4-EV 2002-2005
Gen1 & Gen2 EV1 1997-2003
PV 2.4Kw, 10kWh lithium battery SCE TOU-DA

Return to “LEAF CANBus”