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

Electric Motors and Controllers
buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 15 2019 3:38pm

elem wrote:
Aug 15 2019 1:49pm
buba wrote:
Aug 15 2019 12:00pm
elem wrote:
Aug 15 2019 11:49am
what i noticed in V0.19 version .
start assist ( marcoq version original was 20, i changed it to 3 and it s OK now ) begin after one or two second and it s seem it s not parametrable ( as in marcoq version using v0.19 )

also stop assist don t stop as soon as you stop pedaling, and never found where it s possible to change this parameter .

as long as i remenber it was ok and may parametrable in v0.16 !?

actualy using v0.19 and LCD3 on one bike and V0.19 with v 0.36 configurator ( from marcoq ) in the other one .

planned to move to v.0.20 in a nearby future, because i found emtb usefull even if it was necessary to change defaut parameters in marcoq version .

on marcoq version i m using a 1.15 multiplier for eMTB mode, i m also testing other change from defaut setting .
I recommend to test the 0.20.0 Alpha if you want the latest changes or you could just wait for a stable release. Marcoqs version and the 0.20.0 can not be compared with the same parameters. I believe the implementations and everything else is totally different to the 0.20.0.

Look forward to feedback! :)
yes i m seeing at all feedback every days since the biginning ;)

and other thing i would know ; is t possible to choose the desired level to use with eMTB ?
Using LCD

with five assists levels, if i could choose the 3 lvl to use eMTB on it , i ll be happy
Great to hear! :)

You can change the sensitivity from the display, here is the wiki if you want to take a look:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

eMTB is the last assist level. So if you have five assist levels eMTB will be the sixth and an "E" will be displayed in the assist level field.


elem wrote:
Aug 15 2019 1:49pm
And yes it s different in marcoq version, in fact for me it s better than standard 0.19 because i can change the duty cycle and other things like that, haven t found on standard 0.19 what i need to change, may be my mistake ? i was using v 0.16 and i thinck it was a really good release .
- Can you explain more about the ability to change the duty cycle?

- And what other things would you like to change, improve or add? If you would like to take a look at the 0.20.0 wiki and maybe give suggestions of improvements to make? Maybe something Marcoq has implemented that we have not yet added or some feature/function that works better.

0.20.0 wiki:
https://github.com/OpenSource-EBike-fir ... %7C-Manual
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

vjvj   10 µW

10 µW
Posts: 6
Joined: Aug 02 2019 11:46am

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

Post by vjvj » Aug 15 2019 4:01pm

Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 15 2019 4:05pm

vjvj wrote:
Aug 15 2019 4:01pm
Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!
Exciting! :) Hope you have a great ride!

Have you enabled the Experimental mode for the 48 V motor? This can be found in the Basic Setup menu.

0.20.0 wiki:
https://github.com/OpenSource-EBike-fir ... %7C-Manual
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

casainho   1.21 GW

1.21 GW
Posts: 3710
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Aug 15 2019 4:15pm

vjvj wrote:
Aug 15 2019 4:01pm
Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!
See on LCD is you are hitting the max motor RPM value, ERPS of 525 and / or the PWM duty-cyle max of 254.

It is being discussed to add small widjets like a bar graph where user can see in real time motor RPM (just like on cars), motor temperature and other variables alike to understand if is near the motor limits. This on the new LCDs 850C and SW102.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and displays (Bafang 850C color, SW102 Bluetooth and KT-LCD3).

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

vjvj   10 µW

10 µW
Posts: 6
Joined: Aug 02 2019 11:46am

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

Post by vjvj » Aug 15 2019 7:37pm

buba wrote:
Aug 15 2019 4:05pm
vjvj wrote:
Aug 15 2019 4:01pm
Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!
Exciting! :) Hope you have a great ride!

Have you enabled the Experimental mode for the 48 V motor? This can be found in the Basic Setup menu.

0.20.0 wiki:
https://github.com/OpenSource-EBike-fir ... %7C-Manual
That did the trick! Wow! So much power now! Incredible.

It states that it's not good for the motor in the documentation. What can I expect in terms of damage? I'll be doing about 6000km in the next two months with it.

dameri   100 W

100 W
Posts: 120
Joined: Sep 20 2018 10:57am

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

Post by dameri » Aug 16 2019 12:32am

