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

Electric Motors and Controllers
Dirkro   1 W

1 W
Posts: 58
Joined: Jun 30 2018 8:18am
Location: Bochum Germay

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

Post by Dirkro » Sep 14 2018 2:26am

Thank you, I am keen to try!
I am a fan of a 35 km/h offroad mode
have a day off today, good weather, will try!

Do I need to reset the EEPROM? and if, how, programmer or is the a menue?
Last edited by Dirkro on Sep 14 2018 2:30am, edited 1 time in total.
Oh darling, this is not a new bike.. :roll:

bart1006   10 W

10 W
Posts: 76
Joined: Sep 24 2012 11:10am
Location: Zwolle

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

Post by bart1006 » Sep 14 2018 2:34am

EndlessCadence wrote:
Sep 13 2018 4:11pm
...
I would like to encourage other beta testers as well!
Let me know what you think of the offroad feature!
...
Super EndlessCadence!!! This feature has been on my wishlist for a long time.
I will try to test it this weekend if I have the time.

Thanks for this feature and i will let you know how it works.

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 » Sep 14 2018 2:48am

Dirkro wrote:
Sep 14 2018 2:25am
Thank you, I am keen to try!
I am a fan of a 35 km/h offroad mode
do I need to reset the Eprom?
Hi Dirk, you can configure any speed you want. Yes I would clear the data memory to be certain, whether it is necessary depends on the previous firmware you were using.
bart1006 wrote:
Sep 14 2018 2:34am
Super EndlessCadence!!! This feature has been on my wishlist for a long time.
I will try to test it this weekend if I have the time.

Thanks for this feature and i will let you know how it works.
Hi Bart, I needed this feature myself as well. If I have the time I will test again tonight and see if I can create a final version with power limiting working as well. Stay tuned, maybe it's ready before the weekend. I'll let you guys know when I have the final version ready.

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 » Sep 14 2018 2:50am

Who is using lights here? I'm having this issue and would like to know if others are having this issue as well: https://github.com/OpenSource-EBike-fir ... /issues/35

Dirkro   1 W

1 W
Posts: 58
Joined: Jun 30 2018 8:18am
Location: Bochum Germay

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

Post by Dirkro » Sep 14 2018 4:03am

I did the first test ride with the new off road firmware.
Unfortunatly the speed limit from Menue 0 is totaly ignored, also at "non offroad mode"
I had problems to set up parameters in menue 1, Can anybody help me wher the new parameters are documented?
I found out: 0- max Amperage somwhere later I found the cell numbe..

rest was very nice
Oh darling, this is not a new bike.. :roll:

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 » Sep 14 2018 6:47am

Dirkro wrote:
Sep 14 2018 4:03am
I did the first test ride with the new off road firmware.
Unfortunatly the speed limit from Menue 0 is totaly ignored, also at "non offroad mode"
I had problems to set up parameters in menue 1, Can anybody help me wher the new parameters are documented?
I found out: 0- max Amperage somwhere later I found the cell numbe..

rest was very nice
Thanks for reporting back! Did the offroad mode work? Also the offroad speed and power limit? Enable/disable on system startup? What exactly did you test?

The speed limit from menu 0 (so, not the offroad speed limit) should still work, will test this myself tonight.

Regarding menu 1: Looking at the code the following is correct (for beta version only!):
0 - battery max current
1 - battery low voltage cut off
2 - battery cells number
3 - battery pack resistance (don't know how this works)

Dirkro   1 W

1 W
Posts: 58
Joined: Jun 30 2018 8:18am
Location: Bochum Germay

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

Post by Dirkro » Sep 14 2018 8:29am

EndlessCadence wrote:
Sep 14 2018 6:47am


...

Thanks for reporting back! Did the offroad mode work? Also the offroad speed and power limit? Enable/disable on system startup? What exactly did you test?

The speed limit from menu 0 (so, not the offroad speed limit) should still work, will test this myself tonight.

....
I was able to switch on the Off- Road Mode, and the Power may have changed... I dont konw which power is set?

The speed limit unfortunatly was allways the value from Offroad Mode.
A said, starting and riding was smooth!!

The Vvltage gauge sas much less fluctuating ! Thank you Casahio
The resistance of the system is maybe for the value in mOhm.
I will try to find this value by setting 7 Amps as maximum and look at the woltage drop when starting.
So far a software I am very happy with, the speed issue should be easy to solve :-)
Oh darling, this is not a new bike.. :roll:

