SOC-Meter Kit Hardware, Display, and Issues

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 SOC-Meter system generally uses:

1. A connection to the LEAF's EV-CAN buss, most conveniently through the LEAF's OBD connector. A 6-foot (or 9-foot) OBD cable with 16-wires (one wire to each OBD connector pin) is about $13.

2. One female 9-pin "D" connector, soldered to (the correct) wires from item #1.

3. The AVR-CAN (about $55), with suitable firmware "flashed" into its uP.

4. A supported display (perhaps $10 to $20) to see the SOC value. Connection varies from 3 wires (for a UART-serial LED display) to a short ribbon cable and 34-pin connector (about 11 wires connected) to allow the AVR-CAN to control the display.

5. On LCD displays, usually three wires and a "pot" to control the display contrast.

6. A suitable housing, with holes for mounting the display, the pot (if used), an On/Off switch, and a possibly a grommet for the "OBD" cable entrance. Perhaps 4 rubber feet.

7. Possibly a couple of other parts to STOP the LEAF's charging when the SOC goes over a selected limit. :D

--------------------
Parts and Sources used in our SOC-Meter Project Kit

Note 1. Always check stock before ordering.
Note 2: Sometimes Shipping and Handling charges can be substantial.
Note 3: Ordering in quantity for your Local LEAF Cluster or Branch might help.
-----------------

1. 7-Segment Serial Display: 4 character, 10mm high, about $13 each.
Very easy to interface, 3 wires: Control, 5v, and Ground.

Yellow - COM-09764
Blue - COM-09765
Red - COM-09766
Kelly Green - COM-09767 (not recommended)
We are using primarily the Red and Blue units, but also a Yellow unit, but ordered all four types from this source.

2. One AVR-CAN Development Board, 16 MHz by Olimex, about $55
In the Kit, this board is flashed with our last-release SOC-Meter firmware.

Mouser Part Number: 909-AVR-CAN

Note: SparkFun no longer sells this item.
SparkFun sku: DEV-08279


3. Project Box: a 3.97" X 2.12" X 1.72" black ABS plastic project enclosure.

All Electronics Cat# MB-132, about $3

4. One OBD Cable, 16-wire, male OBD connector
I suggest a 6-foot cable, right-angle OBD connector

OBD2cables Part number: 142601 6-foot (about $13)
or
PN 142602 (same as 142601 except a 9-foot cable)
or
Type B, OBD2cables PN 144507

5. Toggle Switches:
The SOC-Meter has an option to use one or two switches (two suggested):

A. One On-Off-On SPDT mini toggle switch for the Power On/Off/Automatic Modes
All Electronics Cat# MTS-5

B. One DPDT mini toggle switch for the EV/CAR CAN-buss Selector Option (recommended)
All Electronics Cat# MTS-12

6. Pushbutton Switches: momentary on, normally open, miniature, panel mount
The SOC-Meter uses one Red pushbutton (top, left) and one Black pushbutton (top, right).

Radio Shack 275-1547
This is a package of 4 for under $4, two with red caps, and 2 with black.
However, as of 23 Dec 2011, Radio Shack online is out of stock.

So, I have ordered similar, possibly even better push buttons at:
All Electronics Cat# MPB-1B (Black cap)
and
All Electronics Cat# MPB-1 (Red cap)

7. Zener Diode: one 5-volt 1-Watt zener

All Electronics Cat# 1N4733 (or equivalent) 5 for $1

8. Connector Blocks:

A. connects the Display to 3 of the EXT2 connector's pins.
B. connects the two Pushbuttons to 3 of the EXT2 connector's pins.

A 1x6 Connector Shell
A 2x4 Connector Shell
Wires with Female Pins

9. Misc Items: Stranded Wire, heat-shrink tubing, electricians tape, "glue", ...

10. Instructions:

Not included in the kit: Tools: Soldering iron, wire cutter and stripper, drills and sharp hobby knife
 