casainho wrote:
Aug 15 2019 4:15pm
vjvj wrote:
Aug 15 2019 4:01pm
Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!
See on LCD is you are hitting the max motor RPM value, ERPS of 525 and / or the PWM duty-cyle max of 254.

It is being discussed to add small widjets like a bar graph where user can see in real time motor RPM (just like on cars), motor temperature and other variables alike to understand if is near the motor limits. This on the new LCDs 850C and SW102.
That is great news.

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Aug 16 2019 3:45am

Sorry if its a bit off topic but as we were talking about measuring the battery voltage accurately. I thought I would share a battery meter I have designed recently for my Hailong Batteries.

If anyone is interested in 3D printing there own I put the files up on Thingiverse here. https://www.thingiverse.com/thing:3813009
Useful to check the voltage and not charge to 100% all the time. I may work on a more intelligent meter/charge controller next as I want a way to charge and maintain multiple batteries of different connector types (all 36V) In a better way than having each with its own unique charger and mains socket, A bit of a pain when you have 10 batteries to charge!
Attachments
plugged in meter.jpg
plugged in meter.jpg (126.47 KiB) Viewed 513 times
design.jpeg
design.jpeg (191.89 KiB) Viewed 513 times
Empowered people support rider and trustee
www.empoweredpeople.co.uk

xlxc34   10 µW

10 µW
Posts: 6
Joined: Aug 14 2019 3:22pm

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

Post by xlxc34 » Aug 16 2019 4:06am

buba wrote:
Aug 15 2019 7:38am
xlxc34 wrote:
Aug 15 2019 6:59am
Hi,

I have the 6 wire Tongsheng TSDZ2 with the KLCD 5 screen, and I succesfully installed the version 19 software, had a pedal around and everything was feeling great.

The next day, I turned it on and the speed sensor was going crazy - just basically giving out random numbers. The motor also wasn't running (I assume as a result of this). I guessed this was a faulty connection with the speed sensor but after checking this connection thoroughly I'm happy that it isn't this, so I tried reinstalling the software a couple of times, and I haven't got back to the place where it's working! The weird thing is that the other sensors seem to be being read correctly (checked through section 9 of the main screen). Does anyone have a wiring scheme for the 3 wire speed sensor to the motor so I can rule out hardware? I need it based on wire colours not pins - I broke my original plugs during the install because I'm a terrible solderer!

I initially had the problem with the software flashing where it says something about address not in range (and also warns of lots of bits of memory not being read while reading the TSDZ2 hex file in). It sounds a bit like the problem hego was having?

Has anyone else had this problem? If so, any solutions out there?

I'm going to reflash the original controller for now and go back to the old screen but I'd really like to get this working as it felt great during my one test ride!

At the moment I'm cutting wires and soldering as I broke the plugs during the original install so each trial takes quite a while, but I've ordered some new 6 pin plugs so hopefully I can get back to playing with it once they turn up.

Thanks,

Pete
What device have you selected in the ST Visual Programmer? It should be the STM8S105x6. Could you check that? If that does not work and you still get the "out of range" message we will take it from there!

Let us know how it goes!
I tried again last night... still got the memory error when I was flashing the motor unit but it works this time! I didn't do anything different to previous efforts so I don't have the satisfaction of being able to tell you what fixed it unfortunately, but I'm glad it's sorted. Thanks for the help!

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Aug 16 2019 7:31am

xlxc34 wrote:
Aug 16 2019 4:06am
buba wrote:
Aug 15 2019 7:38am
xlxc34 wrote:
Aug 15 2019 6:59am
Hi,

I have the 6 wire Tongsheng TSDZ2 with the KLCD 5 screen, and I succesfully installed the version 19 software, had a pedal around and everything was feeling great.

The next day, I turned it on and the speed sensor was going crazy - just basically giving out random numbers. The motor also wasn't running (I assume as a result of this). I guessed this was a faulty connection with the speed sensor but after checking this connection thoroughly I'm happy that it isn't this, so I tried reinstalling the software a couple of times, and I haven't got back to the place where it's working! The weird thing is that the other sensors seem to be being read correctly (checked through section 9 of the main screen). Does anyone have a wiring scheme for the 3 wire speed sensor to the motor so I can rule out hardware? I need it based on wire colours not pins - I broke my original plugs during the install because I'm a terrible solderer!

