TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

casainho said:
I created the development branch on firmware and implemented the following features:
1. Implemented: LCD3: low pass filter the pedal cadence value shown to user #8
2. Improved battery voltage reading on LCD3 and battery SOC graph bars calculation
Thanks Casainho. But can we first finish the limited power issue before making serious changes in the firmware by adding features and eventually merge them to master? As you can see I have many pending changes in the improve_power branch and I don't want to end up with a lot of merge conflicts.

Did you test the latest betas?
 
EndlessCadence said:
casainho said:
I created the development branch on firmware and implemented the following features:
1. Implemented: LCD3: low pass filter the pedal cadence value shown to user #8
2. Improved battery voltage reading on LCD3 and battery SOC graph bars calculation
Thanks Casainho. But can we first finish the limited power issue before making serious changes in the firmware by adding features and eventually merge them to master? As you can see I have many pending changes in the improve_power branch and I don't want to end up with a lot of merge conflicts.

Did you test the latest betas?
Ok.
2. I had already implemented on development branch on other repo and seems you forgot it there.

I have no limitations of power, it works for me as expected (development branch).

No betas because I can't ride with them without the features.
 
casainho said:
EndlessCadence said:
casainho said:
I created the development branch on firmware and implemented the following features:
1. Implemented: LCD3: low pass filter the pedal cadence value shown to user #8
2. Improved battery voltage reading on LCD3 and battery SOC graph bars calculation
Thanks Casainho. But can we first finish the limited power issue before making serious changes in the firmware by adding features and eventually merge them to master? As you can see I have many pending changes in the improve_power branch and I don't want to end up with a lot of merge conflicts.

Did you test the latest betas?
Ok.
2. I had already implemented on development branch on other repo and seems you forgot it there.

I have no limitations of power, it works for me as expected (development branch).

No betas because I can't ride with them without the features.


Hi Casainho, please see below. You're confusing me a little :wink:


casainho said:
EndlessCadence said:
casainho said:
For me ok. I also already thought on the mono repository.

I gave you now access to create repositories, I hope is ok for your needs.
Thanks! Can I create a new repository with all the parts of the firmware or do you still have branches which need to be merged to master first?
Go ahead.

casainho said:
casainho said:
jbalat said:
Yes that's how they used to be in the old version. Awesome. Now I've been riding with the new firmware everyday for 3 days about 100kms or so. It is not bad but I have no control over the power any more like I did with the old version. Before if I wanted 500w I would just set it to 500w. Changing the assist level now also changes the power but not as programmed. I set the power to 2000 watts and I get about 400 when I go up hills.
Hmmm, I am start to think that before it was not using cadence/human power..., only the torque aensor value.

Do you think the candence is high as when you ride on the road??
Oh men, I am on a trip of 3 days and I have that issue were at boost phase I can get the regular power like 800W but after it goes to the regular value but this one can't go over 250W.

I did had this issue when I implemented the boost... And I wonder if there is some bad calculation with limit of 255 doing to use an 8 bits variable...
 
Don’t know if this happens to you trying to get max power.

Ride along and it ramps up to say 600w, as you increase speed it drops to like 400w, so you peddle harder and harder but it only goes up a little bit then starts going back down to 400w, then you back off a bit and power goes up ??? Huh ?? Don’t get it...
 
EndlessCadence said:
Hi Casainho, please see below. You're confusing me a little :wink:
I thought you would take care to "move" the development branch as you asked before to have it and that is not a specific branch of myself. Anyway, small mistakes happens. The code that was left there was a good improvement to battery SOC bars so I got it back.

About the power issue, I had it before you did made changes in the code, now, with latest code on development (and with off roade mode disabled on LCD3) seems I have no limitations of power.

Also, I am afraid that EEPROM still fails to clean, but I must test again and again. I did look to your changes to EEPROM, seems good to me.
 
casainho said:
EndlessCadence said:
Hi Casainho, please see below. You're confusing me a little :wink:
I thought you would take care to "move" the development branch as you asked before to have it and that is not a specific branch of myself. Anyway, small mistakes happens. The code that was left there was a good improvement to battery SOC bars so I got it back.

About the power issue, I had it before you did made changes in the code, now, with latest code on development (and with off roade mode disabled on LCD3) seems I have no limitations of power.

Also, I am afraid that EEPROM still fails to clean, but I must test again and again. I did look to your changes to EEPROM, seems good to me.
That explains a lot, thank you for clarifying!

Great that you don't have power issues, we should be able to sort this out for all users soon. I just added some feature toggles to make configuration a bit easier. By default we should set almost all feature toggles to off.

