ElectricMotorcycleForum.com

Makes And Models => Zero Motorcycles Forum | 2012 and older => Topic started by: Electric Cowboy on November 02, 2012, 02:45:51 PM

Title: 2011 Zero performance settings
Post by: Electric Cowboy on November 02, 2012, 02:45:51 PM
Hey guys,

Just thought I would share a snippit of the code I wrote for my first Foxy project. These were my commute & race settings, as set by the framework I built to interface with the Zero MBB.

You can still input them manually if you have access to the mbb, just use the key and values you see in the code below.

case 'commute' :

                                            console.log('setting commute mode');
                                            app.mbb.send('set');
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('peak');
                                                    app.mbb.send('400');
                                                    app.mbb.send('lowsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('lowtq');
                                                    app.mbb.send('50');
                                                    app.mbb.send('medsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('medtq');
                                                    app.mbb.send('50');
                                                    app.mbb.send('econsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('econtq');
                                                    app.mbb.send('50');
                                                },
                                                5000
                                            );

                                            setTimeout(
                                                function(){
                                                    app.mbb.send('map');
                                                    app.mbb.send('5');
                                                    app.mbb.send('stage1');
                                                    app.mbb.send('135');
                                                    app.mbb.send('stage2');
                                                    app.mbb.send('155');
                                                    app.mbb.send('stage3');
                                                    app.mbb.send('175');
                                                    app.mbb.send('tempfan');
                                                    app.mbb.send('75');
                                                    app.mbb.send('contopen');
                                                    app.mbb.send('75');
                                                    app.mbb.send('scale');
                                                    app.mbb.send('65');
                                                },
                                                10000
                                            );
                                            break;

                                        case 'race' :
                                            console.log('setting race mode')
                                            app.mbb.send('set');
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('peak');
                                                    app.mbb.send('490');
                                                    app.mbb.send('lowsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('lowtq');
                                                    app.mbb.send('100');
                                                    app.mbb.send('medsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('medtq');
                                                    app.mbb.send('100');
                                                    app.mbb.send('econsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('econtq');
                                                    app.mbb.send('100');
                                                },
                                                5000
                                            );
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('map');
                                                    app.mbb.send('0');
                                                    app.mbb.send('stage1');
                                                    app.mbb.send('175');
                                                    app.mbb.send('stage2');
                                                    app.mbb.send('180');
                                                    app.mbb.send('stage3');
                                                    app.mbb.send('185');
                                                    app.mbb.send('tempfan');
                                                    app.mbb.send('30');
                                                    app.mbb.send('contopen');
                                                    app.mbb.send('98');
                                                    app.mbb.send('scale');
                                                    app.mbb.send('85');
                                                },
                                                10000
                                            );
                                            break;
-Electric Cowboy
Title: Re: 2011 Zero performance settings
Post by: Electric Cowboy on November 02, 2012, 02:48:15 PM
ALSO WARNING! You may want to turn down the motor temp warning stages 1 2 and 3 about 20C each... it is possible to melt the sauder in your motor with my race settings.
Title: Re: 2011 Zero performance settings
Post by: cirrus pete on November 02, 2012, 09:32:15 PM
What are the practical implications of importing your settings? How do the commute and race performances differ from the standard setting?
Title: Re: 2011 Zero performance settings
Post by: Doctorbass on November 03, 2012, 04:53:39 AM
Awsome!!   :o

so you understand the meaning of every of these commands?

Doc
Title: Re: 2011 Zero performance settings
Post by: Electric Cowboy on November 03, 2012, 05:52:50 AM
lol @ dock, yes I do, I built the framework and did a lot of research to try and understand what I could.

@ cirrus the following things will be experienced

Race :
1) A peppier feel with more torque throughout the throttle curve as well as a throttle curve which lends itself to faster accelleration. And perhaps an immaginary Horsepower or 2 gained

2) Better performance for longer harder useage.

3) Range reduction when ridden like a cowboy.

Commute :
1) lower torque throughout the curve with a throttle curve that lends itself more to range

2) power reduction at lower temperature to keep motor in optimal temperature range to maintain efficiency

3) longer range
Title: Re: 2011 Zero performance settings
Post by: lolachampcar on November 04, 2012, 07:35:38 PM
EC,

I'm new to the Zero framework and would like to better understand where the set up values reside and how you reconfigure them (provided you are willing to share).

A few simple questions to start-
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?
Has Zero expressed an opinion on how changes of any kind might affect the warranty?

I've got an electrical design background and have written a good bit of microcontroller code so technical answers work for me.

Thanks,
Bill
Title: Re: 2011 Zero performance settings
Post by: dahlheim on November 05, 2012, 08:59:29 PM
EC,

I'm new to the Zero framework and would like to better understand where the set up values reside and how you reconfigure them (provided you are willing to share).