I initially had the problem with the software flashing where it says something about address not in range (and also warns of lots of bits of memory not being read while reading the TSDZ2 hex file in). It sounds a bit like the problem hego was having?

Has anyone else had this problem? If so, any solutions out there?

I'm going to reflash the original controller for now and go back to the old screen but I'd really like to get this working as it felt great during my one test ride!

At the moment I'm cutting wires and soldering as I broke the plugs during the original install so each trial takes quite a while, but I've ordered some new 6 pin plugs so hopefully I can get back to playing with it once they turn up.

Thanks,

Pete
What device have you selected in the ST Visual Programmer? It should be the STM8S105x6. Could you check that? If that does not work and you still get the "out of range" message we will take it from there!

Let us know how it goes!
I tried again last night... still got the memory error when I was flashing the motor unit but it works this time! I didn't do anything different to previous efforts so I don't have the satisfaction of being able to tell you what fixed it unfortunately, but I'm glad it's sorted. Thanks for the help!
Not sure if it helps but I had odd issues programming the Motor when I first tried it and found that it was very sensitive to the length of cable between the ST-LINK device and the speed sensor connector. In the end i had to make mine about 10cm or less for it to be reliable. You might want to check the quality of this connection as it may be sending data ok but not receiving a clear response all the time so maybe failing the verification stage? just a guess but might explain the oddities you are experiencing?
Empowered people support rider and trustee
www.empoweredpeople.co.uk

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 8:09am

vjvj wrote:
Aug 15 2019 7:37pm
buba wrote:
Aug 15 2019 4:05pm
vjvj wrote:
Aug 15 2019 4:01pm
Feedback for 0.20 A7.

I love the open source firmware, it has so many cool features. I plan to use it in two weeks to cycle across Canada East-West.

I am having this issue where, at high cadence (espacially in smaller gears), the motor stops helping and restarts when the cadence is lower. I feel like i'm hitting some kind of wall, power-wise. It is frustrating sometime to have to change gear to have just a little more power.

I am using the Power mode, 52v battery with a 48v motor.

Is there a setting somewhere that I could tweak? Maybe some cadence limiter that I am not seeing?

Thank you!!!!
Exciting! :) Hope you have a great ride!

Have you enabled the Experimental mode for the 48 V motor? This can be found in the Basic Setup menu.

0.20.0 wiki:
https://github.com/OpenSource-EBike-fir ... %7C-Manual
That did the trick! Wow! So much power now! Incredible.

It states that it's not good for the motor in the documentation. What can I expect in terms of damage? I'll be doing about 6000km in the next two months with it.
The only real problem I can imagine is that it will heat up the motor much faster. I would also assume that the controller might heat up faster as well. But overall, nothing to worry about. especially if you have the temperature sensor installed.

Ride safe and have a good trip! :)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

elfnino   100 mW

100 mW
Posts: 38
Joined: Mar 06 2019 5:09am

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

Post by elfnino » Aug 16 2019 8:24am

buba wrote:
Aug 15 2019 3:38pm
elem wrote:
Aug 15 2019 1:49pm

and other thing i would know ; is t possible to choose the desired level to use with eMTB ?
Using LCD

with five assists levels, if i could choose the 3 lvl to use eMTB on it , i ll be happy
Great to hear! :)

You can change the sensitivity from the display, here is the wiki if you want to take a look:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

eMTB is the last assist level. So if you have five assist levels eMTB will be the sixth and an "E" will be displayed in the assist level field.
It would be nice to have multiple eMTB assist levels with different sensitivity on top of the regular assist levels.

I found that sweet spot of eMTB sensitivity (4) where I can completely forget about assist level shifting and just focus on the ride.
However sometimes I need lower sensitivity to save battery or just do harder workout while still enjoying the eMTB assist range.
I think the implementation would not be that difficult just to allow multiple eMTB levels and find option to display E1,E2.. in the assist level field.. (perhaps just dynamically changing 2 letters)

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 8:38am

perryscope wrote:
Aug 16 2019 3:45am
Sorry if its a bit off topic but as we were talking about measuring the battery voltage accurately. I thought I would share a battery meter I have designed recently for my Hailong Batteries.

If anyone is interested in 3D printing there own I put the files up on Thingiverse here. https://www.thingiverse.com/thing:3813009
Useful to check the voltage and not charge to 100% all the time. I may work on a more intelligent meter/charge controller next as I want a way to charge and maintain multiple batteries of different connector types (all 36V) In a better way than having each with its own unique charger and mains socket, A bit of a pain when you have 10 batteries to charge!
Very, very cool!