fi7ippo   10 µW

10 µW
Posts: 5
Joined: Aug 26 2018 2:29am

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

Post by fi7ippo » Sep 14 2018 3:50pm

EndlessCadence wrote:
Sep 14 2018 2:50am
Who is using lights here? I'm having this issue and would like to know if others are having this issue as well: https://github.com/OpenSource-EBike-fir ... /issues/35
Hi EndlessCadence, I can confirm the issue, I have the same... If you go back to the topic You can see my post the same day casainho released v0.9 on 05 september but nobody seems to have seen my report, probably because nobody believes a user with a few posts!
I do not know the programming language used for this firmware, I think it is C, but I use easily sql and visual basic, so I know the basics of programming! Besides, if you can help, I have no problem in flashing a new firmware every day, test it and give a feedback on the changes carried out if this can help the development.
In this days I'm building a cylindrical copper waterblock to put around the motor winding for a water cooling system, so I'll post some pictures once done!
For casainho: I tested the new versions with assist level in watt and in my opinion is not a good choice! I think that for boost level the watt adjust is the best way, but for assist level the previous mode (factor) was much smart for me! Why did you change that?
Thats all for now, thank You guys, wonderfull job!

casainho   100 MW

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

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

Post by casainho » Sep 14 2018 5:27pm

fi7ippo wrote:
Sep 14 2018 3:50pm
For casainho: I tested the new versions with assist level in watt and in my opinion is not a good choice! I think that for boost level the watt adjust is the best way, but for assist level the previous mode (factor) was much smart for me! Why did you change that?
I changed because an user told he couldn't understand the factor and asked if was relative to motor power. In the end, it is just another factor. But took me a lot of time to do that change and so I do not plan to go back.
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.

casainho   100 MW

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

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

Post by casainho » Sep 14 2018 5:31pm

I do not have lights installed bit I verified with oscilloscope the signal and it switches as expected. I also looked at the board untill I found what was the pin and found it controls the enable pin of an IC that works as DC-DC step down converter.

When I ride my bicycle at night, I always turn on the lights on LCD3 so I have the background light -- like that I have no problem......
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 » Sep 15 2018 10:52am

Well I have a serious issue unfortunately. After fixing the last issue in the offroad mode I flashed the new hex files to the controller and display. I've also cleared the data memory. When I powered the system the LCD turns on but everything on display remains on and the display isn't initialized.
The EEPROM of the display is written on startup. This isn't the case with the motor controller, it's data memory remains empty. I've tried everything, reprogramming/clearing, older versions of the firmware.
Programming still works fine but the controller doesn't work anymore? What can I do? :cry:

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 11:02am

EndlessCadence wrote:
Sep 15 2018 10:52am
Well I have a serious issue unfortunately. After fixing the last issue in the offroad mode I flashed the new hex files to the controller and display. I've also cleared the data memory. When I powered the system the LCD turns on but everything on display remains on and the display isn't initialized.
The EEPROM of the display is written on startup. This isn't the case with the motor controller, it's data memory remains empty. I've tried everything, reprogramming/clearing, older versions of the firmware.
Programming still works fine but the controller doesn't work anymore? What can I do? :cry:
That happens when there is no communication between controller and LCD. Or you are using a wrong pair of firmwares or maybe a TX or RX wires are not connected anymore.
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 » Sep 15 2018 11:49am

casainho wrote:
Sep 15 2018 11:02am
EndlessCadence wrote:
Sep 15 2018 10:52am
Well I have a serious issue unfortunately. After fixing the last issue in the offroad mode I flashed the new hex files to the controller and display. I've also cleared the data memory. When I powered the system the LCD turns on but everything on display remains on and the display isn't initialized.
The EEPROM of the display is written on startup. This isn't the case with the motor controller, it's data memory remains empty. I've tried everything, reprogramming/clearing, older versions of the firmware.
Programming still works fine but the controller doesn't work anymore? What can I do? :cry:
That happens when there is no communication between controller and LCD. Or you are using a wrong pair of firmwares or maybe a TX or RX wires are not connected anymore.
Thanks casainho! I'm very happy that it is fixed now! I changed no cabling and the firmware combination was correct. It was simply an error in the option bytes! When reading the option bytes of the motor controller I got an error that they were incorrect and needed to be reprogrammed again. When I did that all problems were gone, did you experience this before?

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 11:52am

