Accessing and programming Canbus on EV's

Mr. Mik

1 kW
Joined
Sep 3, 2008
Messages
390
What would be a good way to analyze, back-up and then possibly re-program a Canbus operated electric vehicle?


Toyota Prius, Honda Civic and Vectrix are examples where the ability to do this would be almost invaluable!


One source for adapters that work with the Vectrix his here: http://www.gridconnect.com/canboandto.html


And the next link is to a DIY project USB/CAN adapter kit with available open source software: http://www.elektor.com/magazines/2008/october/communicating-with-can.684173.lynkx


If those forum members with any Can programming experience could give a basic overview of what the necessary steps would be - that would be much appreciated!

Thanks in advance for your efforts!
 
Does anyone have suggestions how I could best learn how to do this, or whom to ask?
 
Found something interesting and promising:

http://sourceforge.net/projects/cantop/

CANTop is an open source project aimed at creating a powerful graphical interface for CANBUS enabled vehicles. It will be designed specifically for persons looking to do Plugin-Hybrid (PHEV) conversions. QT will be used for the initial interface.
 
My best advice is start learning how to program a microcontroller. Microchip and Atmel should both have microcontrollers with CAN buss hardware, and both should have CAN buss interfacing app-notes in addition to what's on the various microcontroller web boards. My personal microcontroller of choice is the Parallax Propeller. The 8 core architecture combined with software defined peripherals makes it versatile and easy to use. The Propeller Object Exchange has a CAN object for integrating with a CAN physical interface chip (MCP2515) from Microchip.

Marty
 
lawsonuw said:
My best advice is start learning how to program a microcontroller. Microchip and Atmel should both have microcontrollers with CAN buss hardware, and both should have CAN buss interfacing app-notes in addition to what's on the various microcontroller web boards. My personal microcontroller of choice is the Parallax Propeller. The 8 core architecture combined with software defined peripherals makes it versatile and easy to use. The Propeller Object Exchange has a CAN object for integrating with a CAN physical interface chip (MCP2515) from Microchip.

Marty

Thanks Marty!
The propeller chip descriptions sure sound interesting!

And the CAN object would link the propeller with the type of chip on the Vectrix temp sensor PCB:


But I am wondering if it would be better if I try to learn to program PIC microcontrollers?

That's because the other chips on that part of the Vectrix BMS-PCB are:

PIC16F677 -1/SO (e3) 0712208 -------- (next to temp sensor cables, 10 pins x 2)

MCP2515 I/O(e3) 07145C2 --------- (9 pins x 2)

R100BTB71 --------- (Silver oval object)

MCP2551I SN(Symbolincircle)0710 (Symbol)1Y9 ------- (4 pins x 2)

So I assume that inside the Interface Control Module (ICM) of the Vectrix there will be more similar microcontrollers, which probably hold the information / programming for the charger and the motor and whatever else.

Would the Propeller programming experience help with this? Or would I be better off learning to program PIC from the start?

They do sell a PIC programming learning kit at Jaycar (Australian electronics chain).

One programming project which I would like to do is to build something that measures dozens of voltages (through the cables to my Manual BMS for the Vectux) and activates an alarm light or display when the voltage drops below a programmable value (due to reverse charging of a single cell anywhere in the 102-cell string).

Am I right assuming that this could be done with either PIC or Propeller microcontrollers?
 
looking at those chips.
MCP2551 is a buss driver, it generates the proper voltages and currents to drive a CAN buss.
MCP2515 looks like it handles all the low level packet formatting, acknowledges, retry, CRC, etc. (assuming CAN has all that)
the silver can is a crystal, it provides the clock frequency for everything.
PIC16F677 is of course the microcontroller. Google it's datasheet for the gory details.

PIC/Atmel Vs Propeller. It really comes down to what you want to do. If you're making 10,000+ of something the $3 PIC is a no brainer, at this point development cost is dwarfed by unit cost. If you're just making one of something, the "cheapest" solution is the solution most familiar or easiest to learn. (you're time ain't free!) On this front the Propeller (more specifically Parallax products) wins hands down in my opinion. It's a simple chip to understand and setup, extensive documentation is provided, the online support and forum are at least as busy and helpful as endless-sphere. It also pretty much works right out of the box, no need to setup make files, headers, or decode library documentation just to make it blink an LED. It also depends on how much you'd like to happen at once. On a PIC it's easy to do one, maybe two things at once. With the Propeller up to eight tasks are easy, and getting the Propeller to do nine things at once is no harder than getting the PIC to do three at once. Also, the Propeller has more room for "feature creep" that always happens with a project.

As far as PIC programming being more useful on the Vectorix that depends on if the PICs used are flash or rom based. If the PIC is flash based you have a chance of reprogramming it with new features, but you're not going to be able to extract the current code to hack on and extend.

Marty
 
Thank you very much, Greg and Marty!
 
I found the photos I took when the Vectrix tech was updating the software on my scooter:

Click to enlarge, please.

It looks as if the Scooterdiagnostic software uploads a hex file to the scooter when the software is updated.

I wonder if these hex files could be recreated by logging the CANBus traffic during scooter operation.
http://en.wikipedia.org/wiki/.hex

Or maybe one would need an original hex file to analyse it and then possibly edit it to effect changes?
 
Here is a most interesting Website regarding CANBus on vehicles:

http://www.canhack.de/index.php

(It's in German)
 
Back
Top