A lot of people underestimate how important charging is! It is a crucial part on electric vehicles today and is the only thing that can effectively make electric vehicles viable before batteries improve in several key points.

I see you already have considered an option for less than 100 % SOC charging and that is great! 70-80 % can make for an order of magnitude difference for the cycle life. The best value and performance for the TSDZ2 is a nominal 52 V battery that is charged to around 90 % all the time. One could basically use a 48 V charger for the 52 V battery and have the best cycle life ever. That together with the open source firmware is a great combination as the performance will be great!

The problem is that the 52 V battery has to be coupled with a BMS that can balance at the lower charging voltage unless you have quality cells that do not get unbalanced. Even Tesla EVs have passive balancing for their cells and an overall simple balancing approach. Similar to our Hailong batteries.

Please, dear community, forgive me. But I am really passionate about these type of things so whenever someone makes something really interesting I get excited and start writing!

In short, having 10 batteries must be a real challenge :shock: Let us know your experiences with different batteries, voltages and motors with the open source firmware whenever you have something to share!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 8:51am

elfnino wrote:
Aug 16 2019 8:24am
buba wrote:
Aug 15 2019 3:38pm
elem wrote:
Aug 15 2019 1:49pm

and other thing i would know ; is t possible to choose the desired level to use with eMTB ?
Using LCD

with five assists levels, if i could choose the 3 lvl to use eMTB on it , i ll be happy
Great to hear! :)

You can change the sensitivity from the display, here is the wiki if you want to take a look:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

eMTB is the last assist level. So if you have five assist levels eMTB will be the sixth and an "E" will be displayed in the assist level field.
It would be nice to have multiple eMTB assist levels with different sensitivity on top of the regular assist levels.

I found that sweet spot of eMTB sensitivity (4) where I can completely forget about assist level shifting and just focus on the ride.
However sometimes I need lower sensitivity to save battery or just do harder workout while still enjoying the eMTB assist range.
I think the implementation would not be that difficult just to allow multiple eMTB levels and find option to display E1,E2.. in the assist level field.. (perhaps just dynamically changing 2 letters)
It is good you mention that as I would love to have a discussion about this! Would you mind sharing what riding mode you use as default? Power or Torque assist?
Last edited by buba on Aug 16 2019 9:54am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 9:04am

xlxc34 wrote:
Aug 16 2019 4:06am
buba wrote:
Aug 15 2019 7:38am
xlxc34 wrote:
Aug 15 2019 6:59am
I initially had the problem with the software flashing where it says something about address not in range (and also warns of lots of bits of memory not being read while reading the TSDZ2 hex file in). It sounds a bit like the problem hego was having?

Has anyone else had this problem? If so, any solutions out there?

Thanks,

Pete
What device have you selected in the ST Visual Programmer? It should be the STM8S105x6. Could you check that? If that does not work and you still get the "out of range" message we will take it from there!

Let us know how it goes!
I tried again last night... still got the memory error when I was flashing the motor unit but it works this time! I didn't do anything different to previous efforts so I don't have the satisfaction of being able to tell you what fixed it unfortunately, but I'm glad it's sorted. Thanks for the help!

I am a bit worried that something might not be working properly if you still have the memory error. Hego solved the problem but it was allegedly a computer upgrade that fixed the issue. Quote:
hego wrote:
Aug 15 2019 4:29am
Casainho.... The Mistery is over !!!!!!!

Yesterday I tried x-times flash and no success.In the end was an upgrade of my computer system.

Today try to flash the rebell controller again and...... it flashed at the first try.No memory error.

is not a problem with the STM8S105x6 limit memory. Uff !!! It works.

A great new.

But It must config all parametres by hand: all was null !!! ( Maybe mislead cause´many tries)

Well, I will have an other spare 8-pins-Controller, ideal for a thermal sensor ha, ha, ha.

I´m glad.

Thank´s for all.


Also, here is a vary valid tip from user Perryscope:
perryscope wrote:
Aug 16 2019 7:31am
Not sure if it helps but I had odd issues programming the Motor when I first tried it and found that it was very sensitive to the length of cable between the ST-LINK device and the speed sensor connector. In the end i had to make mine about 10cm or less for it to be reliable. You might want to check the quality of this connection as it may be sending data ok but not receiving a clear response all the time so maybe failing the verification stage? just a guess but might explain the oddities you are experiencing?