EndlessCadence wrote:
Sep 15 2018 11:49am
casainho wrote:
Sep 15 2018 11:02am
EndlessCadence wrote:
Sep 15 2018 10:52am
Well I have a serious issue unfortunately. After fixing the last issue in the offroad mode I flashed the new hex files to the controller and display. I've also cleared the data memory. When I powered the system the LCD turns on but everything on display remains on and the display isn't initialized.
The EEPROM of the display is written on startup. This isn't the case with the motor controller, it's data memory remains empty. I've tried everything, reprogramming/clearing, older versions of the firmware.
Programming still works fine but the controller doesn't work anymore? What can I do? :cry:
That happens when there is no communication between controller and LCD. Or you are using a wrong pair of firmwares or maybe a TX or RX wires are not connected anymore.
Thanks casainho! I'm very happy that it is fixed now! I changed no cabling and the firmware combination was correct. It was simply an error in the option bytes! When reading the option bytes of the motor controller I got an error that they were incorrect and needed to be reprogrammed again. When I did that all problems were gone, did you experience this before?
The firmware checks for needed bits enbale on option bytes, if they are not, will write them. Maybe that piece of code can be improved for check to all full bytes of option bytes...
Never happened 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 » Sep 15 2018 11:57am

casainho wrote:
Sep 15 2018 11:52am
The firmware checks for needed bits enbale on option bytes, if they are not, will write them. Maybe that piece of code can be improved for check to all full bytes of option bytes...
Never happened to me.
Thanks for clarifying. I will take a look at this code.

I've thoroughly tested the offroad feature and everything is working fine except for the power limiting. Casainho, is it possible for you to look at my code? I would like to finish this because many of us, including me, need this feature.

Maybe I have a mistake in the current calculation from the configured power? See: https://github.com/endlesscadence/TongS ... bike_app.c

Most interesting part from line 644. Thanks in advance! :D

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 12:09pm

EndlessCadence wrote:
Sep 15 2018 11:57am
casainho wrote:
Sep 15 2018 11:52am
The firmware checks for needed bits enbale on option bytes, if they are not, will write them. Maybe that piece of code can be improved for check to all full bytes of option bytes...
Never happened to me.
Thanks for clarifying. I will take a look at this code.

I've thoroughly tested the offroad feature and everything is working fine except for the power limiting. Casainho, is it possible for you to look at my code? I would like to finish this because many of us, including me, need this feature.

Maybe I have a mistake in the current calculation from the configured power? See: https://github.com/endlesscadence/TongS ... bike_app.c

Most interesting part from line 644. Thanks in advance! :D
Ok but I am being very busy, I hope to do it during next week.
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 » Sep 15 2018 12:13pm

casainho wrote:
Sep 15 2018 12:09pm
EndlessCadence wrote:
Sep 15 2018 11:57am
casainho wrote:
Sep 15 2018 11:52am
The firmware checks for needed bits enbale on option bytes, if they are not, will write them. Maybe that piece of code can be improved for check to all full bytes of option bytes...
Never happened to me.
Thanks for clarifying. I will take a look at this code.

I've thoroughly tested the offroad feature and everything is working fine except for the power limiting. Casainho, is it possible for you to look at my code? I would like to finish this because many of us, including me, need this feature.

Maybe I have a mistake in the current calculation from the configured power? See: https://github.com/endlesscadence/TongS ... bike_app.c

Most interesting part from line 644. Thanks in advance! :D
Ok but I am being very busy, I hope to do it during next week.
Ok, no problem but can we add this version to the main firmware then? It is working perfect and for me (probably most) the power limiting is optional after all.

Two questions:
- there is no development branch for the motor controller?
- You've used the power button + button down combination for the temperature feature if I see it correctly? I'm using the same buttons for offroad as discussed in Github...

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 » Sep 15 2018 12:23pm

I've updated the hex files (see links below) with minor improvements. Offroad mode enabled on system startup is now working. The power limiting isn't working yet but the speed limiting is.

