Using clone ELM327 Bluetooth OBDII adapter with Leaf

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Suggestions:
1. To make the horizontal axis more readable, put tic
marks every 5 bars, and numbers every 10.

2. To make the vertical axis more readable, draw lines
every 2, 3, or 4 mv, and label every other line.

Caution: Getting these Requested values requires
writing to the CAN bus, and the car might not be well
tested with these requests happening while driving.
So, it might be best to limit them to occasional use.

But, so far tests using the Requests seem encoursging.
 
Here are the suggested updates to the x/y axis labels.

p1010145kg.jpg


I see there is a bug in the min value setting as the bottom level should be 0.0001 mv lower than min voltage. As a result the lowest cell (#11) has no green bar.

Maybe use a large font for x-axis labels and not rotate them 90 degrees.
 
Looking good.
Yes, you could not rotate the horizontal axis labels,
and use the same font as the vertical axis.

Having the max value go to the top is good, it just uses the graph area better.

Having the min value "at" the bottom axis is also OK, since there are
usually only a few, the no-bar aspect makes it easy to find, and again
the plot area is used better. Also, the low label on the vertical axis is
always the min value, easy to find and can be read directly.

To solve the missing-bar look of the min-height bars, I made these
bars one pixel high. You might find that effect pleasing.
 
You might add one black pixel column between
the vertical axis bar and the first green bar.

You are showing (as it works out on this phone's screen)
4 green bars, and a wider space, which is fine.
Your current version shows 3 groups of 5 already.

However, in optimizing for this screen resolution,
if one wanted to even bother, you could show groups of 5
bars, then an extra space, to match the tic marks, and save
a couple of pixels. Since the wider spaces appear because
of floating to integer conversion, just removing a few pixels
from the width of the plot should make the spacing
become 5 bars instead of 4 bars.

------
I believe that you want to add additional screens, and
a Navigation button could be Index, going to a set of
GoTo Screen buttons. So, see below...

Eventually the two buttons and Connected status box
could be not drawn on this screen, giving more room
to use for making a readable display.

Then, when the screen is touched (not in the upper icon area)
the control/navigation buttons could appear, quickly
overlaying the current data screen.

These Navigation buttons might include Prev and Next
to get through a series of data screens, but there might
be an "index" ("Go To... ") button that goes to a screen of
buttons that go directly to the desired data screens.

So, tap for Control, like Start and Stop, Settings, and
Index (or GoTo), then a second tap on GoTo (or Index),
and a third tap taking one to the desired data screen,
usually showing the "old" data, so the user could
study the same data as displayed several different
ways.

Another Control button would be Re-Request, or Update,
or some such that would re-Request the data for the
current screen, or set of screens. Perhaps a future
feature would be auto-request every N seconds, but
that should NOT be the default, for liability reasons.
The writing of a Request to the CAN bus is then entirely
done at the user's request, either once manually (the
power-On default of N = 0), or periodically, but only
after being specifically set up by the user.

Screens that just use passive listening reading of the
CAN bus can be updated as often as the messages
and data-processing allows.

The Connected status might be done with the system
Bluetooth icon, which looks dimmed on your screen.
But, the system might have other icons available,
or you could make one for your own, and put it in an
unused corner.
 
garygid said:
Is your CAP% a percent of 66 amp-hours capacity, which is assuming
that a new battery pack holds 66 amp-hours when "fully" charged
to 281 GIDs?

Is this SOC just a high-resolution version of the SOC read from
the EV bus messages?

Note that the %SOC is of little use during driving, and the extra
precision is useless. When the capacity is down to 50%, the SOC
will still read around 95% after a full charge, but the %GIDs (percentage
of 281) will read about 50%, indicating an estimate of the usable
fuel on board.

Also, since the battery pack declines in voltage as it is discharged,
one amp-hour from a nearly fully charged pack provides more energy
than one amp-hour provides when the pack is mostly discharged, a
ratio of about 4:3 between the two.

IMHO I don't think we should assume that all Nissan EVs (or future Leafs for that matter) will always have 66Ah battery packs or charge to 281Gids.. When you have an absolute like Gids or Ah, I'd much rather just see the actual number... Just sayin.

Yes, the 24bit SOC is the same as the 0x55b EV-CAN message. Ie when it rolls over from 74.1999 to 74.2000 the 0x55b message will roll from 74.1 to 74.2.

And yes, agreed 4 decimal places of precision is somewhat silly and yes agree that Gids are more valuable to the driver than SOC.
 
Yes, pretty much any number is meaningless
without some kind of units or reference.

But, wonderful progress in understanding the
results of the Querys.

Now, perhaps we can find a way to query the
hardware/firmware numbers of the different
internal components, the VIN, etc.?

In ICE cars, there is a message to broadcast that asks
each member on the bus to respond with some kind
if ID and perhaps other info.
 
Fixed min y-axis bug, changed x-axis labels and added AHr value. The CAP starting AHr will be user changable to give correct % remaining to handle the case of minor pack differences or when Nissan comes out with higher capacity batteries. I like to be able to see how much capacity I have lost.

Android scales the drawing to fit the current screen size. So the extra pixels added are not under my control. On my Nexus 7 there are no extra pixels every four bars. Buttons and placement are in no way final. Just the way the iMiev code was written. This is still mostly temporary coding. Needs major rework on the inner workings before it is ready for testing by others.

p1010148yd.jpg


I need to work on WattsLeft sales and taxes, so there will not be any updates for a day or so.
 
Is there an easy summary such as buy this adapter, do this to it, and install this software found at this location on my Android devices. Like a wikipedia how to summary?

Would love to do it. Too many posts to pour through.

Thank you for all the efforts people have expended on this. What an awesome community!
 
For those of you who use Windows Phone 8, I have a test app that is able to send commands and receive data from the ELM327 Bluetooth OBD II reader when connected to the LEAF. It's a long ways away from a full application, but there is hope that this will work on platforms other than Android!
 
I have a beta of my WP8 app, if you're interested please PM me your live id and I'll add you.
 
Turbo3 was kind enough to share his app and it worked with no fuss.

Screenshot_2013-04-13-19-48-14_zpsb0d92036.png

my car is almost exactly two years old and has 25000 miles. I was seeing the 9 bars @ 80% phenomenon last summer and have been assuming that I'll lose my first capacity bar this next summer. This cap % of 87.6 would seem to be right in line with that. I live and work in coastal San Diego.
 
Hi Jim (Turbo3),

Could you please post the photo you took of my battery readout on Saturday after the BAYLEAFS meeting?

I think you got 57.87 AHr and 87.3% CAP for my LEAF.


davewill said:
Turbo3 was kind enough to share his app and it worked with no fuss.

Screenshot_2013-04-13-19-48-14_zpsb0d92036.png

my car is almost exactly two years old and has 25000 miles. I was seeing the 9 bars @ 80% phenomenon last summer and have been assuming that I'll lose my first capacity bar this next summer. This cap % of 87.6 would seem to be right in line with that. I live and work in coastal San Diego.

I also was seeing nine charge (fuel) bars at "80%" last summer, and saw it a few times again during a heat wave last month. I also assume that I'll lose my twelfth capacity bar this Spring or Summer on my LEAF, with fewer miles than yours (~17,000) but (probably) with with considerably higher exposure to high temperatures (Northern Central Valley/foothill) and higher kW average discharge and (regen) charge rates, due to my LEAFs more mountainous driving.

I actually was expecting a slightly higher reported percentage loss of capacity than was shown, as my LEAF's reported kWh capacity from "100%" to VLBW has dropped more like 14% to 15% in just the last 19 months. I had 18.7 reported kWh at six bars temp in 9/11, and only 15.6 to 16.0 kWh over the last four months.

Maybe this indicates that my reported kWh available from"100%" to VLBW will rebound more than I had expected, when I can first check it at six bars of temperature as I had when Jim checked it in San Francisco (due to the previous day's high miles driven and several DC charges).

My battery is at 4 temp bars now, and at 10 charge (fuel) bars at "80%". A six-temperature-bar range and capacity test is probably at least a few weeks off, as I doubt I'll have access to another DC battery warming session before the local weather gets warm enough to put my battery at six T bars, without a quick charge.

Below is how Carwings has reported the total energy use from "100%" to ~VLBW on my warm climate LEAF two years from the factory and with ~16,000 miles on the odometer.

While the reported kWh use has dropped quite a bit, My LEAF has displayed no significant loss of range from my first test, to most recent, on range tests of 95-113 miles, when corrected for all test variables, including speed, temperature both when charging and when driving, and my own driving efficiency (as reflected in the regen kWh reported by CarWings).

Of course my battery has lost capacity in the last 18 months, it just not yet a large enough loss to show up clearly in a range test, and is, IMO, nearly certainly far less than the kWh use results below, showing capacity loss approaching 15% just over the last 18 months (when adjusted for battery temperature) would indicate:

All charges prior to testing were to “80%", battery allowed to return to ambient temperature, and then charged @ 16 A 240 V to “100%”, two to three hours before range/capacity test begins, and then left plugged into the EVSE until departure.

IMO The distance driven at the point where the battery temp bars increased, when that has occurred, is useful data as to the relative battery temp and temperature the (temperature variable) battery capacity when the "100%" charge was completed.

9/7/11 18.7 kWh from "100%" to VLBW, 6 dash battery temp bars constant (as recalled later)

5/10 12 17.2 kWh, 5 to 6 temp bars ~mile 73

5/31/12 17.5 kWh, 5 to 6 temp bars ~mile 5

6/17/12 17.5 kWh, 6 temp bars constant

8/18/12 17.0 kWh, 6 temp bars constant

8/30/12 16.8 kWh, 6 temp bars constant

9/08/12 16.7 kWh, 5 to 6 temp bars ~mile 5

10/1/12 16.6 kWh, 6 temp bars constant

11/3/12 16.2 kwh, 4 to 5 temp bars ~mile 14

1/31 15.7 kWh, 4 to 5 temp bars ~mile 24

2/16/13 15.8 kWh, 4 to 5 temp bars ~mile 18

3/1/13 15.6 kWh, 4 to 5 temp bars ~mile 18

3/13/13 16.0 kWh, 5 bars temp constant

4/2/13 15.7 kWh, 4 to 5 temp bars at ~mile 1


I think it is nearly certain, that the LEAF "gauge error" that has shown up in premature battery capacity bar loss and Wh/gid error in other LEAFs is also displaying itself in the dash and nav screen m/kWh, and also in the (more accurate) CarWings kWh use reports, from my LEAF...


http://www.mynissanleaf.com/viewtopic.php?f=31&t=6876&start=200" onclick="window.open(this.href);return false;
 
After an 80% charge, you are still at 12 capacity bars (the
small bars on the far right), buy might be showing 10 SOC-ish
bars (look like fuel bars), right.

The little capacity bars only change after losing 15% capacity,
but the "fuel" gauge bars change as you charge or drive.
 
garygid said:
After an 80% charge, you are still at 12 capacity bars...the "fuel" gauge bars change as you charge or drive.

Thanks for noticing my error. Edited my previous post to "charge" bars, or is "fuel" now preferred?

="garygid
...The little capacity bars only change after losing 15% capacity...

Actually, the main point of my post is that I expect I may lose a capacity bar prior to actually "losing 15% (of available battery) capacity".
 
edatoakrun here is the picture I took of your battery state at Saturday's BayLeaf meeting.

p1010171o.jpg


Here is a battery report for a new 2013 Leaf on the show room floor. The T3 reading is bad so ignore. I am sure that part of the battery was not that cold as it would be below absolute zero (-6244K).

p1010173mh.jpg


For those interested in testing the beta version of this program I have included it below. Please report back which devices it works on and which it does not. Include device name and android version number.

This test version auto reads one group each second cycling through CP voltage then battery temp then SOC/CAP so each group gets a new reading every 3 seconds. Once you have connected it to your ELM327 it will remember that device and try to connect to it the next time you start up the program. Once it has seen your ELM327 you can start the program without being near the car and it will auto retry connecting every couple of seconds until you get close enough.

I am off working on my WattsLeft bluetooth program so have not been working on this one.

Jim
============================================
The Battery Pack report android app has been moved to the bottom of the very first post on page 1.
 
Phone: Samsung SGH-T699 (Galaxy S Relay 4G)
Android: 4.0.4 / ICS (CyanogenMod9)
Adapter: Generic ELM327 Mini Bluetooth

Code:
An error has occured in sub:
main_activity_create (java line: 354)
java.lang.IllegalArgumentException: is not a valid Bluetooth address

batteryerr.png


Continued past error, stopped app, restarted app, and it then prompted me to pick a bluetooth device, failed to connect, but then started working. Working great ever since. :)

I know it's still beta, but this is a great app! Thanks for porting it over for the LEAF.

battery1.png
 
The program work fine the first time. I had already paired my ELM37, so the program found it and started reporting CP voltages. Every few seconds, it looks like the battery voltages update, and the graph seems to change quite a bit. Cell pair differential voltage varies from 16 mv to 21 mv. The second time I tried to run it, it wouldn't connect. When I fired up the program with the car off, I got a connect, but no data. When I turned the car on, I still got no data. I turned everything off, pulled the ELM327, rebooted the phone and started it all over again. This time it worked, but with varying CP voltages again. My 6 month old, 6000 mile SL shows 101.98% capacity, a little better than the showroom 2013.
 
This version of the program has no retry after the Bluetooth connection is made. After the Bluetooth connection is made the code will send the first command and expect a response. If the car is not "active" (see below) this first message will be lost so even if you make the car active it will be too late.

This problem comes about because the ELM327 is always powered on when you have it plugged into the Leaf whether or not the car is in a state where it can respond (the "active" state).

So, for now the correct startup proceedure is to have the car "active" before you start the program. "Active" is when the car is ON (dash lights up, not just the Nav screen) or the three Blue dash status lights are on/flashing (charge cord just plugged in, charging or charging completed).

Also, you should use the "Stop" button to exit the program not just the android back button which will still keep the program in pause mode.

For the next version I can add a little code to retry the first command if the Leaf does not respond within one second.

You can start the program when you are far from the car and the program will retry the last Bluetooth connection over and over again. But when you get close to the car it better be "active" so the Leaf can see that first command after it connects.
 
Back
Top