And here is a word from user Rydon:
Rydon wrote:
Aug 16 2019 12:30am
Hego, sorry to chime in so late but I get this error writing the data segment all the time but like Mctubster, I ignore it or don't write that section at all and just let the prog config write all the values. I have noticed that cable length, 5 volts vs 3.3 volts and having the battery connected or disconnected can all affect whether this error occurs or not.


And lastly Hego:
hego wrote:
Aug 16 2019 12:49am
The battery was never connect. Maybe are the cables, too long..
Thank´s
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

elfnino   100 mW

100 mW
Posts: 38
Joined: Mar 06 2019 5:09am

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

Post by elfnino » Aug 16 2019 10:02am

buba wrote:
Aug 16 2019 8:51am
elfnino wrote:
Aug 16 2019 8:24am
buba wrote:
Aug 15 2019 3:38pm
elem wrote:
Aug 15 2019 1:49pm

and other thing i would know ; is t possible to choose the desired level to use with eMTB ?
Using LCD

with five assists levels, if i could choose the 3 lvl to use eMTB on it , i ll be happy
Great to hear! :)

You can change the sensitivity from the display, here is the wiki if you want to take a look:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

eMTB is the last assist level. So if you have five assist levels eMTB will be the sixth and an "E" will be displayed in the assist level field.
It would be nice to have multiple eMTB assist levels with different sensitivity on top of the regular assist levels.

I found that sweet spot of eMTB sensitivity (4) where I can completely forget about assist level shifting and just focus on the ride.
However sometimes I need lower sensitivity to save battery or just do harder workout while still enjoying the eMTB assist range.
I think the implementation would not be that difficult just to allow multiple eMTB levels and find option to display E1,E2.. in the assist level field.. (perhaps just dynamically changing 2 letters)
It is good you mention that as I would love to have a discussion about this! Would you mind sharing what riding mode you use as default? Power or Torque assist? Because I will give a complete answer as soon as you answer! :)
Power is my default option but I have to admit that Torque has been just lightly tested.
I am eager to see discussion on this :)
Last edited by elfnino on Aug 16 2019 11:20am, edited 1 time in total.

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 10:36am

elfnino wrote:
Aug 16 2019 10:02am
buba wrote:
Aug 16 2019 8:51am
elfnino wrote:
Aug 16 2019 8:24am
buba wrote:
Aug 15 2019 3:38pm


Great to hear! :)

You can change the sensitivity from the display, here is the wiki if you want to take a look:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

eMTB is the last assist level. So if you have five assist levels eMTB will be the sixth and an "E" will be displayed in the assist level field.
It would be nice to have multiple eMTB assist levels with different sensitivity on top of the regular assist levels.

I found that sweet spot of eMTB sensitivity (4) where I can completely forget about assist level shifting and just focus on the ride.
However sometimes I need lower sensitivity to save battery or just do harder workout while still enjoying the eMTB assist range.
I think the implementation would not be that difficult just to allow multiple eMTB levels and find option to display E1,E2.. in the assist level field.. (perhaps just dynamically changing 2 letters)
It is good you mention that as I would love to have a discussion about this! Would you mind sharing what riding mode you use as default? Power or Torque assist? Because I will give a complete answer as soon as you answer! :)
Power is my default option but I have to admin that Torque was is just ligtly tested so far.
I am eager to see discussion on this :)
Thank you for letting me know! You are not the first one to mention this and it is good that you brought it up so we can have a discussion! :)

I will advice one thing. If anyone wants a simple setup with a wide range of assistance I recommend using four levels of assistance. These four levels should use Torque Assist with some values that you setup and configure after your preference. Then enable eMTB Assist which will effectively be your fifth assist level. Choose a sensitivity level that will enable the maximum power you need and the assistance you desire in eMTB Assist.

I think this will satisfy your and others need for normal assistance, less consumption or maybe more of a workout mode. And when you need more power you simply increase the assist level one step or enter eMTB Assist. This is something I recommend to give some time to try out because when properly setup it will work how you describe the ideal experience. If you like eMTB you will like Torque Assist!