I've succesfully tested a combination of two speed limits. E.g. a 35 km/h speed limit when in offroad mode using the speed limit setting which is in menu 0 and a second speed limit of 25 km/h from the offroad configuration menu when offroad mode is not active.
EndlessCadence wrote:
Sep 13 2018 4:11pm
KT_LCD3_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex
TSDZ2_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex

Configuration:
Use configuration menu 7
0. Offroad functionality -> enable/disable, default disabled
1. Offroad mode active (unlimited speed) on system startup -> enable/disable, default disabled
2. Speed limit when offroad mode not active but enabled (setting 0) -> km/h, default 25 km/h
3. Power limit -> enable/disable, default disabled
4. Power limit -> watts, default 250W

Using (only applicable if setting 0 above is enabled):
1. Offroad mode is shown by the motor assist symbol (directly above the assist level)
  • No blinking -> offroad mode inactive
  • Blinking -> offroad mode active
2. Button on/off + button up (together and both just a short press) -> offroad mode active
3. Button on/off + button down (together and both just a short press) -> offroad mode inactive

Keep in mind that the other speed limit can still be used, so for instance it's possible to have two limits e.g. 25 km/h and 35 km/h.

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 12:34pm

EndlessCadence wrote:
Sep 15 2018 12:13pm
casainho wrote:
Sep 15 2018 12:09pm
EndlessCadence wrote:
Sep 15 2018 11:57am
casainho wrote:
Sep 15 2018 11:52am
The firmware checks for needed bits enbale on option bytes, if they are not, will write them. Maybe that piece of code can be improved for check to all full bytes of option bytes...
Never happened to me.
Thanks for clarifying. I will take a look at this code.

I've thoroughly tested the offroad feature and everything is working fine except for the power limiting. Casainho, is it possible for you to look at my code? I would like to finish this because many of us, including me, need this feature.

Maybe I have a mistake in the current calculation from the configured power? See: https://github.com/endlesscadence/TongS ... bike_app.c

Most interesting part from line 644. Thanks in advance! :D
Ok but I am being very busy, I hope to do it during next week.
Ok, no problem but can we add this version to the main firmware then? It is working perfect and for me (probably most) the power limiting is optional after all.

Two questions:
- there is no development branch for the motor controller?
- You've used the power button + button down combination for the temperature feature if I see it correctly? I'm using the same buttons for offroad as discussed in Github...
Go ahead.
There is no development branch on motor firmware yet because I didn't changed that firmware since we dicided yet.
Well, or you try a different button or you need to change the ones I use. I must say I am not totally happy with buttons and how things change and user understand (or not understand) what is changing -- I think we need to revise that we future but for now, let's keep going further because I think we are finishing now the firmware -- look at the issue list!!
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.

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 12:37pm

I am developing the odometer and for that I am changing the communication because more data need to be sent to LCD. I hope next week to finish odometer, even because I will have a long ride on montains of 350kms in 2 days of the weekend -- I want odometer to help me track how many kms I did travel....
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 » Sep 15 2018 1:06pm

casainho wrote:
Sep 15 2018 12:34pm
There is no development branch on motor firmware yet because I didn't changed that firmware since we dicided yet.
Can you create one then I can create a PR with the offroad feature to that branch.
Well, or you try a different button or you need to change the ones I use. I must say I am not totally happy with buttons and how things change and user understand (or not understand) what is changing -- I think we need to revise that we future but for now, let's keep going further because I think we are finishing now the firmware -- look at the issue list!!
I fully agree with you. The difficulty is that we have only three buttons to play with. In this case I probably won't change your buttons but disable them when offroad mode is enabled, I have no other options? We definitely should look into this.

The same applies to the configuration options, there are a lot of them I don't know if we need all. Maybe we should add a choice between basic or advanced mode as the first configuration option, now users are probably overwhelmed by the amount of options. A quick setup screen (wizard like) would be nice too.

casainho   100 MW

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

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

Post by casainho » Sep 15 2018 1:10pm

EndlessCadence wrote:
Sep 15 2018 1:06pm
casainho wrote:
Sep 15 2018 12:34pm
There is no development branch on motor firmware yet because I didn't changed that firmware since we dicided yet.
Can you create one then I can create a PR with the offroad feature to that branch.
Well, or you try a different button or you need to change the ones I use. I must say I am not totally happy with buttons and how things change and user understand (or not understand) what is changing -- I think we need to revise that we future but for now, let's keep going further because I think we are finishing now the firmware -- look at the issue list!!
I fully agree with you. The difficulty is that we have only three buttons to play with. In this case I probably won't change your buttons but disable them when offroad mode is enabled, I have no other options? We definitely should look into this.