Would it be possible to get an off the shelf OBDCAN that can take any code and display it - change the cable to EV-CAN rather than usual CAN bus ?
 
OBD codes (PID codes) are completely different than generic CANbus messages.

If you buy anything, make sure it can decode standard CAN (11-bit address) messages. Then it would have to pick out the bits of data you're interested in and display those.

The cable problem is an interesting one for EV-CAN. As far as I know, there is no existing nice molded cable that will bring out the pins we need on the DLC connector to the pins we need on a DB9.

I suspect the eventual "kit" will consist of a device with TWO can bus receivers, a custom cable, and the other stuff. Custom cables in small quantities aren't cheap, so then I'm looking at the generic connector housings with loose DIY pins. I built two of those, but they're work to make and don't look all that "pro" when finished.

Also, bringing it out to two DB9 plugs is a bit hokey, but what can you do.

Still looking.
 
1. In an eventual kit, one might be able to use a 16-wire OBD extension cable to an OBD connector on/in the Decoder/Display box.

Or, soldering 4 wires might be needed.

That's what makes it a "kit", right? :D

2. I just ordered some serial-input, 4-character, 7-segment LED (can be bright) displays from
http://www.SparkFun.com
that might be suitable, even good (very readable), for the SOC display.
Search for "7-segment serial" and the 4 colors of displays are about $13 each.

I hope to have this LED display working by this Saturday.

3. We will also be experimenting (not this week) with a graphical display suggested by Chris that includes a mini-SD card.
 
This seems to be an off the shelf system - taking CAN thr' rs232 with built in LCD & PC interface.

http://www.can-display.com/index.htm

CanDispInd.jpg


one more :

http://www.axiomatic.com/display.html

3 RS-232 ports, 2 CAN ports, Ethernet, 2 USB ($$$ ?)

http://www.axiomatic.com/TDAX050200.pdf
 
1. evnow, nice find, but no prices or ordering info.

2. Looks like my 7-segment LED displays from SparkFun will not arrive by Friday.

So, we will attempt to get the (harder-to-interface) 2-line LCD working with the AVR-CAN Development Board for Saturday.

3. I will also look for a suitable little plastic box, APPROXIMATELY 3.75" long, 1.75" high and 1.25" deep ... I do not have the exact dimensions yet. Any good, but inexpensive sources?
 
1. I ordered some plastic boxes, which should be delivered Friday.

2. The 7-seg displays went through Denver at 9 pm Tuesday, so ... they MIGHT make it Friday. The code is ready, I think ... at least it compiles and links with WinAVR.

3. MY first attempts at writing the AVR-CAN's Flash memory with WinAVR did not succeed. I am attempting to use a board bought through ebay, described as compatible with the AVR-JTAG ICE and supported by the "latest version" of Atmel's AVR Studio. So, I am installing AVR Studio 5 on Vista now.

Any suggestions on successful flashing?
 
I have the STK500 kit from Atmel from a while back.. it flashes anything using AVR Studio.

I actually prefer the AVR ICE-Cube from ecrostech.com, very nice.
I haven't tried it on the AT90CAN128 yet. Tomorrow.
I have a Proconx XNUT-105 as well that would be handy (ethernet! Dual RS-232, etc) but too expensive for this application.

Arduino beats all for easy programming. :)
 
For flashing (writing program into) the AT90CAN128 on the AVR-CAN Development Board:

I have the USB-connected AVR-Dragon, but I have not tried it yet. Apparently it has several modes of operation that one must choose between.

I have a simple RS232-connected AVR-JTAG-ICE clone (ebay 300563945188, $13 plus $5 shipping) but it is not clear WHAT version of AVR-JTAG-ICE it is "equivalent" to.

So, using WinAVR's AVRdude, I tried device "jtag1" (on COM5 via a USB-to-RS232 adapter), but it did not sync and connect.

I installed AVR Studio 5 last night, but it was not clear how to just try to flash a uP.

Clearly, I am missing some experience with AVRdude and AVR Studio (assuming the ebay card actually works).

