ElectricMotorcycleForum.com

Makes And Models => Zero Motorcycles Forum | 2012 and older => Topic started by: Doctorbass on September 10, 2012, 09:51:15 AM

Title: The ZERO CanBus communication protocol
Post by: Doctorbass on September 10, 2012, 09:51:15 AM
The communication between diverse parts of the zero electrical system is done with CanBus protocol.

I just wonder if someone ever tried to communicate  and get some data from the zero system like the battery or dashboard or other with these CAN to USB adaptor... or even the OBDII adaptor ?

I have spoke with someone that apparently succeded to change some parameter of his zero with the cable adaptor and a PC... it would be interesting to try!


Doc
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 10, 2012, 06:10:09 PM
Yes, in fact i would deem this cable as essential to have as the bikes with encoder or controller eeprom drift get higher mileage.  Being able to recalibrate the motor to the controller when out somewhere is absolutely essential.  Zero will probably start selling these cables with the bikes.  Since I have been able to recalibrate anywhere now, the bike runs great!

That is through the OBDII port.  Through the BMS port you can get the battery info.  I had an odd situation where I started to lose power (not a cut out, just a loss of power) the other day with about half the fuel guage remaining.  Then it did cut out and flashed a few codes at me and the pack went from half to empty instantly skipping over all the bars in between.  I pushed it to a house and asked to plug in for a bit to get home.  I was able to pull this data to find a cell that was a lot lower than the others:

"ZERO BMS> balance
  -   Bank  Voltage(mV)  Diff(mV)   Graph
    -   01        3455       192    --------------------------|
    -   02        3451       188    --------------------------|
    -   03        3399       136    -------------------|
    -   04        3410       147    --------------------|
    -   05        3388       125    -----------------|
    -   06        3414       151    ---------------------|
    -   07        3446       183    -------------------------|
    -   08        3434       171    -----------------------|
    -   09        3409       146    --------------------|
    -   10        3424       161    ----------------------|
    -   11        3418       155    ---------------------|
    -   12        3405       142    --------------------|
    -   13        3378       115    ----------------|
    -   14        3263         0    -|
    -   15        3293        30    -----|
    -   16        3334        71    ----------|
    -   17        3373       110    ---------------|
    -   18        3444       181    -------------------------|

  - Highest Bank :  01 (3455 mV)
  - Lowest Bank  :  14 (3263 mV)
  - Imbalance    : 192 mV"

Then I reviewed the log to see if I could find what happened:

"ZERO BMS> eventlogdump

*************************************************************
*                        Event Log                          *
*************************************************************
Printing 5806 of 5806 log entries..

 Entry    Time of Log            Event                      Conditions
...
...
...
05686     09/08/2012 17:38:50   Discharge level            065 AH, SOC: 46%, I:  0A, L:3424, l:3424, H:3483, B:059, PT:031C, BT:034C, PV:62373, M:Idle
 05687     09/08/2012 17:42:26   Bike Turned On
 05688     09/08/2012 17:42:28   Discharge level            065 AH, SOC: 46%, I:-13A, L:3426, l:3383, H:3485, B:059, PT:032C, BT:032C, PV:62418, M:Bike On
 05689     09/08/2012 17:43:28   Discharge level            065 AH, SOC: 46%, I:-12A, L:3399, l:3359, H:3472, B:073, PT:032C, BT:034C, PV:62107, M:Bike On
 05690     09/08/2012 17:44:28   Discharge level            065 AH, SOC: 46%, I:186A, L:3118, l:3712, H:3294, B:176, PT:031C, BT:035C, PV:58326, M:Bike On
 05691     09/08/2012 17:45:28   Discharge level            067 AH, SOC: 44%, I: 60A, L:3003, l:3214, H:3324, B:321, PT:031C, BT:033C, PV:58193, M:Bike On
 05692     09/08/2012 17:46:28   Discharge level            067 AH, SOC: 44%, I:-13A, L:3260, l:3215, H:3435, B:175, PT:031C, BT:034C, PV:60920, M:Bike On
 05693     09/08/2012 17:47:18   Discharged To Empty        068 AH, SOC: 44%,         L:2763,         H:3284, B:521, PT:032C, BT:033C, PV:56694
 05694     09/08/2012 17:47:28   Discharge level            120 AH, SOC:  0%, I: 53A, L:2715, l:3065, H:3287, B:572, PT:032C, BT:034C, PV:56636, M:Bike On
 05695     09/08/2012 17:47:53   Bike Turned Off
 05696     09/08/2012 17:47:54   Discharge level            120 AH, SOC:  0%, I:  0A, L:3018, l:3018, H:3384, B:366, PT:032C, BT:033C, PV:59196, M:Idle
 05697     09/08/2012 17:48:24   Bike Turned On
 05698     09/08/2012 17:48:25   Discharge level            120 AH, SOC:  0%, I:-12A, L:3093, l:3013, H:3401, B:308, PT:032C, BT:033C, PV:59707, M:Bike On
 05699     09/08/2012 17:48:39   Bike Turned Off
 05700     09/08/2012 17:48:40   Discharge level            120 AH, SOC:  0%, I:  0A, L:3112, l:3112, H:3406, B:294, PT:032C, BT:033C, PV:59843, M:Idle"

