garygid
Well-known member
NOTE -WARNING about the AVR-CAN Board:
As supplied from the factory, the CAN_T solder-jumper is ON, and
usually, for logging of existing CAN buses, we want it OFF.
Many hardware systems read data from the ONE "standard" CAN bus found on modern
ICE vehicles. Many messages are "standardized" and even required, to facilitate
Smog Testing. Other messages are manufacturer-specific, and are used most significantly
for vehicle "adjustments", diagnostics, and trouble-shooting.
Since the LEAF produces no emissions, it does not need to follow the standard, or required,
conventions. So, the 2011 LEAF has THREE CAN busses on the OBD connector, not just one,
and another CAN bus used just for Quick Charging. Most of the ODB2 (ODB II) automotive
CAN-Data Readers do not work with the LEAF, since the LEAF does not use standard messages.
The "Car" bus is PROBABLY similar to what most other vehicles would have, no matter what
engine type: controlling windows, turn signals, dome lights, unlocking doors, start-up
permissions, etc. The EV-CAN buss has messages that are involved with the Electric nature
of the propulsion system: battery, charging, inverter control for motor drive or Regen, etc.
The AV bus has ... well, see page 33 in the LAN section of the LEAF's Service Manual.
We have chosen a medium cost solution that minimizes the construction of hardware,
is supported by Open Source free software, and can easily be scaled from reading one
CAN bus to recover State Of Charge (SOC) to 3 (or even 4) CAN busses for full data
capture, logging, and display of a real-time "dashboard" on the PC.
The AVR-CAN Development Board is about $40, 2" x 3", and contains the Atmel AT90CAN128
micro-processor (uP) and some convenient Input/Output (I/O) ports: RS232 for serial
communication with a PC, CAN transmitter and receiver (transceiver) to "connect" to the car,
and an industry-standard JTAG interface for loading firmware into the on-card uP.
I have posted a list of the equipment and links to sources to buy it,
but I will have to find that post and copy it over here.
Compiling our firmware and writing it into the uP are the two steps that I have not YET fully
described. But, once you have the compiled program (from us), only the loading of the
firmware into the uP will be needed. It APPEARS that only about $20 of extra hardware is
needed for the firmware loading, and local clubs could share one "Loader" board and cable.
-----------------------------------------------------------------------------------
Parts List for 3-channel CAN-Capture:
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.
Note 4: Consider buying a Kit, with "Flashed" AVR-CAN boards.
1. Three AVR-CAN Development Boards, 16 MHz by Olimex.
No longer carried by SparkFun, but there is a link to schematic and documents.
SparkFun sku: DEV-08279
Available as of 21 July 2014 at Mouser:
Mouser Part Number: 909-AVR-CAN
Or, also available from Digikey:
http://www.digikey.com/product-detail/en/AVR-CAN/1188-1012-ND/3471441" onclick="window.open(this.href);return false;
Note: see Correction Note for the AVR-CAN board in this post:
http://www.mynissanleaf.com/viewtopic.php?f=44&t=4439&p=379100#p379100" onclick="window.open(this.href);return false;
2. One HI-SPEED USB TO 4 PORT SERIAL RS232 ADAPTER, about $55
In stock 21 July 2014 at EasySync:
EasySync USB2-H-1004
3. One OBD Cable, with a male OBD connector, 16-wire, 6-foot
(I prefer a right-angle male OBD connector.)
OBD2cables Right Angle, Part number: 142601
OR, a Type B, for slightly more $$
Type B, OBD2cables PN 144507
4. Three Female 9-Pin "D" connectors, with plastic shells:
5. Three 5-volt 1 Watt (or higher) Zener Diodes:
6. Misc: Solder, 2 feet of stranded Wire, heat shrink or other tubing
7. Tools as needed: Screwdriver, soldering iron
8. Wiring Instructions:
9. Get AVR-CAN boards flashed with suitable firmware:
10. Download and use my CAN-Do program to Capture and explore the data.
Runs on a fairly quick Windows XP, Vista, or Win7 system.
See my CAN-Do site: http://www.wwwsite.com/puzzles/cando/" onclick="window.open(this.href);return false;
Note: With WINE, CAN-Do has been run on Ubuntu and MacOS 10.9,
but not yet tried for actually capturing high speed data through
their equivalent of a virtual COMM Port.
--------------------------------------------------------------------------
mod edit : viewtopic.php?f=44&t=4131&p=100361&hilit=firmware#p100361
Wanting the flexibility to program the uP right at the CAN interface
to be able to be an in-car display, and really wanting real-time
display (and Logging) of at least the 3 CAN busses.
1. I ordered AVR-CAN Development Boards from Mouser, $54 + Ship in Q1:
It is a 16 MHz board made by Olimex (see their link below), with an Atmel AT90CAN128 uP.
You would want 1 to 4 of these for monitoring, or just one to add a display
and have a SOC monitor. We are using these today, with our software, to
monitor and log at least 2 of the CAN busses.
I ordered from Mouser because they had them in stock and are usually fast delivery:
http://www.mouser.com/Search/ProductDet" onclick="window.open(this.href);return false; ... 09-AVR-CAN
The board is made by (or for) Olimex:
http://olimex.com/dev/index.html" onclick="window.open(this.href);return false;
Click AVR on the left, and then AVR-CAN in the Development Boards
list on on the left side of the page.
More good pictures at this site, another source:
http://www.sparkfun.com/products/8279" onclick="window.open(this.href);return false;
A Users Manual, from another site:
http://www.olimex.com/dev/pdf/AVR/AVR-CAN.pdf" onclick="window.open(this.href);return false;
Another source, apparently $49 each (but this is only 8MHz, not the 16MHz we want):
(also, this board has different conectors)
http://www.bravekit.com/AVR_CAN_ATMEL_A" onclick="window.open(this.href);return false; ... RS232_UART
Aother description, with a schematic of the board:
http://www.radiolocman.com/op/device.ht" onclick="window.open(this.href);return false; ... 5&/AVR-CAN
The AT90CAN128 uP is described at the Atmel site:
http://www.atmel.com/dyn/products/produ" onclick="window.open(this.href);return false; ... rt_id=3388
2. I ordered the "T" OBD2 Pass-thru Connector and Cable, $21 to USA
All 16 pins are wired.
http://www.carplugs.com/Product_view_Cables_6.html" onclick="window.open(this.href);return false;
The one turbo found above is not a pass-through conector:
http://www.obd2cables.com/products/obd-" onclick="window.open(this.href);return false; ... d-6ft.html
3. I ordered a USB-H-1004 "USB-to 4-Port RS232" (1MHz), about $55 + T&S
http://www.easysync-ltd.com/product/534" onclick="window.open(this.href);return false; ... -1004.html
We have not yet used or tested this piece, but the specs seem to be good
for speed, and I hope to be able to plug in 1 to 4 of the Atmel boards
directly to this "base" to form part of a 1 to 4 channel package that would
monitor the EV, Car, AV, and even QC busses.
I will investigate the firmware Loader for this AVR-CAN board and
report more in a few days. In the mean time, I only need some
9-pin connectors and shells ... and more programming.