A few simple questions to start-
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?
Has Zero expressed an opinion on how changes of any kind might affect the warranty?

I've got an electrical design background and have written a good bit of microcontroller code so technical answers work for me.

Thanks,
Bill

what Bill said.

heck, it wouldn't be that hard to modify the bike to make it programmable via smartphone.  or, did someone think of that already?
Title: Re: 2011 Zero performance settings
Post by: dahlheim on November 08, 2012, 09:25:07 PM
i sure seem to be the kiss of death to any good thread...  :-/
Title: Re: 2011 Zero performance settings
Post by: protomech on November 08, 2012, 11:38:32 PM
I believe MBB = main bike board. I think of it as the motorcycle "brain", but that may be incorrect.

There is a serial interface to the BMS, and I think a CAN interface to the MBB. A smartphone could talk to the BMS over a bluetooth bridge board, provided that the smartphone supports bluetooth serial profile (Android does, iOS does not).
Title: Re: 2011 Zero performance settings
Post by: Electric Cowboy on November 15, 2012, 08:31:06 AM
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?

The key value pairs reside in the MBB(main bike board) and are sent over RS232 to the MBB settings.

On the 2011 the controller really does not have any adjustable settings that make a difference, everything is best done through the MBB.

I am always willing to share as much as possible.

If you want I can build you an interface for under $200 that would expose your 2011 Zero to a smartphone or web app. Not sure if people are interested in paying for an interface for the 2011's.

I could also do a remote desktop session and program your bike directly for you at a lesser expense, even so you would probably have to spend about $50 on the necessary cable.
Title: Re: 2011 Zero performance settings
Post by: Doctorbass on November 15, 2012, 10:53:02 AM
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?

The key value pairs reside in the MBB(main bike board) and are sent over RS232 to the MBB settings.

On the 2011 the controller really does not have any adjustable settings that make a difference, everything is best done through the MBB.

I am always willing to share as much as possible.

If you want I can build you an interface for under $200 that would expose your 2011 Zero to a smartphone or web app. Not sure if people are interested in paying for an interface for the 2011's.

I could also do a remote desktop session and program your bike directly for you at a lesser expense, even so you would probably have to spend about $50 on the necessary cable.

All right! so is that famous 50% cable a USB to RS-232 converter?
Title: Re: 2011 Zero performance settings
Post by: lolachampcar on November 15, 2012, 07:11:07 PM
Electric Cowboy
Thank you for the information.  I've done many a CAN and 232 (actually K-Line but the handler is the same for 232) preprogramming interfaces.  My interest was in the bike's control structure; that is, what elements reside on which boards and such.  Apparently Zero is supporting access to some of these values via smartphone applications and blue tooth for the MY13s so I will probably wait a few months for the new bike to show up and not muck with my MY12.

Mine was more a curiosity about how Zero is managing the motor and pack.  I thought I read on another thread that current inrush for acceleration was managed by the "ECU" which I assumed was the CAN reflashable normal ICE motorcycle looking bit under the seat.  I got the impression that the speed controller CAN based flashing was either passed through the "ECU" or was simply another node on the CAN bus (along with the "ECU").  Do you have any description on the command set for 232 based altering of the MBB?

I love to read about your exploits (along with those of Doctorbass) and am willing to chip in on the design side if it would be of any help.  The benifit of being retired is that I have a lot of spare time.
Title: Re: 2011 Zero performance settings
Post by: dahlheim on November 15, 2012, 08:47:27 PM
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?

The key value pairs reside in the MBB(main bike board) and are sent over RS232 to the MBB settings.

On the 2011 the controller really does not have any adjustable settings that make a difference, everything is best done through the MBB.

I am always willing to share as much as possible.

If you want I can build you an interface for under $200 that would expose your 2011 Zero to a smartphone or web app. Not sure if people are interested in paying for an interface for the 2011's.

I could also do a remote desktop session and program your bike directly for you at a lesser expense, even so you would probably have to spend about $50 on the necessary cable.

i've done a fair amount of hobbiest specialty device building based primarily on arduino and arduino-like controllers, all for my own use (home irrigation controller, entertainment system controller, thermostats, etc).  i'd really be interested in building such a bike interface myself.  however, of course i lack enough knowledge of the bike's design, and the communication system/protocols.  not sure where to look to learn.
Title: Re: 2011 Zero performance settings
Post by: Doctorbass on November 16, 2012, 07:51:34 AM
Were do the set up values you describe in your table deffinitions reside?  Is MBB the main battery board?  I ask because I thought the overall ECU interfaced and controlled the Main Battery Board and the Motor Controller.
How do you talk to this device (both manual button pressing and automated configuration download)?

The key value pairs reside in the MBB(main bike board) and are sent over RS232 to the MBB settings.