This was very useful as it looks like at 5:47 PM after riding for 5 minutes the cells in bank 14 went from 3.4 volt to 2.7 volts.  But that can't be possible so i am going to try to balance the pack and keep checking to see if there is a short, the volt sensor is faulty, or there is a shorted or bad cell.  But without diagnostics when relying on bleeding edge technology that isn't quite bulletproof yet, you are helpless.  I'd recommend a small laptop and serial to USB cable for everyone to carry with you every where you go just in case.  I'm between 9,000 and 10,000 miles on the 2012 ZF9 now and the past 1,000 miles would have been impossible without it.
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 10, 2012, 06:41:05 PM
Was able to snap a shot crossing the 9000 mile mark the other day.   the 134 is not the miles on the fuel guage, its the miles since my last recalibration.  I'm trying to keep a running log to see if there is a pattern to how long it goes before the sin_min values need recalibrating.  It really helps to be able to do this where ever you are when it happens.  Another reason to keep a communication cable with you at all times!  Anyone know if there is a serial terminal communication app for the iphone?  How cool would that be??  Being able to do all the diagnstics, check the battery banks any time, any where right from your phone.  Somehow i see this happening soon as it just makes sense.
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 10, 2012, 07:23:23 PM
I haven't tried this, but you should be able to do it on Android, see Serial Terminal:
http://www.thepowerbase.com/2012/06/getting-work-done-on-android/ (http://www.thepowerbase.com/2012/06/getting-work-done-on-android/)

The Zero USB to RS232 serial console cable uses an FTDI chip so it should work with that app. Alternatively, Android supports Bluetooth serial profile.