Clarification: If anyone likes how the eMTB mode works it is very similar to Torque Assist so give Torque Assist a try! If we had a sensitivity of zero on eMTB it would be just like Torque Assist and just a linear function. So if Torque Assist is setup properly the transition to eMTB will be completely natural but with more power! Please take time to configure and try this out.

The default values are never, ever a perfect match for every user. If they are it is the exception that proves the rule. They are set to a value so users do not need to enter each and every assist level when installing a new release. It is also a good starting point for most users. But for the best experience everyone needs to setup the firmware after their own preference and hardware setup.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 11:41am

I am curious of the sensitivity users have set on the eMTB mode so it would be cool if everyone could vote on what they are using. Please only vote one time. I am sorry for the "User ID" question, you can write whatever you want on that one and you do not need to share any information.

https://docs.google.com/forms/d/e/1FAIp ... sp=sf_link

I will use this information (big data!) to make eMTB better. So no point in voting several times as it will not help. Will post the results when the data converges to a value. And hopefully will be able to make eMTB much better from this poll.

I think this is very exciting and a great way to get feedback from many!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

casainho   1.21 GW

1.21 GW
Posts: 3710
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Aug 16 2019 12:05pm

buba wrote:
Aug 16 2019 10:36am
Thank you for letting me know! You are not the first one to mention this and it is good that you brought it up so we can have a discussion! :)

I will advice one thing. If anyone wants a simple setup with a wide range of assistance I recommend using four levels of assistance. These four levels should use Torque Assist with some values that you setup and configure after your preference. Then enable eMTB Assist which will effectively be your fifth assist level. Choose a sensitivity level that will enable the maximum power you need and the assistance you desire in eMTB Assist.

I think this will satisfy your and others need for normal assistance, less consumption or maybe more of a workout mode. And when you need more power you simply increase the assist level one step or enter eMTB Assist. This is something I recommend to give some time to try out because when properly setup it will work how you describe the ideal experience. If you like eMTB you will like Torque Assist!

Clarification: If anyone likes how the eMTB mode works it is very similar to Torque Assist so give Torque Assist a try! If we had a sensitivity of zero on eMTB it would be just like Torque Assist and just a linear function. So if Torque Assist is setup properly the transition to eMTB will be completely natural but with more power! Please take time to configure and try this out.

The default values are never, ever a perfect match for every user. If they are it is the exception that proves the rule. They are set to a value so users do not need to enter each and every assist level when installing a new release. It is also a good starting point for most users. But for the best experience everyone needs to setup the firmware after their own preference and hardware setup.
About the assistant level, I am being thinking that I do not look much on display current assist level, I just feel if I want more motor assist or less and then I just decrement or decrement in the hope to get what I want at the moment. I have a logic of each assist level being +25% of previous one, when I use configuration menu to choose each assist level rate.

So, I want to try on 850C that up and down buttons simple increase/decrease assist level by a percentage value like 25% (which I will configure such rate on configurations).

If you guys use this, than maybe clicking on power + down buttons could be used to let change other parameter that would be embt rate, just like current motor max power that is done with power + up buttons. Yes, I know that KT-LCD3 has the assist level numbers but we can inovate.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and displays (Bafang 850C color, SW102 Bluetooth and KT-LCD3).

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

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 12:30pm

casainho wrote:
Aug 16 2019 12:05pm
buba wrote:
Aug 16 2019 10:36am
Thank you for letting me know! You are not the first one to mention this and it is good that you brought it up so we can have a discussion! :)

I will advice one thing. If anyone wants a simple setup with a wide range of assistance I recommend using four levels of assistance. These four levels should use Torque Assist with some values that you setup and configure after your preference. Then enable eMTB Assist which will effectively be your fifth assist level. Choose a sensitivity level that will enable the maximum power you need and the assistance you desire in eMTB Assist.

I think this will satisfy your and others need for normal assistance, less consumption or maybe more of a workout mode. And when you need more power you simply increase the assist level one step or enter eMTB Assist. This is something I recommend to give some time to try out because when properly setup it will work how you describe the ideal experience. If you like eMTB you will like Torque Assist!

Clarification: If anyone likes how the eMTB mode works it is very similar to Torque Assist so give Torque Assist a try! If we had a sensitivity of zero on eMTB it would be just like Torque Assist and just a linear function. So if Torque Assist is setup properly the transition to eMTB will be completely natural but with more power! Please take time to configure and try this out.