On the 2011 the controller really does not have any adjustable settings that make a difference, everything is best done through the MBB.

I am always willing to share as much as possible.

If you want I can build you an interface for under $200 that would expose your 2011 Zero to a smartphone or web app. Not sure if people are interested in paying for an interface for the 2011's.

I could also do a remote desktop session and program your bike directly for you at a lesser expense, even so you would probably have to spend about $50 on the necessary cable.

i've done a fair amount of hobbiest specialty device building based primarily on arduino and arduino-like controllers, all for my own use (home irrigation controller, entertainment system controller, thermostats, etc).  i'd really be interested in building such a bike interface myself.  however, of course i lack enough knowledge of the bike's design, and the communication system/protocols.  not sure where to look to learn.

Probably the best place is here :)

I think that the 2011-12 and 13 are different desing and have their own command. Do you think it is   electric Cowboy?

The 2011  and previous have LiMn cells while the 2012 have LiPO EIG cells and the 2013 have another brand of high performance cells so the BMs have to work a bit different since the discharge curve are not the same.

Also the controller on the 2011 and previous is not CAN or IC2 and the command for throttle is like 0-5K and is filtered by the BMM ( Main Bike Board) wich limit the true action of the throttle grip signal to the controller

Before Electric Cowboy found the commands and code to change parameters on teh performance I have installed on mine a relay that can bypass the throttle signal from being filtered by the MBB ( Main Bike Board).. or you can call it "ECU". It was great improoovement but problem was not solved completly because the motor current sensor was always triggering an alarm to the MBB to cut the power each time the current reached a high limit...

My goal with the bypass was to let the controlelr programmation to decide for the limit max current...

But if i was not pushing too hard the throttle, but just enough the over current detection was not triggered and the acceleration had fantastic improovement !!.. I mean BRUTAL  8)

It is certain that any help on developping or reverse engineering these zero electrical structure and software would be a great collective project!

Doc

Title: Re: 2011 Zero performance settings
Post by: dahlheim on November 17, 2012, 08:56:21 PM
Hey guys,

Just thought I would share a snippit of the code I wrote for my first Foxy project. These were my commute & race settings, as set by the framework I built to interface with the Zero MBB.

You can still input them manually if you have access to the mbb, just use the key and values you see in the code below.

case 'commute' :

                                            console.log('setting commute mode');
                                            app.mbb.send('set');
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('peak');
                                                    app.mbb.send('400');
                                                    app.mbb.send('lowsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('lowtq');
                                                    app.mbb.send('50');
                                                    app.mbb.send('medsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('medtq');
                                                    app.mbb.send('50');
                                                    app.mbb.send('econsp');
                                                    app.mbb.send('50');
                                                    app.mbb.send('econtq');
                                                    app.mbb.send('50');
                                                },
                                                5000
                                            );

                                            setTimeout(
                                                function(){
                                                    app.mbb.send('map');
                                                    app.mbb.send('5');
                                                    app.mbb.send('stage1');
                                                    app.mbb.send('135');
                                                    app.mbb.send('stage2');
                                                    app.mbb.send('155');
                                                    app.mbb.send('stage3');
                                                    app.mbb.send('175');
                                                    app.mbb.send('tempfan');
                                                    app.mbb.send('75');
                                                    app.mbb.send('contopen');
                                                    app.mbb.send('75');
                                                    app.mbb.send('scale');
                                                    app.mbb.send('65');
                                                },
                                                10000
                                            );
                                            break;

                                        case 'race' :
                                            console.log('setting race mode')
                                            app.mbb.send('set');
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('peak');
                                                    app.mbb.send('490');
                                                    app.mbb.send('lowsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('lowtq');
                                                    app.mbb.send('100');
                                                    app.mbb.send('medsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('medtq');
                                                    app.mbb.send('100');
                                                    app.mbb.send('econsp');
                                                    app.mbb.send('100');
                                                    app.mbb.send('econtq');
                                                    app.mbb.send('100');
                                                },
                                                5000
                                            );
                                            setTimeout(
                                                function(){
                                                    app.mbb.send('map');
                                                    app.mbb.send('0');
                                                    app.mbb.send('stage1');
                                                    app.mbb.send('175');
                                                    app.mbb.send('stage2');
                                                    app.mbb.send('180');
                                                    app.mbb.send('stage3');
                                                    app.mbb.send('185');
                                                    app.mbb.send('tempfan');
                                                    app.mbb.send('30');
                                                    app.mbb.send('contopen');
                                                    app.mbb.send('98');
                                                    app.mbb.send('scale');
                                                    app.mbb.send('85');
                                                },
                                                10000
                                            );
                                            break;
-Electric Cowboy

totally unfamiliar with CAN bus or anything similar.  trying to decipher practical implications of your post.  is it the case, for example, that if i knew which physical port to connect to (2012), and it's pinout, and, for example, it's baud rate, that i could simply send those command pairs over in sequence, i.e.

