A lot of progress has been made on both the hardware and software this month. Let’s cover the software first.
Modifications to the event timer software were made to support LEAFer’s request to support the longer times possible when charging from 120 volts. I took his suggestion of using letters for numbers greater than 9 in order to still fit within the H:MM:SS display space available for time on the 2x16 screen.
This turned into a somewhat major change in the way the event times were saved within the register space. The result being the freeing up of a large number of internal registers. Originally only three bits were available for hours within the two byte time variable but by using a more efficient packing scheme I was able to increase that to five bits for hours while still keeping a two second granularity.
The max time is now 31:59:58 which is displayed as V:59:58. More than enough to cover the time it takes to charge a Leaf battery from empty to full on 120 volts or even 100 volts (i.e. Japan).
With the freed up registers I was able to increase the number of saved events from four to seven. This then required the invention of a way to select more than eight screens. The method I came up with added seven new screens by adding one line of code and using a new flag for history.
Each time the rotary selector is turned fully clockwise so the Debug screen is selected the History flag is toggled ON and OFF. When OFF the first seven screens are for real time data (SOC, Power Bar, Motor RPM). When the History flag is ON the first seven screens display the seven last drive/charge events. This allowed the rotary selector code to remain unchanged.
A side benefit was four new screens for real time data. I just needed to come up with what to display on them. Just as I was finishing this code up Steve Lemke emailed me for a status update and a suggestion he came up with after seeing the new RAV4 EV maximum distance to empty screen.
He suggested I add a screen where I calculated the maximum miles remaining based on current gids and a user selectable mile/kwh number. This sounded like something that could be added since it did not require any additional register space just some calculations and a screen to display it.
Rather than have the user select a miles/kwh number I decided to display a range of five values (4.0, 4.5, 5.0, 5.5, 6.0). With two digits for miles below each number so the driver can see the effect of different driving styles on the remain miles. The final format used the letter scheme for numbers above 99 which is not so important for miles but when I created a kilometer version seemed more useful. Also below 1 mile or km of range the display switches to “.x” to show the last few tenths available.
There are actually three of these “Distance to Event” screens as I am calling them (not to empty). The events are Low Battery warning, Very Low Battery warning and Turtle identified by the letters ‘L’, ‘V’ or ‘T’ in the left most position (at the 49,24,4 gids level).
Here is what it looks like.
Here is the km versions for VLB and Turtle.
So to summaries the improvements:
- Max event timer increased from 8 hours to 32 hours
- History screens increased from four to seven
- Added three ‘Distance to Event’ screens (miles or km) LB, VLB & Turtle
- Total selectable screens increased from 8 to 15.
The next post will cover the hardware status.
Jim