The default values are never, ever a perfect match for every user. If they are it is the exception that proves the rule. They are set to a value so users do not need to enter each and every assist level when installing a new release. It is also a good starting point for most users. But for the best experience everyone needs to setup the firmware after their own preference and hardware setup.
About the assistant level, I am being thinking that I do not look much on display current assist level, I just feel if I want more motor assist or less and then I just decrement or decrement in the hope to get what I want at the moment. I have a logic of each assist level being +25% of previous one, when I use configuration menu to choose each assist level rate.

So, I want to try on 850C that up and down buttons simple increase/decrease assist level by a percentage value like 25% (which I will configure such rate on configurations).

If you guys use this, than maybe clicking on power + down buttons could be used to let change other parameter that would be embt rate, just like current motor max power that is done with power + up buttons. Yes, I know that KT-LCD3 has the assist level numbers but we can inovate.
Actually that is a good idea! I remember that I used a slider to quickly change the assist level on the quick little iOS app I wrote. It was very adjustable and had nothing to configure in the Configuration menu. I could just choose whatever assistance I wanted on the fly. Either press the PLUS or MINUS button or slide it to a value I felt was perfect. So I can agree that one does not necessarily need to know the value nor assist level. Just increase or decrease after preference.

Anyway, that is a good idea, especially for the new displays but it might be possible to implement something similar on the KT-LCD3!

EDIT: Not really necessary but here is a picture of the very quickly developed prototype app. It had maps as well. But it is far better to use external buttons when you want to change something such as the assist level so I think the displays win on that front even though the app has a slider.
Prot2.png
Prot2.png (70.88 KiB) Viewed 390 times
Last edited by buba on Aug 16 2019 1:14pm, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

e3s   10 W

10 W
Posts: 76
Joined: Jan 08 2018 12:40pm

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

Post by e3s » Aug 16 2019 12:51pm

What about using a linear resistor instead of the throttle to select the level assist?

MathiasP   1 µW

1 µW
Posts: 4
Joined: Aug 02 2019 5:26pm

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

Post by MathiasP » Aug 16 2019 1:18pm

casainho wrote:
Aug 16 2019 12:05pm
buba wrote:
Aug 16 2019 10:36am
Thank you for letting me know! You are not the first one to mention this and it is good that you brought it up so we can have a discussion! :)

I will advice one thing. If anyone wants a simple setup with a wide range of assistance I recommend using four levels of assistance. These four levels should use Torque Assist with some values that you setup and configure after your preference. Then enable eMTB Assist which will effectively be your fifth assist level. Choose a sensitivity level that will enable the maximum power you need and the assistance you desire in eMTB Assist.

I think this will satisfy your and others need for normal assistance, less consumption or maybe more of a workout mode. And when you need more power you simply increase the assist level one step or enter eMTB Assist. This is something I recommend to give some time to try out because when properly setup it will work how you describe the ideal experience. If you like eMTB you will like Torque Assist!

Clarification: If anyone likes how the eMTB mode works it is very similar to Torque Assist so give Torque Assist a try! If we had a sensitivity of zero on eMTB it would be just like Torque Assist and just a linear function. So if Torque Assist is setup properly the transition to eMTB will be completely natural but with more power! Please take time to configure and try this out.

The default values are never, ever a perfect match for every user. If they are it is the exception that proves the rule. They are set to a value so users do not need to enter each and every assist level when installing a new release. It is also a good starting point for most users. But for the best experience everyone needs to setup the firmware after their own preference and hardware setup.
About the assistant level, I am being thinking that I do not look much on display current assist level, I just feel if I want more motor assist or less and then I just decrement or decrement in the hope to get what I want at the moment. I have a logic of each assist level being +25% of previous one, when I use configuration menu to choose each assist level rate.

So, I want to try on 850C that up and down buttons simple increase/decrease assist level by a percentage value like 25% (which I will configure such rate on configurations).

If you guys use this, than maybe clicking on power + down buttons could be used to let change other parameter that would be embt rate, just like current motor max power that is done with power + up buttons. Yes, I know that KT-LCD3 has the assist level numbers but we can inovate.
Can you start with the same functionality you have on KT-LCD3?
It is very interesting that you develop it further but I think it will be less of a problem if you wait a bit to add more features.
Waiting with excitement to try 0.20.0. But I only have 850C display. :-)