set
peak
490
lowsp
100
...etc

to configure the race mode you created?

any additional info would be appreciated, and likely productive with respect to my previously stated goal.
Title: Re: 2011 Zero performance settings
Post by: Electric Cowboy on November 30, 2012, 12:47:30 AM
Quote
totally unfamiliar with CAN bus or anything similar.  trying to decipher practical implications of your post.  is it the case, for example, that if i knew which physical port to connect to (2012), and it's pinout, and, for example, it's baud rate, that i could simply send those command pairs over in sequence, i.e.

set
peak
490
lowsp
100
...etc

to configure the race mode you created?

any additional info would be appreciated, and likely productive with respect to my previously stated goal.

This is for 2011 models only. and yes that would be the case for a 2011 model

i've done a fair amount of hobbiest specialty device building based primarily on arduino and arduino-like controllers, all for my own use (home irrigation controller, entertainment system controller, thermostats, etc).  i'd really be interested in building such a bike interface myself.  however, of course i lack enough knowledge of the bike's design, and the communication system/protocols.  not sure where to look to learn.

Where do you live?

Electric Cowboy
Thank you for the information.  I've done many a CAN and 232 (actually K-Line but the handler is the same for 232) preprogramming interfaces.  My interest was in the bike's control structure; that is, what elements reside on which boards and such.  Apparently Zero is supporting access to some of these values via smartphone applications and blue tooth for the MY13s so I will probably wait a few months for the new bike to show up and not muck with my MY12.

Mine was more a curiosity about how Zero is managing the motor and pack.  I thought I read on another thread that current inrush for acceleration was managed by the "ECU" which I assumed was the CAN reflashable normal ICE motorcycle looking bit under the seat.  I got the impression that the speed controller CAN based flashing was either passed through the "ECU" or was simply another node on the CAN bus (along with the "ECU").  Do you have any description on the command set for 232 based altering of the MBB?

I love to read about your exploits (along with those of Doctorbass) and am willing to chip in on the design side if it would be of any help.  The benifit of being retired is that I have a lot of spare time.

Thank you, I will keep that in mind :)
Title: Re: 2011 Zero performance settings
Post by: dahlheim on November 30, 2012, 09:33:35 AM
This is for 2011 models only. and yes that would be the case for a 2011 model

neato.  thanks.

Where do you live?

grand junction, co

and today i find this interesting bit:
http://www.skpang.co.uk/catalog/arduino-canbus-shield-with-usd-card-holder-p-706.html (http://www.skpang.co.uk/catalog/arduino-canbus-shield-with-usd-card-holder-p-706.html)

:)
Title: Re: 2011 Zero performance settings
Post by: Doctorbass on January 10, 2013, 11:39:25 AM
Hello Brandon,
Could you  post complete information for people that want to change some setting on their  MBB with the RS-232 ( for the Zero 2011)?

Normal USB to 232 cable adaptor?
Where do you connect it ? is it on the OBDII CAN high and CAN low pins? for the TX and RX fo the 232?.. Are the voltage compatible?
9600 baud on the hyper terminal?

Please post all steps and all required proper equipment ( ex: serial cable with usb adapter, a PC with a hypertewrminal?... etc)

and if possible pictured or a demo video.. etc...

Also what is your tool you sell  200$  for doing that? Is it only for people that have a smartphone?.. I would do it with my small laptop so it would be USB to ?? 232?

Big Thanks!

Doc
Title: Re: 2011 Zero performance settings
Post by: Doctorbass on May 08, 2013, 08:30:33 PM
Hey Brandon,

I might have some niumbers that will be interesting you ;)

Yesterday i reprogrammed succesfully my DS 2011 using a OLIVE DTFI usb to 232 ( 3.3V) interface and Teraterm.

I have put all the numbers of the RACE MODE that you posted plus all temp stage setting with 20 degree lower to protect the motor from melting.

Now here is the difference in numbers:

Before the mod:
Max battery amp: 390A
Max KW power from the battery: 18kW

After the mod:
Max battery amp: 475A
Max KW power from the battery: 22kW


The major diference in acceleration is starting at about 10km/h and more. I really see a difference but light but enough to say it worth keeping these parameters.

The powerband is a bit better and the acceleration above 90km/h is significantly better too

I did not monitored the motor current but i monitored the battery current.

The difference is about 4kW ( about 5hp).

I tried to find the max speed setting but it seem that it is already set to 100%. I think it was "maxmph"

The max speed i have got from now  on the highway ( flat no hill) is 119km/h  but average is about 110 with some front wind and as low as 95km/h with heavy front wind. This was befor ethe RACE mod setting applied. but  with the RACE SETTING, the re is no change in speed.

Doc