SOC-Meter User Guide and Firmware Updates

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.

garygid

Well-known member
Joined
Apr 21, 2010
Messages
12,469
Location
Laguna Hills, Orange Co, CA
The original SOC-Meter was released with firmware version F1.07 installed.
The version number is displayed as the SOC-Meter powers On.

CAUTION: Do NOT press on the display since it is only lightly glued in place.

----------
Operation:
Tap Red to change Modes (different value groups).
Tap Black to change the value displayed.

If installed according to instructions, the two switches are:

1. The Upper is the Power Switch, Up = always On, middle position = off,
and the down (normal) position is "Use the car's Switched Power", or
On when the car is ON. This is the single-pole switch.

2. The Lower is the CAn-bus Selection Switch, with Up = CAN-CAN,
middle = None, and Down (normal) = EV-CAN bus.
This is the double-pole switch.

----------
NOTE: The Hex File for flashing each Firmware version is on-line at
http://www.wwwsite.com/puzzles/socmeter/" onclick="window.open(this.href);return false;

----------
F1.10: (posted 25 Aug 2013, see the link in my Signature, below)

Adds Mode 4 for setting the LED Brightness (now saved in EEprom).
This allows the code to support the origial and the "replacement"
4-digit, 7-segment LED display from SparkFun.

Adds Mode 5 for display of the four Tire Pressures whenever
the CAR-CAN bus is selected (with the Selector switch UP).

The GIDs are now available from either CAN bus.

----------
F1.09: (Released 12 Oct 2012)
Adds display of "Real SOC" to Mode 1.
Adds Mode 3 to F1.08
Speeds up Power-On boot-up.
Displays Charging amps above 99.9 (as when Quick Charging).

Mode 3: LEAF Logging System (LLS) Mode:
V1: Displays only LLS to give the uP more time to Log.

Mode 2: Battery Pack-Output Mode:
V1: Modified Pack Amps, when Regen or Charging, which normally shows
a negative sign (like -99.9 amps to indicate amps in rather than amps out),
to show 100.0 and up with high charging currents, like those from a QC station.

----------
F1.08: (Released 23 Aug 2011)
Adds Mode 2 to F1.07

Mode 2: Battery Pack-Output Mode:
V1: Displays Pack output Amps (Regen or Charging shows a negative sign),
displaying about 200.0 (output) to -99.9 (input) amps.
V2: Displays Volts (about 350.0 to 400.0 volts).
V3: Power Output as kW, about "C99.9" (Charging-in) to P99.9 (Power-out).

----------
F1.07:

Mode 1: GID Mode:
V1: Displays "GID" value (presumed Fuel Amount) as percent of 281 raw.
V2: Displays the "raw" GID CAN-bus data.

Note: Only has one Mode, the Red button does nothing.

----------
 
How to Update the Firmware:
(This assumes that the programming software (AVRdude) has
been installed in the PC, and that the USB programmer has been
"installed" and tested. The new firmware file should be in the folder with the ".bat" file. See the next post.)

1. Disconnect the SOC-Meter from everything.

2. Open the SOC-Meter project box to expose the AVR-CAN board.
Do not pull the AVR-CAN board out of the project box.
Try to NOT DISTURB any of the internal wiring.

3. Carefully plug the 10-pin (5x2) JTAG connector onto the mating socket
that is easily-seen on the exposed surface of the AVR-CAN board.
Note: Observe proper fitting of the key on the cable's connector and
the key-way on the mating on-board (male-pin) connector.

4. Plug the USB Programmer into the PC.
It will power the programmer and the SOC-Meter with 5v.

Note: A jumper on the "mini USB-AVR-JTAG" programmer board MIGHT need to be in the UN-JUMPERED position. However, I just bought another one from another source and it worked with the Jumper ON.

5. Run the "SocMeterUp.bat" file to start AVRdude, which will automatically clear the flash memory, write the new program, read and verify the results, and re-boot the SOC-Meter.

6. Check that the read-back "verification" by AVRdude is OK.

7. Press space to end the ".bat" file.

8. If possible, carefully press the very small "RST" button in a corner of the AVR-CAN board and watch the SOC display to verify that the new Firmware Version number is displayed.

