TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Electric Motors and Controllers
EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 11 2018 1:04pm

casainho wrote:
Oct 11 2018 12:53pm
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?

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 11 2018 1:29pm

EndlessCadence wrote:
Oct 11 2018 1:04pm
casainho wrote:
Oct 11 2018 12:53pm
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.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 11 2018 3:54pm

casainho wrote:
Oct 11 2018 1:29pm
EndlessCadence wrote:
Oct 11 2018 1:04pm
casainho wrote:
Oct 11 2018 12:53pm
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 wrote:
Oct 03 2018 3:42am
EndlessCadence wrote:
Oct 03 2018 3:38am
casainho wrote:
Oct 02 2018 11:56am
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 wrote:
Oct 05 2018 11:38am
casainho wrote:
Oct 05 2018 7:55am
jbalat wrote:
Oct 05 2018 6:54am
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...

User avatar
jbalat   10 kW

10 kW
Posts: 525
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Oct 12 2018 2:31am

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...
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 3:37am

EndlessCadence wrote:
Oct 11 2018 3:54pm
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.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 3:43am

casainho wrote:
Oct 12 2018 3:37am
EndlessCadence wrote:
Oct 11 2018 3:54pm
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.

User avatar
jbalat   10 kW

10 kW
Posts: 525
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Oct 12 2018 3:51am

Woohoo new sensor works ;)
Attachments
IMG_20181012_44975.jpg
IMG_20181012_44975.jpg (28.7 KiB) Viewed 504 times
IMG_20181012_26378.jpg
IMG_20181012_26378.jpg (27.88 KiB) Viewed 504 times
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 3:54am

jbalat wrote:
Oct 12 2018 3:51am
Woohoo new sensor works ;)
Great!!

You can click POWER ON/OFF + DOWN buttons to cycle/show temperature on the temperature field.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 3:57am

jbalat wrote:
Oct 12 2018 3:51am
Woohoo new sensor works ;)
Wow! I seriously need to order a temperature sensor as well! Which one did you buy? You did have issues before if I remember correctly? I have the 6 pin controller...

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 4:01am

EndlessCadence wrote:
Oct 12 2018 3:43am
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: Select all

#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: Select all

#define DEFAULT_VALUE_TARGET_MAX_BATTERY_POWER                      20 // 20 * 25 = 500
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 4:07am

casainho wrote:
Oct 12 2018 4:01am
EndlessCadence wrote:
Oct 12 2018 3:43am
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: Select all

#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: Select all

#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.

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 4:19am

EndlessCadence wrote:
Oct 12 2018 4:07am
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.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 4:31am

casainho wrote:
Oct 12 2018 4:19am
EndlessCadence wrote:
Oct 12 2018 4:07am
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:

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 4:50am

EndlessCadence wrote:
Oct 12 2018 4:31am
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?? :-)
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 4:52am

casainho wrote:
Oct 12 2018 4:50am
EndlessCadence wrote:
Oct 12 2018 4:31am
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

User avatar
jbalat   10 kW

10 kW
Posts: 525
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Oct 12 2018 5:32am

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.
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 5:44am

jbalat wrote:
Oct 12 2018 5:32am
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.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

AZUR   10 W

10 W
Posts: 79
Joined: Apr 05 2018 6:52am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by AZUR » Oct 12 2018 1:32pm

casainho wrote:
Oct 12 2018 5:44am
jbalat wrote:
Oct 12 2018 5:32am
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

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 3:21pm

AZUR wrote:
Oct 12 2018 1:32pm
casainho wrote:
Oct 12 2018 5:44am
jbalat wrote:
Oct 12 2018 5:32am
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.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Oct 12 2018 3:25pm

jbalat wrote:
Oct 12 2018 5:32am
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.

User avatar
jbalat   10 kW

10 kW
Posts: 525
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Oct 12 2018 6:45pm

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 ;)
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

casainho   100 MW

100 MW
Posts: 2668
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Oct 12 2018 6:57pm

jbalat wrote:
Oct 12 2018 6:45pm
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-fir ... /issues/11
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
jbalat   10 kW

10 kW
Posts: 525
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Oct 12 2018 11:51pm

casainho wrote:
Oct 12 2018 3:54am
jbalat wrote:
Oct 12 2018 3:51am
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
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

kortina   10 mW

10 mW
Posts: 29
Joined: Feb 19 2017 9:24pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by kortina » Oct 13 2018 12:54am

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: Select all

> 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

aja   10 W

10 W
Posts: 69
Joined: May 06 2014 2:05pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by aja » Oct 13 2018 5:38am

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.

Post Reply