The same applies to the configuration options, there are a lot of them I don't know if we need all. Maybe we should add a choice between basic or advanced mode as the first configuration option, now users are probably overwhelmed by the amount of options. A quick setup screen (wizard like) would be nice too.
I am away from PC but using mobile were I can accept pull requests, so go ahead.
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 » Sep 15 2018 2:50pm

casainho wrote:
Sep 15 2018 1:10pm
EndlessCadence wrote:
Sep 15 2018 1:06pm
casainho wrote:
Sep 15 2018 12:34pm
There is no development branch on motor firmware yet because I didn't changed that firmware since we dicided yet.
Can you create one then I can create a PR with the offroad feature to that branch.
Well, or you try a different button or you need to change the ones I use. I must say I am not totally happy with buttons and how things change and user understand (or not understand) what is changing -- I think we need to revise that we future but for now, let's keep going further because I think we are finishing now the firmware -- look at the issue list!!
I fully agree with you. The difficulty is that we have only three buttons to play with. In this case I probably won't change your buttons but disable them when offroad mode is enabled, I have no other options? We definitely should look into this.

The same applies to the configuration options, there are a lot of them I don't know if we need all. Maybe we should add a choice between basic or advanced mode as the first configuration option, now users are probably overwhelmed by the amount of options. A quick setup screen (wizard like) would be nice too.
I am away from PC but using mobile were I can accept pull requests, so go ahead.
Thanks! I think I found out why the power limiting wasn't working for offroad mode, I was using an incorrect UART package variable ID. Will test the fix tomorrow and create a pull request afterwards.

Meanwhile the beta hex files have been updated for others to test.

Dirkro   1 W

1 W
Posts: 58
Joined: Jun 30 2018 8:18am
Location: Bochum Germay

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

Post by Dirkro » Sep 16 2018 5:31am

Nice to hear, that offroad is working well now!

just one question about the speed limit in different menues:
- in menue 0, isnt that the "standard "speed limit, ?
and
- the speed limit in the offroad menue, should be the offroad speed limit?
this would be my first and logucal guess
But from your explanation it looks otherway round.

Regarding the issues of bad comunication between LCD and Motor: I had this issue with 0.9 when I compiled it myself.

My opinion about factor or power limit : First I was confused too, but after playing with the watts, for me the power solution is more handy. Specaly for low leves, when you want to get range.
You must be "brave" put in values high values like 1200-1500 on the high levels.
Once you find this values (my personal favorite are 6 levels from 250-1500) imho. it is real great.


Unfortunatly I will not be able to test coming week til Saturday :(
Oh darling, this is not a new bike.. :roll:

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 » Sep 16 2018 6:03am

Dirkro wrote:
Sep 16 2018 5:31am
Just one question about the speed limit in different menues:
- in menue 0, isnt that the "standard "speed limit, ?
and
- the speed limit in the offroad menue, should be the offroad speed limit?
this would be my first and logucal guess
But from your explanation it looks otherway round.
If I understand you correctly it is the other way around, but it's quite hard to explain and get's confusing quickly :D
I'll try to explain better:

I have the following example settings:
- menu 0 speed limit: 35 km/h
- offroad feature speed limit: 25 km/h (when offroad is inactive!)

When the offroad mode feature is completely disabled:
- menu 0 speed limit is always used

When offroad mode feature is enabled:
- offroad mode inactive: speed limit from offroad configuration menu is used, in this example 25 km/h
- offroad mode active: speed limit from menu 0 is used, in this example 35 km/h
- optionally the power is limited as well

Summarizing, when using/enabling the offroad feature:
- speed limit of menu 0 acts as a upper speed limit, set high enough for unlimited speed. Of course this is not allowed on public roads in certain countries.
- speed limit of offroad configuration menu acts as a lower limit, this is for road usage. Typically set to 25 km/h
- optionally, power can be limited as well. In EU countries this can be 250W.
Unfortunatly I will not be able to test coming week til Saturday :(
No problem! By then I hope that this feature is officially released already.

Post Reply