Regarding possible EEPROM issues. Did you see that it doesn't work? I carefully read the manual and examined the ST code examples. Also quite a few users reported that it worked great. I didn't have issues myself too.
 
Woohoo new sensor works ;)
 
jbalat said:
Woohoo new sensor works ;)
Great!!

You can click POWER ON/OFF + DOWN buttons to cycle/show temperature on the temperature field.
 
EndlessCadence said:
Regarding possible EEPROM issues. Did you see that it doesn't work? I carefully read the manual and examined the ST code examples. Also quite a few users reported that it worked great. I didn't have issues myself too.
Just tested again a few times and it seems to work, however, I think a small bug was tricking me:
Code:
#define DEFAULT_VALUE_LCD_BACKLIGHT_ON_BRIGHTNESS                   16 // 16 = 80%
But after reset, it always shows the value of 20%...

All other things seems to work/reset as expect.

Also, users that enable off road mode, will not be able to configure max power (because LCD3 key combinations are used twice for off road mode) and the default value is 500W. I think we should move default value to 1000W:
Code:
#define DEFAULT_VALUE_TARGET_MAX_BATTERY_POWER                      20 // 20 * 25 = 500
 
casainho said:
EndlessCadence said:
Regarding possible EEPROM issues. Did you see that it doesn't work? I carefully read the manual and examined the ST code examples. Also quite a few users reported that it worked great. I didn't have issues myself too.
Just tested again a few times and it seems to work, however, I think a small bug was tricking me:
Code:
#define DEFAULT_VALUE_LCD_BACKLIGHT_ON_BRIGHTNESS                   16 // 16 = 80%
But after reset, it always shows the value of 20%...
Great! Glad it's not a bug.
All other things seems to work/reset as expect.

Also, users that enable off road mode, will not be able to configure max power (because LCD3 key combinations are used twice for off road mode) and the default value is 500W. I think we should move default value to 1000W:
Code:
#define DEFAULT_VALUE_TARGET_MAX_BATTERY_POWER                      20 // 20 * 25 = 500
I've just pushed a change where the default max power is zero by default which disables the max power feature. That's what I would prefer. Even better would be to have dedicated feature switch to disable/enable the feature.
 
EndlessCadence said:
I've just pushed a change where the default max power is zero by default which disables the max power feature. That's what I would prefer. Even better would be to have dedicated feature switch to disable/enable the feature.
1. Max current configuration is for motor protection (avoid over heating to fast; damage of the cables; motor controller mosfets, etc)
2. Max power configuration is for users, for the ones that want a max power assistant from the motor. This can be important for instance to fitness reasons; for the ones that do long distances and want to keep battery usage at a limit; for trails when we prefer to have a constant power assist.

While I prefer to have it enabled by default, I also think there is no problem to have it disabled and make a good documentation for this feature so users are clear what are the advantages to use it.

We really need to improve the keys used, I think we should not have the actual situation of duplication.
 
casainho said:
EndlessCadence said:
I've just pushed a change where the default max power is zero by default which disables the max power feature. That's what I would prefer. Even better would be to have dedicated feature switch to disable/enable the feature.
1. Max current configuration is for motor protection (avoid over heating to fast; damage of the cables; motor controller mosfets, etc)
2. Max power configuration is for users, for the ones that want a max power assistant from the motor. This can be important for instance to fitness reasons; for the ones that do long distances and want to keep battery usage at a limit; for trails when we prefer to have a constant power assist.

While I prefer to have it enabled by default, I also think there is no problem to have it disabled and make a good documentation for this feature so users are clear what are the advantages to use it.
I meant max power configuration with the quick access option (point 2 above). Then I'll leave it the way I had changed it, should work great. Users who want this can easily increase the power limit from zero to anything they want.

I didn't touch option 1 above.
We really need to improve the keys used, I think we should not have the actual situation of duplication.
I fully agree, but first stabilize the firmware and fix bugs :wink:
 
EndlessCadence said:
I meant max power configuration with the quick access option (point 2 above). Then I'll leave it the way I had changed it, should work great. Users who want this can easily increase the power limit from zero to anything they want.
I think it is not consistent to disabled/enable that feature like this, while others are in a different way. As I think we told before, we should have an option (maybe the very first entry) specific to enable/disable.

Max power = 0 equals to unlimited max power? -- I think it is not intuitive.

But I understand all this is a LOT of work!! I agree, let's have something stable and then add bit by bit. Also, maybe we will never implement all this for LCD3 if we start to have a matrix color LCD with much more possibilities and the then may leave this project of LCD3. Who knows?? :)
 
