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.
When I re-flash the SOC-Meter, I usually use a USB-powered
programmer, that also supplies 5v to the AVR-CAN board.

Seems to work well for me.

The image in the post above is not displaying here.
Is it too-high resolution?
 
I had thought I had deleted that post since I could not get the image to display.
Still cannot figure out how to delete the post and don't have the time to reduce the image size. I'll try again later.

What it is is a OBD connector to powerpole. I use this since my JTAG programmer doesn't supply power to the unit under test.
It was also nice to be able to perform some smoke test at the bench and not the car.

Carl
 
Once there is a following post, you cannot delete your post.
However, you can edit it, to fix it, or down to a single character to "erase" it.

You probably have a 12v power supply with a PowerPole connector, and made a PP to OBD adapter to plug the SOC-Meter into, right?

Happy Thanksgiving, Gary
 
garygid said:
O
You probably have a 12v power supply with a PowerPole connector, and made a PP to OBD adapter to plug the SOC-Meter into, right?

Happy Thanksgiving, Gary

Yep. Everything I have that is 12v (13.8) is supplied with powerpoles (its a ham radio thing). There is now a link to the image and that seems to work.

And the same to you
 
garygid said:
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.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

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

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Hi,
Anyone have a copy of this bat file they can post or send me?
Mail to: [email protected]
Thanks,
Dan
 
The bat file is generally essentially a 2-line file, with the 2nd line being

pause

to be able to see and read the results of the AVRdude program run (that verification of the data written to flash was OK).

The first line starts with a path to the AVRdude program, and then some parameters for AVRdude to use, the last usually being the path to the "hex" file that one wants written to the AVR-CAN's flash memory.

The other perms depend upon which programmer hardware that you are trying to use.
Hopefully, the two following examples will be helpful.

---------------------
For the USB to JTAG programmer I bought:
(from my file Avrdude_Gg_USB-AVR-JTAG.bat)

Code:
pause

:avrdude.exe -?
:pause

: -p device 
: -P port 
: -v = verbose
: -B bit-clock-period-us
: -U memtype:write:file:format ... flash memory (w=write) i=?
: -c programmer-type

:echo ---
:echo AT90CAN128 = c128
:echo COM5, 19200, xmit Buff = 1 to 16 OK, Rec buff = 1 to 14 OK
:echo programmer = jtag1 or jtagmkI, just verbose, 8 usec/bit
:echo ---

echo   *************************************************
echo   **      flash write spy.hex format=i (Hex)     **
echo   **   Ctrl-Pause (Break) to Terminate Program   **
echo   *************************************************
pause

avrdude.exe -p c128 -c jtag1 -P COM5 -v -B 8 -U flash:w:"D:\Prog\Spy-Gg4p\spy.hex":i

pause

---------------------------------
Another example, for the RS232-to-JTAG that I used before I got the USB programmer:
(from my file Avrdude_Gg_AVR-JTAG.bat)

Code:
pause

avrdude.exe -?
pause

: -p device 
: -P port 
: -v = verbose
: -B bit-clock-period-us
: -U memtype:write:file:format ... flash memory (w=write) i=?
: -c programmer-type

:echo ---
:echo AT90CAN128 = c128
:echo COM5, 19200, xmit Buff = 1 to 16 OK, Rec buff = 1 to 14 OK
:echo programmer = jtag1 or jtagmkI, just verbose, 8 usec/bit
:echo ---

echo   *************************************************
echo   **      flash write spy.hex format=i (Hex)     **
echo   **   Ctrl-Pause (Break) to Terminate Program   **
echo   *************************************************
pause

avrdude.exe -p c128 -b 19200 -c jtagmkI -P COM5 -v -B 8 -U flash:w:"D:\Prog\Spy-Gg4p\spy.hex":i

pause
 
garygid said:
I just included extracts from my BAT files (for programming the
AVR-CAN board) with AVRdude ... in the post above.


Excellent, thank you, and thanks to squirrelmeat for shooting them over in email, the explination from the /? command line helps to show the usage!
Thanks I can now tailor it to my specific hardware and file location.
I am a dos guy from way back and can handle the bat files, programming not so much. I do alot of work in the electronic cigarette forums modding etc. I have two metal lathes, a wood lathe and 400lb mill/drill press I play in mostly stainless steel, but am looking at making an OEM looking SOC-Meter that fits perfectly in the change tray. Would also like to have the flash and logging ports external. Have been playing with vacumn molding also so I should be able to get a custom fit and make it look like it was already part of the car.
Dan
 
Dan,
You might want to leave room/provision for placing a thin filter
over the display, so that it can be read in sunlight.

See my SOC-Meter Filter thread for how to email me, and
I will send you a "frame" (filter holder, not perfect, but
the best I could find online) and a Blue filter.
 
garygid said:
Dan,
You might want to leave room/provision for placing a thin filter
over the display, so that it can be read in sunlight.

See my SOC-Meter Filter thread for how to email me, and
I will send you a "frame" (filter holder, not perfect, but
the best I could find online) and a Blue filter.


Cool thanks Gary, still waiting on parts to come in, I also ordered a wall electric meter from FL, perfect idea for capturing the power expended per month charging.
Cant wait for the parts!
Dan
 
Hi G
I am using the SOC Meter and have a question.
How accurate is your SOC over the GOM as your SOC is always at least 3-4% lower than the GOM when it comes to displaying how much juice is left in the Batteries.

Thanks
 
The GOM shows estimated remaining miles, the SOC-Meter shows the LEAF's internal "gid" value (not miles).

The Fuel-Bars are derived from the "gid" value, we believe.
See TonyWilliams chart for the range of "gids" for each Bar.

When you say that the SOC-Meter is 4% low, what are you comparing to what?
 
roperld said:
What do the two toggle switches on the SOC meter do?

the bottom one switches between data buses. we currently only use the bottom position. hopefully will get access to top bus one of these days
 
mwalsh said:
roperld said:
What do the two toggle switches on the SOC meter do?

I don't remember about the bottom one, but the top one is power on (to use with charging)-off-power on with vehicle operation.

As mwalsh said: upper switch in up position = always on, middle position = off, down position = on when car is on or ready
Lower switch in up position = Car CAN, middle position = off, down position = EV CAN

The push buttons on the top:
Red switch selects one of 2 modes (at present)
Black switch selects different feeds in that mode,

Information the meter shows presently: Mode 1- % of Gids (based on 281 = 100%) and Gids; Mode 2- amps, battery Voltage and power.

The Gids represent the usable SOC.
 
Well done 91040.

Requested braking "force" has been identified on the CAR-CAN bus,
and experimental firmwere displays the Total, Regen, and Mechanical
braking "amounts" (when CAR-CAN instead of EV-CAN is selected).
 
Back
Top