Rafe   10 W

10 W
Posts: 91
Joined: Oct 16 2018 5:56pm

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

Post by Rafe » Aug 16 2019 1:35pm

buba wrote:
Aug 16 2019 11:41am
I am curious of the sensitivity users have set on the eMTB mode so it would be cool if everyone could vote on what they are using. Please only vote one time. I am sorry for the "User ID" question, you can write whatever you want on that one and you do not need to share any information.

https://docs.google.com/forms/d/e/1FAIp ... sp=sf_link

I will use this information (big data!) to make eMTB better. So no point in voting several times as it will not help. Will post the results when the data converges to a value. And hopefully will be able to make eMTB much better from this poll.

I think this is very exciting and a great way to get feedback from many!
Buba, now you have explained eMTB mode is an extension of Torque mode and have suggested we tune the Torque mode settings with eMTB as the final setting would it not be better to wait until we have arrived at this new final value for eMTB?

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 1:35pm

e3s wrote:
Aug 16 2019 12:51pm
What about using a linear resistor instead of the throttle to select the level assist?
That would be very possible to implement. But the problem is we would loose either the throttle or the temperature control if we did that. So we would have to write different implementations depending on user setup.

The most optimal thing would be to develop a mode so responsive that you do not need to change the assist levels. Ever. This would be a mode that is also easy to configure for different users and preferences. I am hoping to at least come closer to that with the eMTB mode with the help from the community. If everyone shares their eMTB sensitivity it will help a lot.

And in the future when Casainho implements the torque calibration we will have the ability to improve the riding modes even more. There will be a possibility that some will only need one single assist level.

Similar effect can be noticed in the 0.20.0 compared to the previous firmware versions. 0.20.0 has improved the range and resolution so users have to change assist levels less frequently. The end result is that we can reduce the number of assist levels.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 1:54pm

Rafe wrote:
Aug 16 2019 1:35pm
buba wrote:
Aug 16 2019 11:41am
I am curious of the sensitivity users have set on the eMTB mode so it would be cool if everyone could vote on what they are using. Please only vote one time. I am sorry for the "User ID" question, you can write whatever you want on that one and you do not need to share any information.

https://docs.google.com/forms/d/e/1FAIp ... sp=sf_link

I will use this information (big data!) to make eMTB better. So no point in voting several times as it will not help. Will post the results when the data converges to a value. And hopefully will be able to make eMTB much better from this poll.

I think this is very exciting and a great way to get feedback from many!
Buba, now you have explained eMTB mode is an extension of Torque mode and have suggested we tune the Torque mode settings with eMTB as the final setting would it not be better to wait until we have arrived at this new final value for eMTB?
Just want to clarify: eMTB can be used together with any riding mode and that is totally fine. There is no real need for Torque Assist to be used with eMTB.

But what I proposed was a recommendation for users that are satisfied with how eMTB mode is working, only need a few levels of assistance and would be happy with only using eMTB mode if they had two or three eMTB assist levels. If anyone falls in that category they can try out the recommendation. And that would be to enable a couple of Torque Assist levels and then have eMTB at the end.

I gave that recommendation as I have a suspicion that many users are happy with eMTB but have not even tried Torque Assist. But if they like eMTB it would mean they like Torque Assist. It is just that I sucked at picking good default values.

The final value for the eMTB mode will guide me into tuning the riding mode. The only effect it can have for users that have configured after my recommendation and fall in the category mentioned above is that they will be able to remove another Torque Assist level because eMTB will operate that much better.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 587
Joined: Aug 31 2018 12:36am

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

Post by buba » Aug 16 2019 2:12pm

Update on the eMTB sensitivity poll:

60 % have voted 4
40 % have voted 6

Everyone, so far, is choosing values that are basically in the middle. This is what I wanted and planned for. Basically I can remove the low and high sensitivities and scale it better. At the same time I can adjust the curve to be less aggressive for better response.

Below is a link to some graphs that show every sensitivity level. Sensitivity 1 is the least aggressive curve and 8 is the most aggressive curve.

https://www.desmos.com/calculator/f4bcnr9bjl

Here is a picture of the curves for those not interested in the details:
eMTB-Curves.png
eMTB-Curves.png (112.28 KiB) Viewed 368 times
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

Post Reply