casainho said:
EndlessCadence said:
I meant max power configuration with the quick access option (point 2 above). Then I'll leave it the way I had changed it, should work great. Users who want this can easily increase the power limit from zero to anything they want.
I think it is not consistent to disabled/enable that feature like this, while others are in a different way. As I think we told before, we should have an option (maybe the very first entry) specific to enable/disable.

Max power = 0 equals to unlimited max power? -- I think it is not intuitive.

But I understand all this is a LOT of work!! I agree, let's have something stable and then add bit by bit. Also, maybe we will never implement all this for LCD3 if we start to have a matrix color LCD with much more possibilities and the then may leave this project of LCD3. How knows?? :)
I agree! But there is no configuration menu for max power right now!
I've just added such a feature toggle for boost already, first option in boost configuration menu :D
 
Hey EC if you do get to try my firmware then you will be using the quick power feature all the time. top and middle buttons together.
I just want to make a couple of examples.
I am tired so I use max assist 5 so I don’t have to press the peddles hard, but I set max power to 200 so I don’t use too much battery.
Or I use assist level 2 but I set max power to 600. So I ride along at 220w but when I hit a hill it goes to 600w max.

It’s really intuitive when you ride everyday all the time. Trust me on this. It also gives you infinitely many more options than just relying on a preprogrammed power and assist mode.

Anyway yes my cheaper sensors from eBay did not work properly, all 3 were crap. I paid $3.50 for my new one from a local reputable supplier and it actually works. I wouldn’t be surprised if the eBay ones are just counterfeits... I have the six pin so I had to dig in to the jelly stuff to expose the connectors. I use the picture that was posted on the previous page.
 
jbalat said:
Hey EC if you do get to try my firmware then you will be using the quick power feature all the time. top and middle buttons together.
I just want to make a couple of examples.
I am tired so I use max assist 5 so I don’t have to press the peddles hard, but I set max power to 200 so I don’t use too much battery.
Or I use assist level 2 but I set max power to 600. So I ride along at 220w but when I hit a hill it goes to 600w max.
That was why I implemented as a quick access and now I would like it to have it more like changing assist levels and keep LCD3 draw everything while we change the max power.

Maybe we could even invert, changing on UP/DOWN buttons the max power and on actual MAX power buttons combination, change the torque sensor sensitivity.
 
casainho said:
jbalat said:
Hey EC if you do get to try my firmware then you will be using the quick power feature all the time. top and middle buttons together.
I just want to make a couple of examples.
I am tired so I use max assist 5 so I don’t have to press the peddles hard, but I set max power to 200 so I don’t use too much battery.
Or I use assist level 2 but I set max power to 600. So I ride along at 220w but when I hit a hill it goes to 600w max.
That was why I implemented as a quick access and now I would like it to have it more like changing assist levels and keep LCD3 draw everything while we change the max power.

Maybe we could even invert, changing on UP/DOWN buttons the max power and on actual MAX power buttons combination, change the torque sensor sensitivity.

Jbalat and Casainho,

About this Power Quick Access discussion, that I fully agree, I remember what I saw in a Video about the Bike Specialized Turbo Levo dated Sep, 23, 2018.

https://www.youtube.com/watch?v=a3rkSROGpGk

The Jbalat explanation remember me in the video the "Shuttle Mode" and "Infinite Tune" modes.

Please see between minute 18 and 21.

All the Video is amazing but these 3 minutes are about Power management.

I do both. Long Term and very sloped MTB rides.

This is very important to me. To have the possibility to define, the power level according, what I am doing.

I would like to emphasize again.

Jbalat, IMHO, is the best person, I know, to test the new amazing firmware.

Jbalat did more them 5000 KM with the original TSDZ2 firmware and he can compare the new firmware with the TREK bike with the good Bosch motor.

Regards
 
AZUR said:
casainho said:
jbalat said:
Hey EC if you do get to try my firmware then you will be using the quick power feature all the time. top and middle buttons together.
I just want to make a couple of examples.
I am tired so I use max assist 5 so I don’t have to press the peddles hard, but I set max power to 200 so I don’t use too much battery.
Or I use assist level 2 but I set max power to 600. So I ride along at 220w but when I hit a hill it goes to 600w max.
That was why I implemented as a quick access and now I would like it to have it more like changing assist levels and keep LCD3 draw everything while we change the max power.

Maybe we could even invert, changing on UP/DOWN buttons the max power and on actual MAX power buttons combination, change the torque sensor sensitivity.

Jbalat and Casainho,

About this Power Quick Access discussion, that I fully agree, I remember what I saw in a Video about the Bike Specialized Turbo Levo dated Sep, 23, 2018.

