Trying to create a better range estimator. It's an evolution of my SOC Display project
6 May 2021
The idea is to show:
See also: https://www.openvehicles.com/ has another range solution, as does LeafSpy Pro. And on the Leaf there's the blue button on the steering wheel that provides a conservative range estimate (it is more accurate than the standard Guess-O-Meter estimate, but errs on the side of being too conservative)
27 Aug 2020
OK - here's what I have so far:
I'm calculating my range estimate based on;
Putting all that together my Range estimate formula is: km_per_kWh_12months * ((CarGids - Turtle_offset) * Wh_per_Gid)
For my range estimate example: = 6.9 * (Gids - 8) 74.73)
I've been collecting some data to see if my Range is any better than the standard GOM
This seems to indicate that my range estimate is better than the standard GOM, and maybe a little better than the secondary range estimate that the Leaf provides. [If you press the button on the steering wheel blue up arrow inside a blue circle - the center console will show a map with two range estimates; the optimistic GOM number and a more conservative number.] Cars with the cheaper center console won't get this though :(
Now I'm working on an option to display a range estimate graph that provides a visual projection of the range based on my best month, another line indicating the range based on my worst month, and then the actual range as it changes with battery SoC during the current drive. This provides an intuitive indication of (a) the likely upper and lower range possibilities and more importantly (b) how my current drive is tracking compared to those bounds. So if I'm driving 75 km from home to the Otaki fast charger I'll be able to gauge if I'm driving too hard or too easy.
At this stage the graph looks like this:
That's estimated range on the Y axis and km driven on the X axis. Then the top dotted line is the range projections based on my best months efficiency value from 2019. The bottom dotted line is the range projection based on my worst months efficiency value from 2019. And the line between them is based on the 12 month efficiency value from 2019. I'm not using 2020 data because it's wildly a-typical (eg. Covid lockdowns). On top of all that I'll plot the actual Range values as I drive.
Of course - in the ideal world (i.e. a Tesla) the car would use a terrain map to plot how the capacity is going to be utilised along a particular journey. My chart will jut tell me how my current driving compares to the long term average. Then I can use my knowledge of the terrain on my journey to gauge the implications of that.
Once I've used it for a while we'll see if this is actually useful or not.
My prototype display is only 128 x 64 pixels so I'm limited to roughly 1 km per pixel on the X axis.
I'd love to double the resolution - but still fit it inside the dash housing. Other cheap TFT display options:
A weird thing I found whilst working on this is that the Odometer values running along the Car-CAN bus are in Miles, not Kilometers. This is odd because mine is a Japanese Leaf (from late 2011) and Japan runs on the Metric system so I would have expected it to be a metric Odo. Also the Units on the dash are in km. The implications of this is the resolution for my range tracking graph is only 1.6 km :(
2 Sept 2020
More fiddling to get the graph working in a way that is helpful.
Trip Odo top left, my Range estimate top right
The white dot indicates current range vs distance is well below the my projection for this ride (which was over the Wainuiomata hill and back - so that makes sense.)
13 Apr 2021
My reasoning for using that as the base case is it happens to also be about what I get when driving on the open road with 2 bikes on the back. In day-to-day town driving the range chart isn't that useful because I usually have plenty of range. The chart is most useful on long trips where the distance between chargers is important. So it's better to skew the range estimate towards that use case.
OLED display is connected to the Arduino Micro via a 5v-3.3V level shifter:
17 Apr 2021
I've removed all the page switching functionality and this completely removed the initialization delay that occurs on the old SOC display system. It would sometimes take over a minute before get it's first reading of the battery capacity. Now the Range display has "instant" initialization.
4 May 2021
Here's the current state of the project
The design is looking pretty good.
I'm considering switching to a Mega 2560 Pro board. It should provide a minimum hassle upgrade path to get more memory. That would also allow allow me to run both displays off the one processor. At the moment each display has it's own OBD2 module and Arduino Micro.
The program is currently siting at 92% memory usage and I haven't yet implemented a way to adjust the km/kWh number.
5 May 2021
I've worked out a way to adjust the km/kWh factor using the Climate Controls and steering wheel. It's pretty cool. It goes like this:
(This is a combination that is unlikely to occur during typical use of the car.)
When, and only when that combination is met - the display will show the current km/kWh factor - and let you adjust it up and down using the steering wheel. Once you've got the km/kWh factor at your preference, then change any of the climate control options and the display will drop out of edit mode and store the new value in permanent memory (EEPROM).
I'm using this table to set the km/kWh value:
The formula is kmperkWh = 0.09 * temp + 5.1. The R2 value for these temps vs my raw monthy km/kWh readings was 0.931. The temp value above is an averaging of the average NZ ambient temp (NIWA) and the average monthly T1 battery temp reading from Flip the Fleet users. The Flip the Fleet data set is sourced from almost 200 New Zealand Gen 1.0 (2011 & 2012) owners over the last 5 years. So - the temperatures are specifically calibrated for New Zealand.
The temperature value is derived from
Program now takes 95% of memory. Partly that's due to using 3 different font sizes although I've compacted the fonts to only include the characters needed (using FortForge).
Considering switching over to using the EV-CAN bus (instead of the current Car-CAN bus) as there's better info available about all the CAN codes for the ZE0 model LEAFs. See https://github.com/dalathegreat