9. Un-plug the USB programmer from the PC. This removes power from the SOC-Meter and the programmer board.

10. Un-plug the JTAG cable from the AVR-CAN board.

11. Check the SOC-Meter's wiring for anything unintended, making sure the AVR-CAN board is properly in place inside the project box.

12. Re-install the lid on the Project Box. Hint: Turn each screw backwards to hear a slight ckick and feel the screw drop a tiny bit before turning the screw forward.

14. Carefully Test the SOC-Meter in the car.
 
Equipment for Updating Firmware:

A: Hardware:

1. Get a "mini USB-AVR-JTAG programmer" board from eBay,
with 10-wire JTAG cable. I got mine from seller "usbflying",
a bit more expensive (about $26), but it was faster shipping from USA stock.
The "same thing" (maybe) appears to be available on eBay from several sources.
For example, for $10 from
http://www.ebay.com/itm/Mini-USB-AVR-JTAG-Programmer-Debugger-for-AVR-ATMEGA-/290557303278" onclick="window.open(this.href);return false;

2. Obtain a Windows PC with a USB port to run the software.

B. Software:

1. I use the AVRdude free "flashing" software, which is included in
(search for) "Portable WinAVR AVR-GCC" at SourceForge.
I downloaded and use the "Portable" version of WinAVR,
which does not need installing, only download and unzip to the root
of some "hard" drive, even a USB flash-drive.

2. A ".bat" file to supply the needed parameters to AVRdude and run it.
I will post this short file.

3. A SOC-Meter firmware ".hex" file, which I will also post.

Probably available as a "kit", but you can order these items yourself.
More details shortly.
 
Assuming you will post where/how to purchase the items in Post #3? Or will you offer as a kit?
I'm happy to do the former--just had a PC built and am now comfortable going inside and adding ports, drives, etc., to the motherboard.
 
Version F1.08 Firmware for the SOC-Meter is waiting for a final test,
and it should be released later today (waiting for glue to set).

Power-Out and Regen-In match the Energy screen fairly well,
except that the SOC-Meter displays total In and Out, which
is not available anywhere else. With A/C off, the match was
closer.

In a one-block uphill acceleration I say 60 kW out, and
in Regen (downhill) I saw about 20 kW, closely matching
the LEAF's Energy Screen, which probably shown Motor
Power IN and OUT, not the Batter Pack In/Out.

After charging to 80% (SOC 81.1%), the Battery voltage is
in the high 300's, maybe around 380, but I do not remember
the exact number.

As Charging to 80% was starting last night, the charging current
seemed to rise over the first 5 minutes (or longer, but I quit watching).

Overall, it looks like some useful data, at least as "real" as the CAN
bus data appears to represents real data.
 
SOC-Meter Firmware Update F1.08 seems to check out OK.

M1: SOC Mode
V1: SOC as % of 281
V2: SOC raw data

M2: Battery Pack-Output Mode
V1: Amps out (and in)
V2: Volts
V3: Power out (and in)

For flashing details, see the first posts of this thread.
 
Wow, I went to ebay tonight to order the AVR programmer board and they were saying 3 weeks for delivery! Do you have any better sources? Looks like they are all coming from China or Malaysia. I shot some cash into my PayPal account but that won't be available for a few days.

Also, which version of the winAVR did you use? Does it need to be portable? I definitely want to add functionality to the SOC Meter...and do trip recording, :LOL:
I was hoping to do it all over Labor Day weekend but not if it takes 3 weeks to get the programmer :(
 
Had the firmware update done on my SOC meter kit. Now showing voltage, amperage, and power/charge in kW

298591_10150295584524844_704969843_7702582_5557504_n.jpg


310107_10150295584659844_704969843_7702584_3301869_n.jpg


315474_10150295584859844_704969843_7702586_3307087_n.jpg
 
Not sure which ser # I have :lol:
but definitely don't want to fall behind. Will work with local LEAFer to get Firmware upgraded in the coming week.
 
The first post here serves as an SOC-Meter User Guide for usage
of the SOC-Meter, describing the operation of the different firmware versions.

CAUTION: do NOT press IN on the display.
It is only "lightly" glued in place.
 
Back
Top