User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

SOC-Meter Kit Hardware, Display, and Issues

Mon Jun 20, 2011 12:21 am

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
Last edited by garygid on Sat Dec 24, 2011 2:30 pm, edited 5 times in total.
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
evnow
Moderator
Posts: 11438
Joined: Thu Apr 22, 2010 11:41 am
Delivery Date: 25 Feb 2011
Leaf Number: 303
Location: Seattle, WA

Re: SOC Display Hardware and Issues

Mon Jun 20, 2011 7:24 am

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 ?
1st Leaf : 2/28/2011 to 5/6/2013
2nd Leaf : 5/4/2013 to 3/21/2017
Volt : 3/25/2017 to ?

GroundLoop
Posts: 1725
Joined: Mon Sep 13, 2010 9:31 pm

Re: SOC Display Hardware and Issues

Mon Jun 20, 2011 8:18 am

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.

User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: SOC Display Hardware and Issues

Tue Jun 21, 2011 6:56 am

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.
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
evnow
Moderator
Posts: 11438
Joined: Thu Apr 22, 2010 11:41 am
Delivery Date: 25 Feb 2011
Leaf Number: 303
Location: Seattle, WA

Re: SOC Display Hardware and Issues

Tue Jun 21, 2011 7:33 am

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

Image

one more :

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

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

http://www.axiomatic.com/TDAX050200.pdf
1st Leaf : 2/28/2011 to 5/6/2013
2nd Leaf : 5/4/2013 to 3/21/2017
Volt : 3/25/2017 to ?

User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: SOC Display Hardware and Issues

Wed Jun 22, 2011 4:21 am

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?
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: SOC Display Hardware and Issues

Wed Jun 22, 2011 9:55 pm

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?
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

GroundLoop
Posts: 1725
Joined: Mon Sep 13, 2010 9:31 pm

Re: SOC Display Hardware and Issues

Wed Jun 22, 2011 10:01 pm

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. :)

User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: SOC Display Hardware and Issues

Thu Jun 23, 2011 6:24 am

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!
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12436
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: SOC Display Hardware and Issues

Thu Jun 23, 2011 8:37 pm

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!
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Return to “LEAF CANBus”