iOS devices that support Bluetooth 4 may also work. iPhone 4S, iPad 3. See here (http://diydrones.com/xn/detail/705844:Comment:923122)
http://diydrones.com/forum/topics/who-wants-a-iphone-app-used-as-a-ground-station-with-mavlink (http://diydrones.com/forum/topics/who-wants-a-iphone-app-used-as-a-ground-station-with-mavlink)
http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/ (http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/)
Title: Re: The ZERO CanBus communication protocol
Post by: Doctorbass on September 10, 2012, 10:14:46 PM
I haven't tried this, but you should be able to do it on Android, see Serial Terminal:
http://www.thepowerbase.com/2012/06/getting-work-done-on-android/ (http://www.thepowerbase.com/2012/06/getting-work-done-on-android/)

The Zero USB to RS232 serial console cable uses an FTDI chip so it should work with that app. Alternatively, Android supports Bluetooth serial profile.

iOS devices that support Bluetooth 4 may also work. iPhone 4S, iPad 3. See here (http://diydrones.com/xn/detail/705844:Comment:923122)
http://diydrones.com/forum/topics/who-wants-a-iphone-app-used-as-a-ground-station-with-mavlink (http://diydrones.com/forum/topics/who-wants-a-iphone-app-used-as-a-ground-station-with-mavlink)
http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/ (http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/)

Ok but whi talking about RS232 when the comm protocol is CANBUS ? I mean canbus is working with 2.5V to 0 and 5V and  the RS232 is between 0 and 5V... :-\
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 10, 2012, 10:39:53 PM
Yeah, we're really talking about two different things. offthegrid is talking about the Zero serial console which talks RS232. Zero's dealer support kit has a CAN interface cable, but as far as I know that software is unavailable to mere customers.
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 10, 2012, 10:54:40 PM
Also, regarding the pack balance issue - there's a command to forcibly rebalance the pack. Normally the pack should stay in balance when charged overnight - but if it isn't allowed to balance or isn't balancing for some reason, you could have one cell or a group of cells that's being drawn down much farther than the others. You could also have a cell that is starting to fail - which would be very early, you're probably around 150 100% cycles on the pack - so I'd see if you can get it to balance and then monitor it over time to see if it quickly unbalances again.
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 11, 2012, 03:22:44 AM
Great idea protomech! I forgot about the command to rebalance! But how does it work? I mean what type of BMS does the zero have? I always used 24 individual 3.65 volt chargers on the headways to balance, and I know the delta q just charges cc to 74.7 then CV and so doesn't account for a cell that reaches peak voltage sooner.  Is it a resistor BMS on each cell that bleeds power over 4.15v?  How does the command balance the pack if the charger isn't charging?  But I should start doing this as I can't charge overnight. There is no sun (solar) my house is off the grid.  So as soon as the green lights start flashing on the Quiq I usually unplug as I'm usually waiting.  Probably why my pack is out of balance. But the sudden drop from 3.4v to 2.7v? Lol never seen that before!
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 11, 2012, 04:33:25 AM
I don't know the details of how Zero's BMS works - it may only balance while the charger input is hot.

Quote
05686     09/08/2012 17:38:50   Discharge level            065 AH, SOC: 46%, I:  0A, L:3424, l:3424, H:3483, B:059, PT:031C, BT:034C, PV:62373, M:Idle
 05687     09/08/2012 17:42:26   Bike Turned On
 05688     09/08/2012 17:42:28   Discharge level            065 AH, SOC: 46%, I:-13A, L:3426, l:3383, H:3485, B:059, PT:032C, BT:032C, PV:62418, M:Bike On
 05689     09/08/2012 17:43:28   Discharge level            065 AH, SOC: 46%, I:-12A, L:3399, l:3359, H:3472, B:073, PT:032C, BT:034C, PV:62107, M:Bike On
 05690     09/08/2012 17:44:28   Discharge level            065 AH, SOC: 46%, I:186A, L:3118, l:3712, H:3294, B:176, PT:031C, BT:035C, PV:58326, M:Bike On
 05691     09/08/2012 17:45:28   Discharge level            067 AH, SOC: 44%, I: 60A, L:3003, l:3214, H:3324, B:321, PT:031C, BT:033C, PV:58193, M:Bike On
 05692     09/08/2012 17:46:28   Discharge level            067 AH, SOC: 44%, I:-13A, L:3260, l:3215, H:3435, B:175, PT:031C, BT:034C, PV:60920, M:Bike On
 05693     09/08/2012 17:47:18   Discharged To Empty        068 AH, SOC: 44%,         L:2763,         H:3284, B:521, PT:032C, BT:033C, PV:56694
 05694     09/08/2012 17:47:28   Discharge level            120 AH, SOC:  0%, I: 53A, L:2715, l:3065, H:3287, B:572, PT:032C, BT:034C, PV:56636, M:Bike On
 05695     09/08/2012 17:47:53   Bike Turned Off

You've probably deciphered this, but here's my take:

05686 // log number
09/08/2012 17:38:50 // datetime, may or may not be set to proper local time
Discharge level 065 Ah // pack capacity consumed
SOC: 46% // (55 Ah / 120 Ah = 45.8% SOC)
I: 0A // pack current, no present discharge
L:3424 // low bank millivolt
l:3424 // other millivolt? not sure what's going on here - you see it jump from 3.383 to 3.359 then 3.712 under moderate discharge. sometimes l is lower than L or higher than H.
H:3483 // high bank millivolt
B:059 // no clue
PT:031C // pack temp
BT:034C // BMS temp
PV:62373 // pack voltage in millivolt
M:Idle // bike mode

The first couple of log entries 1/minute show the low bank dropping from 3.426V to 3.399V to 3.118V (186A, 1.5C discharge) to 3.003V (60A, 0.5C discharge). Low bank voltage springs back up to 3.260V under the -13A discharge (slight regen?) .. then drops down to 2.763V under small discharge (0.5C). The bike then flags the battery SOC at 0%, even when the voltage level rises after being turned off.

Take a look at the following. Average 16 is the average voltage of the mid 16 banks (excluding high, low). Average 18 is the average voltage of all banks.
Code: [Select]
Current Low High Pack Avg 16 Avg 18
0 3424 3483 62373 3467 3465
-13 3426 3485 62418 3469 3468
-12 3399 3472 62107 3452 3450
186 3118 3294 58326 3245 3240
60 3003 3324 58193 3242 3233
-13 3260 3435 60920 3389 3384
2763 3284 56694 3165 3150
53 2715 3287 56636 3165 3146
0 3018 3384 59196 3300 3289

Under a 53A discharge where the low bank hits 2.715v, high bank 3.287V, the rest of the pack is averaging 3.164v. This is lower than the 186A discharge 3 minutes earlier @ 3.118V, 3.294V, 3.240V earlier. With the 1 minute resolution it's impossible to know whether the bike had just been hit hard at step 05694 and had sagged pretty low, and was just then coming back up.. or whether the entire pack was nearly fully discharged.

I wonder if perhaps the SOC meter got confused and thought the bike was fully charged when it was only 55% charged. 3.16V for the pack average excluding high/low with a 0.5C discharge is pretty close to the end, EIG recommends a 3.0V limit for discharge and a lower cutoff voltage of 2.5V.

Maybe arrange alternate transport and leave the bike plugged in for a day, verify that it has balanced then ride it for a couple of days and see if the bike is discharging unusually quickly, the SOC display bars are being removed at an uneven or unusual pace, or the range is unusual. If any of these is true you might want to give Zero a call.

Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 11, 2012, 07:45:15 PM
It seems B = H - L or the difference between the highest cell and lowest.  

ex.
 05688     09/08/2012 17:42:28   Discharge level            065 AH, SOC: 46%, I:-13A, L:3426, l:3383, H:3485, B:059, PT:032C, BT:032C, PV:62418, M:Bike On

H:3485 - L:3426 = B:059

05694     09/08/2012 17:47:28   Discharge level            120 AH, SOC:  0%, I: 53A, L:2715, l:3065, H:3287, B:572, PT:032C, BT:034C, PV:56636, M:Bike On

H:3287 - L:2715 = B:572

I'm guessing "B" stands for "balance"

I agree with the rest of your analysis on the data though. I was thinking the same.  And you're right I need to do a full pack balance and keep a close eye on the low bank.

I think the command is "dobalance" but I don't know how it works or what the conditions are to use it.  Anyone out there know?  I definitely don't want to do anything before I understand exactly how it works. 

We need the company Haynes or Chilton to print a service manual for the bike, or a factory service manual like Ive had for every motorcycle I've ever owned.  This is the weak link right now until there is a wide spread dealer network in every city, which might take a very long time.
Title: Re: The ZERO CanBus communication protocol
Post by: ColoPaul on September 16, 2012, 08:23:41 PM
The Zero USB to RS232 serial console cable uses an FTDI chip so it should work with that app. Alternatively, Android supports Bluetooth serial profile.

Hi Protomech, Offthegrid.
   Where did you get this "Zero USB to RS232 serial console cable"?
   Where are you plugging in?  Is there a standard RS232 port or USB port somewhere on the bike?

   
   
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 17, 2012, 06:22:52 PM
Colopaul, it is part of their diagnostic kit.  There is a port for the bms near the sight glass behind the rubber plug and one for the main bike board which looks like an OBDII port but only uses 4 pins.  Your dealer can pull this information for you.

Well I went from 576 mv out of balance, to 192 mv out of balance, to after working on it hard for a few days, I am now only 4 mv out of balance!!! 

"  -   Bank  Voltage(mV)  Diff(mV)   Graph
    -   01        4108         4    -----------------------------|
    -   02        4107         3    ---------------------------|
    -   03        4106         2    --------------------------|
    -   04        4104         0    -----------------------|
    -   05        4106         2    --------------------------|
    -   06        4106         2    --------------------------|
    -   07        4106         2    --------------------------|
    -   08        4106         2    --------------------------|
    -   09        4107         3    ---------------------------|
    -   10        4107         3    ---------------------------|
    -   11        4106         2    --------------------------|
    -   12        4106         2    --------------------------|
    -   13        4107         3    ---------------------------|
    -   14        4105         1    ------------------------|
    -   15        4107         3    ---------------------------|
    -   16        4106         2    --------------------------|
    -   17        4106         2    --------------------------|
    -   18        4107         3    ---------------------------|

  - Highest Bank :  01 (4108 mV)
  - Lowest Bank  :  04 (4104 mV)
  - Imbalance    :   4 mV

  - Load Resistor States
  - Cell: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18
  - Res :  1  1  0  0  0  0  0  0  1  1  0  0  1  0  1  0  0  1 "
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 17, 2012, 09:07:46 PM
offthegrid,

After balancing have you found that the range has returned to normal? Has it eliminated the sudden drop from 50% to 0% indicated charge?
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 18, 2012, 01:40:18 PM
offthegrid,

After balancing have you found that the range has returned to normal? Has it eliminated the sudden drop from 50% to 0% indicated charge?

Yes, the bar's don't seem to last any longer (still 5-10 miles per bar depending on the riding I'm doing) although the first bar used to go away a lot faster 2-3 miles, yesterday I went 13 miles before the first bar disappeared (when ever i first ride I always ride as conservative as possible to see how far I can go, but somehow that philosophy always goes out the window as soon as im in a hurry or something and I become a throttle abuser).  And I haven't checked the range yet as I'm always topping off and balancing lol, I've become almost obsessed with this and wish i had known about how bad the pack can get out of balance sooner.

If you can leave your bike plugged in overnight, you shouldn't have anything to worry about.  But after almost 10,000 miles of basically never plugging in over night my pack had really gotten out of wack.  The difference between my highest cell and my lowest cell at one point was 576 mv or almost 0.6 volts.  It is now 0.004 volts.   Big difference!
Title: Re: The ZERO CanBus communication protocol
Post by: Doctorbass on September 19, 2012, 09:45:30 AM
All my 11 bar dissapear at 50% Ah consumed ( i have 59.8 real usable Ah before a cell bank goes to 3.00V) and at 30Ah used all the bar are dissapeard... but the bike run anyway... for the rest of the 59.8Ah... it's just the bar that dont match the real capacity?
Btw i measure 3.00 kWh for 59.8Ah 100% DOD

how to recalibrate the bars? is it thru the MBB or the same way than to recalibrate the speedo by pressing some button following precise steps?

Doc

Title: Re: The ZERO CanBus communication protocol
Post by: Joseph on September 21, 2012, 11:24:42 PM
Thank you for the usefull information.
With the intention of getting better information about powerconsumption and especially remainig energy and range,
i am searching for useable sensors.
offthegrid wrote: "..There is a port for the bms near the sight glass behind the rubber plug and one for the main bike board which looks like an OBDII port but only uses 4 pins."
If there is a connetcable CAN-bus in ZERO S 2012, the desired informations can be read out by an approporate Equipment.
This Equipment is easy to built (Microcontroler an LCD-Display).
I found the bms port, but not the OBDII port on the main bike board.
Very useful would be the pin assignement of CAN-connectivity.

kind regards,
Joseph
Title: Re: The ZERO CanBus communication protocol
Post by: BSDThw on September 23, 2012, 12:20:46 AM
Standing in front of your bike looking at the left side under the tank you see the OBDII.

It is covered.

Pin 6 is CAN high
Pin 14 is Can low

It is the standard on the OBDII and Zero did it in this way.

Title: Re: The ZERO CanBus communication protocol
Post by: Joseph on September 23, 2012, 03:16:42 AM
BSDThw, thank you very much for the information.
I will report as soon as i am successfully in evaluating the CAN-protokol of ZERO S 2012.

kind regards
Joseph
Title: Re: The ZERO CanBus communication protocol
Post by: BSDThw on September 28, 2012, 12:37:54 AM
Does somebody know the RS232 connection?

I can't ask my dealer, because he is still waiting for the Software/Cable him self.

Why do you use a RS232 to USB? (OK if your Laptop has none, but are there any other reason?)
Title: Re: The ZERO CanBus communication protocol
Post by: protomech on September 28, 2012, 01:31:40 AM
Zero uses a USB to RS232 (custom 8 pin connector) because their dealer support kit includes a netbook without serial.

When I tried hooking up directly with RS232 (bypassing their cable) I saw scrambled data coming back (character echo). This could be due to an incorrect configuration on my end or intermittent connection for the data signals. It also could be a simple system protecting against casual access to the serial port.
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Terry on September 29, 2012, 07:49:00 AM
Set the data rate to 38400 baud for both the BMS and Main bike board OBDII connection.  I can't say any more on the forum but you'll need to know some Back To The Future trivia on power quantities to get any further.  If you know where I'm going with this please keep it to yourself. Earlier this summer when I was having cut outs the customer service guys at zero, knowing I was hundreds of miles from the closest dealer, explained to me how to retrieve the info off the bike to try to diagnose the issues and get data and logs to send them to help troubleshoot remotely, but since then they have decided to not want customers to do this themselves.  And I can understand why, lots of commands can accidently erase eeprom data and more.  
Title: Re: The ZERO CanBus communication protocol
Post by: manlytom on September 29, 2012, 09:25:37 AM
Set the data rate to 38400 baud for both the BMS and Main bike board OBDII connection.  I can't say any more on the forum but you'll need to know some Back To The Future trivia on power quantities to get any further.  If you know where I'm going with this please keep it to yourself. Earlier this summer when I was having cut outs the customer service guys at zero, knowing I was hundreds of miles from the closest dealer, explained to me how to retrieve the info off the bike to try to diagnose the issues and get data and logs to send them to help troubleshoot remotely, but since then they have decided to not want customers to do this themselves.  And I can understand why, lots of commands can accidently erase eeprom data and more.  
Now here is one that Zero can improve on the 2013s or even do a firmware up that allows us to have a layer of access for read or safe adjustments only. Far away or people to like to tinker within a certain level.
Title: Re: The ZERO CanBus communication protocol
Post by: BSDThw on September 29, 2012, 02:21:33 PM
Tanks Offthegrid,

Quote
to help troubleshoot remotely, but since then they have decided to not want customers to do this themselves.

I see the intention and I can understand Zeros attitude. It can destroy Data or even worse kill somebody or yourself.


 
Title: Re: The ZERO CanBus communication protocol
Post by: pinaz on January 06, 2013, 04:18:25 AM
I'm a new Zero owner (and an EE).

The OBDII connector for my '11 Zero XU was hidden under the starboard "fuel tank" body panel.  To find it, I went through the torture of removing the seat followed by trying to pop off the body panel without damaging the flimsy plastic fasteners.  However, if one buys an OBDII "extension cord" and has a small hand, it is feasible to ignore the physical pain of cramming one's hand underneath the body panel to reach it.

The connector location (accessible from the front of the bike) mentioned on another thread for a different Zero model (DS?) seems far preferable.

At least on this model, the connector has contacts populated for pins 5, 6, 8, 9, 12, 13, and 14.  Zero seems to be using all the vendor specific pins:

5 signal ground
6 CAN high
8 vendor specific (+3.3V when ON)
9 vendor specific
12 vendor specific (+3.3V when ON)
13 vendor specific (+5V when ON)
14 CAN low

A normal OBDII scanner won't work without pin 16 (+12V battery voltage) to power it, which seems to jibe with other posts.  What a pity... surely Zero could have tied that pin to the DC:DC converter output used to power the 12V accessories like the headlamp, etc.  Doing so would have also opened up the market to allow an adapter for smartphone integration, which seems to be a topic of interest on this board.  Anyway....

Now, just because Zero used the CAN pins it doesn't necessarily mean that:
a) it talks CAN, and/or
b) the CAN implementation conforms to OBDII

With a scope, I see CAN-like traffic at about 12kbps, which is not promising, since I believe OBDII CAN is 250kbps.

Moreover, I put together a test rig where I injected power manually to an OBDII scanner and tried talking to the bike.  No dice.

So, I guess it is proprietary all the way for Zero. :(

I'm a bit puzzled about the posts of using a USB "RS232" adapter to talk to the MBB.

At the risk of being pedantic, "RS-232" proper could use signal levels anywhere from +5V/-5V to +15V/-15V.  However, from what voltages I'm seeing on the pins when the bike is ON, it is using logic levels (either +5V/0V or 3.3V/0V).  If someone used a store-bought USB to RS-232 adapter and connected up the pins, the MBB could be damaged.
Title: Re: Re: The ZERO CanBus communication protocol
Post by: Electric Cowboy on January 07, 2013, 01:42:51 AM
Also remember the 2012 and 2011 are very different. The 2011 uses the mbb for its main I/o and settings, and the 2012 uses the sevcon.

So the 2011 is 9600 baud with the mbb serial and the 2012 is 38400 with the canbus for the sevcon. Both achieved easily via the odb2
Title: Re: The ZERO CanBus communication protocol
Post by: Doctorbass on January 10, 2013, 11:29:41 AM
.
Title: Re: Re: The ZERO CanBus communication protocol
Post by: Doctorbass on January 16, 2013, 11:14:58 AM
Also remember the 2012 and 2011 are very different. The 2011 uses the mbb for its main I/o and settings, and the 2012 uses the sevcon.

So the 2011 is 9600 baud with the mbb serial and the 2012 is 38400 with the canbus for the sevcon. Both achieved easily via the odb2


OK now the BIg Question is:

Does the 2011 zero that use RS-232 is using the CAN low and CAN high as TX and RX for the rs-232 serial communication ?

CAN Low = TX ? or RX

CAN high = TX ? or  RX ?

Is that right?

And does the magic BTTF password is working for both 2012 and 2011 ?





Big thanks for that important answer ;)

Doc
Title: Re: The ZERO CanBus communication protocol
Post by: Electric Cowboy on January 20, 2013, 08:46:49 AM
The 2011 does not use can from the ODBII. The 2012 uses CAN.
Title: Re: The ZERO CanBus communication protocol
Post by: Doctorbass on January 20, 2013, 12:38:47 PM
The 2011 does not use can from the ODBII. The 2012 uses CAN.

So the 2011 use RS-232 ( serial) with the TX and RX from the u-art line ?
Title: Re: The ZERO CanBus communication protocol
Post by: manlytom on July 21, 2013, 09:56:17 AM
The 2011 does not use can from the ODBII. The 2012 uses CAN.

So the 2011 use RS-232 ( serial) with the TX and RX from the u-art line ?

Hi guys I have now disassembled the whole bike and swapped throttle, controller, motor and MBB ==> no change ! Checked contactor, cables etc. all seems good. At the end of my ideas but for getting the log files of my 2011S. How do I do that ? It seems the 2011 talk RS232 on the OBD2 plug. so 9600baud, pw??? or how?
help appreciated as it is now over 8 weeks and bike in pieces and Zero gone quiet !
Title: Re: The ZERO CanBus communication protocol
Post by: eyeinsky on July 26, 2013, 06:01:01 AM
Holly Cow Guys! the more and more I read this stuff about the Zero MBB connection my brain hurts. I have 2011 UX I see the connection OBDII type but to this point have no idea hoe to connect a RS232 to this connection.

Can someone please post a picture of this animal and please post the software that you are using to interface with the MBB.

I say Zero is doing them self a huge disservice by not supplying basic technical data to public such as wiring diagrams. This cable should be a option for us to purchase the software should be free for owner. This is not rocket science people! Here in Canada my dealer doesn't even have this cable yet.

I want figure this out, I'm aircraft mechanic for over 25 year and have had lots of experience with Arduino programming. Please check out my website see some of the stuff I'm doing: http://www.elevationaerialoperation.com/ (http://www.elevationaerialoperation.com/)   

Help please
Jerry