https://www.youtube.com/watch?v=a3rkSROGpGk

The Jbalat explanation remember me in the video the "Shuttle Mode" and "Infinite Tune" modes.

Please see between minute 18 and 21.

All the Video is amazing but these 3 minutes are about Power management.

I do both. Long Term and very sloped MTB rides.

This is very important to me. To have the possibility to define, the power level according, what I am doing.

I would like to emphasize again.

Jbalat, IMHO, is the best person, I know, to test the new amazing firmware.

Jbalat did more them 5000 KM with the original TSDZ2 firmware and he can compare the new firmware with the TREK bike with the good Bosch motor.

Regards
Although being some kind of an advertisement for Specialized it's a great video and I love the concept!

This is exactly why I want Bluetooth and/or ANT+. I have received the hardware already, some very small Bluetooth/ANT+ boards which can be mounted inside the motor controller (and display) for configuration, control and firmware updates.

In this video they even explain that the smartphone is able to control the bike via Bluetooth. They don't mean realtime motor control of course but e.g. range and power settings, control and monitoring. Because the smartphone is so powerful nowadays we can even add self-learning assist functions.
 
jbalat said:
Hey EC if you do get to try my firmware then you will be using the quick power feature all the time. top and middle buttons together.
I just want to make a couple of examples.
I am tired so I use max assist 5 so I don’t have to press the peddles hard, but I set max power to 200 so I don’t use too much battery.
Or I use assist level 2 but I set max power to 600. So I ride along at 220w but when I hit a hill it goes to 600w max.

It’s really intuitive when you ride everyday all the time. Trust me on this. It also gives you infinitely many more options than just relying on a preprogrammed power and assist mode.

Anyway yes my cheaper sensors from eBay did not work properly, all 3 were crap. I paid $3.50 for my new one from a local reputable supplier and it actually works. I wouldn’t be surprised if the eBay ones are just counterfeits... I have the six pin so I had to dig in to the jelly stuff to expose the connectors. I use the picture that was posted on the previous page.
Thanks! The examples are very useful, I'm sure I can put this feature to good use myself as well.
 
No worries, btw very dissapointed you still haven’t increased the cadence. I was out doing some mountain biking yesterday on the way home from work and I had to take a run up to get up the hill and noticed the motor did not want to do anything above 95 cadence... if you like I can do those changes for you fairly quickly, now that I’m committed to the temperature sensor I want to get the firmware to a level I’m happy with... sorry I’m selfish that way ;)
 
jbalat said:
if you like I can do those changes for you fairly quickly
I think your changes should be placed on firmware as an option on build/compile time and they should not be the default options.

We did not implement yet FOC field weakening but I "moved" the issue to the new repo: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/11
 
casainho said:
jbalat said:
Woohoo new sensor works ;)
Great!!

You can click POWER ON/OFF + DOWN buttons to cycle/show temperature on the temperature field.
Wow that's so cool when did this happen !! Even the soc is back
 
Hi Guys,
Received all of my gear to upgrade my TSDZ2. I have made the cables, flashed the KT-LCD3 OK.

When I attempt to flash my TSDZ2 I get an error:

Code:
> Loading file C:\Users\Michael\Downloads\TSDZ2-v0.13.1.hex in PROGRAM MEMORY area  ...
< File successfully loaded. File Checksum 0x19D1EE
> Programming  PROGRAM MEMORY area...
Error : Problem while trying to Reset swim and device. Apply a Power On Reset
< PROGRAM MEMORY programming completed.
> Verifying PROGRAM MEMORY area...
Error : Problem while trying to Reset swim and device. Apply a Power On Reset
< PROGRAM MEMORY successfully verified.

I have attempted the EEPROM reset:
To use the reset to factory defaults feature (it's no longer necessary to program the data memory!):
- Enter configuration menu 6
- Go to submenu 3
- Press the UP button 10 times, a counter on the display will be incremented anytime you do this
- The display will turn off
- Turn it on again and it will reset your configuration to the factory defaults!

The KT-LCD lights ups, and shows the correct voltage. (52v battery, fully charged showing 57.7).

The issue that I get is that 0 watts of power are applied to the motor.

Any ideas what I can do to finish this off, and get the bike running again?

Kind Regards
 
Hi all,
So finally have time to program the KT-LCD3 - Blocked at first hurdle :(
I get the following error in the ST software: Cannot communicate with the tool.
Wrong tool selection or check tool power supply or check that a previous session is closed
Any ideas welcome; must be something simple; there is power to the device.
 
Back
Top