Help appreciated, thanks!
 
Got AVR-Dragon working on Windows with AVRdude, it requires "libusb" to be installed, and used to "identify" the USB-connected AVR-Dragon card. Only then will AVRdude "find" AVR-Dragon.

Then, I used dude and dragon to flash the uP on my AVR-CAN board. It Worked!
 
Our SOC-Meter seems to work, showing the "raw" data value "0214" on the 4-digit 7-segment LED display. It Works!

Now, I need to show the SOC as a percentage, remove the leading zeros, and package it into a small box.

I intend to bring/show it at the SoCal Gathering (breakfast buffet) on Saturday, 25 June.

No, it is not UL listed, but devices with no voltages over about 24 volts do not require UL listing.
 
Our SOC meter is now in a box, though not with the final OBD cable.
However, it will plug into the OBD port, and shows the SOC in percent,
currently usig the magic "281" raw value as 100 percent.

I drove starting at 75% this morning, arriving home with 22% showing.

I just started a full charge from 22% and it should gain about
1% every 6 minutes while doing 240v 12A (Mod-L1) charging.

I will bring it tomorrow to our Gathering in Santa Ana.
 
Current SOC meter configuration:

1. OBD cable, conecting 4 wired to a 9-pin "D" conector.
2. The AVR-CAN board, flashed with our version 4.09 firmware.
3. A 4-digit LED display, connecting three wires to the board.
4. A plastic box, cut a hole for the display, and one for the cable.

Open Questions:
1. Connect to Always-On power, or to the "switched" 12v on the OBD conector.
I will use the switched if that is "live" while charging.
Otherwise, I will add a miniture Power On/Off toggle switch.

2. Is the value 281 the correct 100% raw-data value?

3. How does this "100%" SOC value change as battery capacity decreases?

4. Are there other values (like tire pressure) that one should rotate through?
 
garygid said:
Open Questions:
1. Connect to Always-On power, or to the "switched" 12v on the OBD conector.
I will use the switched if that is "live" while charging.
Otherwise, I will add a miniture Power On/Off toggle switch.


I would absolutely stay away from yet more buttons to push to get this tug underway. Switched power.


2. Is the value 281 the correct 100% raw-data value?


I guess we need more average data to get a "100%", but I think I'd just use 281 and if it does go higher, just make that 100.1%, etc. Likewise, 271 would just be 96.44%.


3. How does this "100%" SOC value change as battery capacity decreases?


I'd just keep 281 as 100%. That way, you can watch the battery "break in" from 270-ish to 281 (to 100%), and also watch it as it degrades over the years.


4. Are there other values (like tire pressure) that one should rotate through?


If you have the data, why not? Unless you're talking about an automatic rotate through, which I wouldn't be crazy about.
 
garygid said:
4. Are there other values (like tire pressure) that one should rotate through?
Yes - add a button to rotate values through ?

But, currently I don't think we have anything else that is useful enough ...
 
evnow said:
garygid said:
4. Are there other values (like tire pressure) that one should rotate through?
Yes - add a button to rotate values through ?

But, currently I don't think we have anything else that is useful enough ...


I like it. Simple enough that normally it would be on SOC / whatever is primary, and then when the urge arrives, cycle through the other data.

Part of the cycle through that I'd want is RANGE. So, battery value 281 = 100% = XX miles at 70mph highway, YY miles at 60mph highway, ZZ miles at 50mph highway, AA miles City, BB miles at 38mph.
 
Charging is up over 98% now, so over 275 I think.

I think keeping my "100%" conversion factor constant is good, but I wonder what Nissan does with their SOC value.

For example, after the "capacity" loses 2 bars (presumably about 16% loss), will a "full" charge still go to 281 (100% or present battery capacity as 12 Bars), or will it just go to a number like 83%, corresponding to e-fuel level (SOC) of 10-Bars?

We shall see.
Maybe we can find a CAN-value for the "present capacity".

I am looking for a good source for a right-angle male OBD plug, with "shell".
 
Back
Top