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

Electric Motors and Controllers
dameri   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by dameri » Jan 15 2020 9:43am

famichiki wrote:
Jan 14 2020 5:58pm
casainho wrote:
Jan 14 2020 4:14pm
You get to the correct firmware version by following the wiki, the how to install the firmware guide.

There is no other way, users need to update the firmware to latest version.

And I did saw your video and I known because I did the development that the latest version of 0.51.0 has improvements on the issues you did show in the video. So my suggestion to everyone is to update to the latest version.
Thanks, I have just tried following that again. Perhaps I am blind, all the links only seem to lead to more wiki pages. :confused:

https://github.com/OpenSource-EBike-fir ... e-firmware

Let's have an honest discussion about v0.19.0 vs v0.51.0. Specifically which improvements do you think will help with the issues I am seeing and why? I'm interested to learn more.
You can download TSDZ2 v0.51.0 and 850C_v0.6.2 here: https://github.com/OpenSource-EBike-fir ... D/releases

jeff.page.rides   100 W

100 W
Posts: 137
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Jan 15 2020 4:39pm

Is there a TSDZ2 Manual for the 850C v51?

User avatar
elfnino   100 mW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by elfnino » Jan 16 2020 3:41am

jbalat wrote:
Jan 14 2020 5:54pm
casainho wrote:
Jan 14 2020 4:14pm
And I did saw your video and I known because I did the development that the latest version of 0.51.0 has improvements on the issues you did show in the video. So my suggestion to everyone is to update to the latest version.
Hi Casainho, I have been trying to keep up too.. as you know I have the KT LCD3 and I'm on version 20 beta 1 which I'm really happy with. I thought the new version 0.51 now only supports 850c display correct ? From my reading it seems the 850c code isn't as mature as the lcd3 yet ?

If so Is there any way to get it to work on the LCD3, I would love to try 0.51..?

To me it is obvious that KT-LCD3 fork has ended with mature release 0.20 beta1 and I can understand the reasons why Casainho ended support for LCD3 but I am also little skeptical about the maturity level of the new releases like 0.51 which are only based on v0.19.
There are too many improvements I don't want to loose:
buba wrote:
Sep 16 2019 3:26pm

Changelog from the stable 0.19.0:

- Smoother motor torque control
- Overall faster acceleration, much more responsive and more adjustable/customizable
- Named the previous riding mode Power Assist
- Introduced Torque Assist, Cadence Assist and eMBT Assist
- A new automatic calibration process for the cadence sensor
- A new Advanced Mode for the cadence sensor with quicker response times
- A new light mode configuration where users can choose to enable/disable/remember light state through a power cycle
- External light configuration where users can configure the lights to flash, brake-flash when braking and much more!
- Startup without pedal rotation now with adjustable torque threshold
- Improved the KT-LCD3 firmware and updated it to be able to communicate with the new 0.20.0 motor controller firmware
- Added an adjustable button debounce timer for Walk Assist.
- Added a slight button debounce timer for Cruise
- Improved Walk Assist with soft-start
- Improved Walk Assist and Cruise safety
- Cruise much smoother and accurate
- More customizable Street Mode
- Smoother motor control to prolong life of the blue and metal gear
- Brakes now immediately disable the motor
- TSDZ2 coaster brake version can enable system braking by applying backwards torque
- More error codes/states that make the firmware safer to use and protects the hardware
- Higher resolution on the torque sensor output and increased operating range
- Better system calibration during startup
- Adjustable ADC torque conversion for accurate human power in the operating range of the TSDZ2 torque sensor
- Much more accurate data displayed on the KT-LCD3 with a new highly adjustable filter
- Better filtering used in the motor controller firmware
- Improved EEPROM controller
- EEPROM "Reset to defaults" and other functions now operate as intended
- New and improved wheel speed sensor and cadence sensor code
- Improved ADC conversion accuracy for current, voltage and therefore wattage and watt-hour measurements
- Changed and simplified configuration menu (KT-LCD3)
- Added new symbols for readability (KT-LCD3)
- Solved bugs with the TSDZ2 Coaster Brake version
- Backwards motor rotation is now detected and displayed as 0 ERPS
- System changes responsiveness depending on wheel speed
- Extensive refactoring throughout the entire system
- Simplified code for future development and display support, highly modular
- And much more... See the 0.20.0 wiki for even more information!

btslo   10 W

10 W
Posts: 69
Joined: Apr 17 2019 8:55am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by btslo » Jan 16 2020 6:28am

Where is buba anyways? :)

dameri   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by dameri » Jan 16 2020 6:34am

jeff.page.rides wrote:
Jan 15 2020 4:39pm
Is there a TSDZ2 Manual for the 850C v51?
Here: https://github.com/OpenSource-EBike-fir ... on-display

Nfer   10 W

10 W
Posts: 67
Joined: Sep 17 2019 6:51am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by Nfer » Jan 16 2020 8:31am

I was waiting for the SW102 flash with the phone update but it seems it is not going to happen soon. So I was thinking on giving a second try to the solderless method with a second display. But I have some questions:

1. Is it the current SW102 firmware stable and usable?
2. Is there anyone using the firmware and display for everyday commuting?
3. Where is the SW102 firmware file located?
4. Right now my motor is flashed with V0.19 using marcoq configurator. Do I have to flash it again with a base V0.19?

Thanks

Nfer   10 W

10 W
Posts: 67
Joined: Sep 17 2019 6:51am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by Nfer » Jan 16 2020 8:37am

stefkrger wrote:
Jan 14 2020 12:31pm
Today I had a scary experience with the stable 0.19 FW and a SW102 display. While I was riding I noticed the motor was constantly giving assistance even though I was not pedaling. Display showed some error message (only thing I remember it had a file state.c in it). I tried to turn off the system on the display but it did not react. I have the TSDZ2 without throttle and so no power cutoff break levers either.

Luckily I was driving through a park so I could let the wheel spin on the wet grass while I disconnected the battery. That was the only way to stop the motor.

Has anyone experienced something similar? I imagine this can be quite dangerous.

After a restart everything seemed to be back to normal.
What level of assistance were you using? I had the same issue with marcoq V0.19 and Vlcd5 display in assistance 4. After that I have ridden 150 miles in level 3 only with no issues at all

jeff.page.rides   100 W

100 W
Posts: 137
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Jan 16 2020 6:30pm

dameri wrote:
Jan 16 2020 6:34am
jeff.page.rides wrote:
Jan 15 2020 4:39pm
Is there a TSDZ2 Manual for the 850C v51?
Here: https://github.com/OpenSource-EBike-fir ... on-display
Thank You :bigthumb:

jeff.page.rides   100 W

100 W
Posts: 137
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Jan 16 2020 7:09pm

Yesterday I was able to ride my handcycle on a set of rollers for the first time. I learned a lot about my power assist during that ride. I am using v20 Beta with an LCD3.

I tried the 48 Volt experimental setting and I was able to pedal up to 113 cadence and 105 consistently, where before I could only get to and consistently pedal at 90. That extra 15 could come in handy at times.

When I started the system up with no pressure on the pedals or coaster brake in every setting I have except for EMTB the rotation of the motor on the rollers was very inconsistent. Hard and easy spots, it didn’t matter what gear I was in or what assist level the motor was at from 1.0 to 6.0 it was very inconsistent with hard and easy areas. In EMTB it was much smoother but not completely smooth but useable. The lower the cadence and the lower the power the less consistent it was and the higher the power and higher the cadence the more consistent it was.

Then I shut off the system pulled back on the pedals against the coaster brake to the position that my derailleur is in when it feels best when I’m riding. I measured the pull force at about 50 kilograms and tried it again. Now after pulling back 50kg as the system boots when I ride on the rollers, it didn’t matter which setting I was in, which gear I was in or what cadence I was at even down to 25 rpm or cadence
it was very smooth. I could ride at 2.0 and it had more power than before at 6.0.
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.

I think this is the resolution that casainho & buba have been talking about?
In the new version 850C_v0.6.2 and v0.51.0. After you calibrated your torque sensor will it be as smooth as it is when I pull back on the torque sensor in v20b?
When the system boots up in v51 without pulling back will it have the same power I have when I pull back with v20?

Thanks, Jeff

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 17 2020 10:50am

New firmware: Motor max current and Battery max current

I implemented the configuration on the display of the motor max current, so currently we can configure both battery max current and motor max current. The code is now ready to control the motor current, maybe I will implement it soon depending on my tests but I would like to have feedback of users -- for that, please configure the display numeric fields to show:
- human power (only if with torque sensor calibrated!)
- motor power
- motor current
- battery power.

Also configure different motor max current values to see how you feel... The battery max current value should be the max allowed by your battery pack.

For a better understanding, for motor max current, I use a value of 10 amps for my 10 years old son ebike, to reduce the amount of torque since he is small and light. And I use a value of 25 amps for my ebike. The battery max current value, I am keeping at the previous of 16 amps -- we still need more testing to see if there is advantage to increase this value like to 20 or 30 amps.

Release 850C_v0.6.3

Sorry, this firmware works only for 850C display as currently there is an issue with SW102 display firmware.

Changelog:
- other than the battery max current, motor max current value can now be configured on the display (I use a value of 10 amps for my 10 years old son ebike, to reduce the amount of torque since he is small and light. I use a value of 25 amps for my ebike)
- motor current value can now be shown on display numeric fields or graph
- fixed the issue where motor would give a quick when leaving the configurations menu

More information here: https://github.com/OpenSource-EBike-fir ... g-850C-LCD
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

Waynemarlow   1 kW

1 kW
Posts: 356
Joined: Jul 09 2016 7:22am
Location: Bucks, England

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by Waynemarlow » Jan 17 2020 12:39pm

jeff.page.rides wrote:
Jan 16 2020 7:09pm

Then I shut off the system pulled back on the pedals against the coaster brake to the position that my derailleur is in when it feels best when I’m riding. I measured the pull force at about 50 kilograms and tried it again. Now after pulling back 50kg as the system boots when I ride on the rollers, it didn’t matter which setting I was in, which gear I was in or what cadence I was at even down to 25 rpm or cadence
it was very smooth. I could ride at 2.0 and it had more power than before at 6.0.
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.

Thanks, Jeff
Jeff its very easy on the LCD3 to set your own levels of power, have a look at the user manual
https://github.com/OpenSource-EBike-fir ... %7C-Manual
and you can set all the parameters to your own configuration, the default ones are just a guide and a starting point. As I have said before, set your display to output Motor Watts and then ride it on say the rollers, taking note of what Watts is comfortably best for you. I then set up a level, say No 5 to match that output. The others I scaled up and down to slightly overlap to give a bit of scope for those days you want a bit of a "blast " and some less to give me a workout.

Its not to difficult and you should be able to customise your engines output to your requirements without having to frig the system by pulling back on the cranks at start up unless there is some software gremlin in there that we are not aware of.

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 17 2020 1:04pm

Waynemarlow wrote:
Jan 17 2020 12:39pm
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.
Jeff its very easy on the LCD3 to set your own levels of power, have a look at the user manual
Because all torque sensors on TSDZ2 are different, and some are bad in sensitive, you only get the best results if you use the latest firmware version and do the torque sensor full calibration. Also the last firmware version has improve torque sensor sensitivy by 4x and also the current control by 4x, so you will have much better experience with the latest firmware on the difficulties you are having.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

Waynemarlow   1 kW

1 kW
Posts: 356
Joined: Jul 09 2016 7:22am
Location: Bucks, England

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by Waynemarlow » Jan 17 2020 1:19pm

Casainho, I agree that you can get a rogue torque sensor, but I think Jeff may well just need to set up the power output to his requirements which even with a rogue sensor he should be able to do, just the linear ramp of the sensor may not be the best.

The other side of the story is that he needs a rearward motion to activate his brakes which I think only the factory units and V20 has at the moment. Now there's also a whole lot of nice features in the V20 which is way better than the V19, it would be pretty cool if you could incorporate the latest V20 with your software torque sensing as now that would be pretty cool.

Thanks for all the efforts though.

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 17 2020 1:29pm

Waynemarlow wrote:
Jan 17 2020 1:19pm
Now there's also a whole lot of nice features in the V20 which is way better than the V19, it would be pretty cool if you could incorporate the latest V20 with your software torque sensing as now that would be pretty cool.
I don't understand. The latest version is not V19 anymore, is version V53 and is much better.

I think V053 is much better than V20. But please make a list, after testing and comparing each feature, give details and prioritize the items on the list, then I can see what I can bring from the V20, if anything relevant.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 17 2020 1:36pm

Waynemarlow wrote:
Jan 17 2020 1:19pm
Casainho, I agree that you can get a rogue torque sensor, but I think Jeff may well just need to set up the power output to his requirements which even with a rogue sensor he should be able to do, just the linear ramp of the sensor may not be the best.
I think the problem may be his torque sensor lack of sensitivy, and then he needs to setup a very high assist level multiplier and then he looses sensitivity at startup -- hence the dangerous situation the motor doesn't not stop if he reduces the force with arms, meaning bad experience, no good torque sensor, more like a PAS or on/off throttle system.

This is my interpretation after reading his explanation:
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

thineight   100 W

100 W
Posts: 228
Joined: Oct 05 2018 3:53am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by thineight » Jan 17 2020 3:19pm

casainho wrote:
Jan 17 2020 1:29pm
I don't understand. The latest version is not V19 anymore, is version V53 and is much better.

I think V053 is much better than V20. But please make a list, after testing and comparing each feature, give details and prioritize the items on the list, then I can see what I can bring from the V20, if anything relevant.
Indeed the latest firmware is the v0.53 with many interesting stuff, I think the main stopper to update to it and try is that many of us already wired the LCD3 and after all it is a good display that includes all the necessary data. In my opinion many users would prefer to keep that one instead of the 850c. Personally I would consider the smaller sw102 rather than the "bulky" 850c.
Since the latest stable firmware for LCD3 is the very good v.20 I see the point that many of us would like to keep that release alive, to be discussed on the new post dedicated to the LCD3.
By the way.. I did not find the new post that andrea104kg should have opened few days ago, can anybody share the link?
MTB KTM Ultra 29" - City bike DAYTONA 28"

jeff.page.rides   100 W

100 W
Posts: 137
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Jan 17 2020 3:53pm

Waynemarlow wrote:
Jan 17 2020 12:39pm
jeff.page.rides wrote:
Jan 16 2020 7:09pm

Then I shut off the system pulled back on the pedals against the coaster brake to the position that my derailleur is in when it feels best when I’m riding. I measured the pull force at about 50 kilograms and tried it again. Now after pulling back 50kg as the system boots when I ride on the rollers, it didn’t matter which setting I was in, which gear I was in or what cadence I was at even down to 25 rpm or cadence
it was very smooth. I could ride at 2.0 and it had more power than before at 6.0.
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.

Thanks, Jeff
Jeff its very easy on the LCD3 to set your own levels of power, have a look at the user manual
https://github.com/OpenSource-EBike-fir ... %7C-Manual
and you can set all the parameters to your own configuration, the default ones are just a guide and a starting point. As I have said before, set your display to output Motor Watts and then ride it on say the rollers, taking note of what Watts is comfortably best for you. I then set up a level, say No 5 to match that output. The others I scaled up and down to slightly overlap to give a bit of scope for those days you want a bit of a "blast " and some less to give me a workout.

Its not to difficult and you should be able to customise your engines output to your requirements without having to frig the system by pulling back on the cranks at start up unless there is some software gremlin in there that we are not aware of.
Thanks, but I know how to set it all up. My watts are set at 700w, my amps are set at 16a and I have 4 possible settings in power assist (1)1.0 (2)2.0 (3)4.0 (4)6.0 with eMTB set at 20. If I don't pull back against the coaster brake when I turn on it on I can only use (4) and eMTB and I get tired fast on the trail. On the rollers like I talked about before there's very inconsistent pedaling with hard and easy spots. If I pull back 50kg when I start the system I can use all the settings on the trail depending on how hard the trail is and how hard I want to work and on the rollers, it's very smooth no hard and easy spots.
What I would like is the ability to put in the settings a percentage and when you start up the power assist it thinks that I'm pulling back 50kg or what works best for that ride or rider when were not preloading the torque sensor.
Basically a torque-assist sensitivity setting. By doing this everyone that has a standard motor that can't preload the torque sensor will have the same benefit of adjusting the sensitivity of the torque sensor. By doing that not only do you get the power needed when you don't have the strength, you also as I found out yesterday it's very smooth with no hard and easy spots.
I call that a win-win! buba knew what to do and was working on the project before he disappeared. casainho is going about it at a different way but may end up with the same result.

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 17 2020 4:33pm

thineight wrote:
Jan 17 2020 3:19pm
Indeed the latest firmware is the v0.53 with many interesting stuff, I think the main stopper to update to it and try is that many of us already wired the LCD3 and after all it is a good display that includes all the necessary data. In my opinion many users would prefer to keep that one instead of the 850c. Personally I would consider the smaller sw102 rather than the "bulky" 850c.
Since the latest stable firmware for LCD3 is the very good v.20 I see the point that many of us would like to keep that release alive, to be discussed on the new post dedicated to the LCD3.
KT-LCD3 firmware development is frozen, no point discussing issues that were already solved and/or improved on latest firmware version, that could only be developed because the project moved forward.

Good idea to use the other dedicated post and I just updated this post title, so there is no confusion, to:

TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

I would like to keep moving the project forward, in slow and small steps. With focus on which is more relevant and carefully choosing features that I think I will keep doing the maintenance.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

chri27.5   10 mW

10 mW
Posts: 34
Joined: Jan 25 2019 9:46am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by chri27.5 » Jan 17 2020 4:43pm

thineight wrote:
Jan 17 2020 3:19pm
casainho wrote:
Jan 17 2020 1:29pm
I don't understand. The latest version is not V19 anymore, is version V53 and is much better.

I think V053 is much better than V20. But please make a list, after testing and comparing each feature, give details and prioritize the items on the list, then I can see what I can bring from the V20, if anything relevant.
Indeed the latest firmware is the v0.53 with many interesting stuff, I think the main stopper to update to it and try is that many of us already wired the LCD3 and after all it is a good display that includes all the necessary data. In my opinion many users would prefer to keep that one instead of the 850c. Personally I would consider the smaller sw102 rather than the "bulky" 850c.
Since the latest stable firmware for LCD3 is the very good v.20 I see the point that many of us would like to keep that release alive, to be discussed on the new post dedicated to the LCD3.
By the way.. I did not find the new post that andrea104kg should have opened few days ago, can anybody share the link?
Ciao thineight,
ecco il link
viewtopic.php?f=30&t=104232

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Post by casainho » Jan 17 2020 6:19pm

OpenSource EBike app, for TSDZ2 and SW102 display

My wife and me, we were discussing the mobile app design. It is way easier to replicate what is already done on 850C. Here are the wireframes, showing a possible design. Everything is still in development, everything still can change:



My wife repository on Github: https://github.com/aleixonunes/eBikeOpenSource
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

jeff.page.rides   100 W

100 W
Posts: 137
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Jan 18 2020 12:37am

casainho wrote:
Jan 17 2020 1:04pm
Waynemarlow wrote:
Jan 17 2020 12:39pm
If I pull less than this my system doesn’t have enough power for me and if I pull more than this the system wants to run. And I need to stop the rotation, it doesn’t take a lot of effort to stop rotation but if I don’t stop the rotation it will continue to go forward.
Jeff its very easy on the LCD3 to set your own levels of power, have a look at the user manual
Because all torque sensors on TSDZ2 are different, and some are bad in sensitive, you only get the best results if you use the latest firmware version and do the torque sensor full calibration. Also the last firmware version has improve torque sensor sensitivy by 4x and also the current control by 4x, so you will have much better experience with the latest firmware on the difficulties you are having.
It sounds like I'm going to need to replace the display with a 860c and see how all the changes work? I want to jump to the 860c and hope it all works and at sometime in the foreseeable future the forth button will be usible? The main reason that I want to skip the 850c is so it is more visible in direct sunlight.

ezrider1199   10 W

10 W
Posts: 77
Joined: Jul 02 2019 5:42pm

Re: TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Post by ezrider1199 » Jan 18 2020 4:08am

Hi - I just upgraded to the latest 850c and motor firmware (came from lcd3). While i briefly had 0.20beta i noticed it had a very gentle throttle initiation whereas 0.52 goes *clank* in the drivetrain/gear/slack when i press the throttle. Also was wondering if it's possible to speed up and smooth out UI actions and button responsiveness? there seems to be a sort of inconsistent lag between button press and UI action. Just wondering as I like to quickly change PAS and its hard to run through the pas numbers through quick button presses. Thank you

Nfer   10 W

10 W
Posts: 67
Joined: Sep 17 2019 6:51am

Re: TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Post by Nfer » Jan 18 2020 8:45am

casainho wrote:
Jan 17 2020 6:19pm
OpenSource EBike app, for TSDZ2 and SW102 display

My wife and me, we were discussing the mobile app design. It is way easier to replicate what is already done on 850C. Here are the wireframes, showing a possible design. Everything is still in development, everything still can change:



My wife repository on Github: https://github.com/aleixonunes/eBikeOpenSource
Nice job!

casainho   10 GW

10 GW
Posts: 4378
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Post by casainho » Jan 18 2020 8:54am

ezrider1199 wrote:
Jan 18 2020 4:08am
Hi - I just upgraded to the latest 850c and motor firmware (came from lcd3). While i briefly had 0.20beta i noticed it had a very gentle throttle initiation whereas 0.52 goes *clank* in the drivetrain/gear/slack when i press the throttle.
I don't have a throttles on my ebikes so I can't develop. But I think you can improve by reducing the current ramp value and also the motor max current value. Keep the battery current at a value you wish, like for instance 16 amps.
ezrider1199 wrote:
Jan 18 2020 4:08am
Also was wondering if it's possible to speed up and smooth out UI actions and button responsiveness? there seems to be a sort of inconsistent lag between button press and UI action. Just wondering as I like to quickly change PAS and its hard to run through the pas numbers through quick button presses. Thank you
It is not PAS, what you change are the assist levels.

The limitation comes because we have possibility to detect quick, quick + long and long press on each button. With that we are doing much more than original firmware does but the button reaction is slower.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers 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.

ezrider1199   10 W

10 W
Posts: 77
Joined: Jul 02 2019 5:42pm

Re: TSDZ2 mid drive and 850C and SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Post by ezrider1199 » Jan 18 2020 12:11pm

I briefly did some stuff in arduino that involved buttons and long presses. It's kind of a hassle to work with and i think the trick was to time how long it was pressed. If <50ms its a short click, if >50ms its a long click. You should also give a buffer time (say 50ms) after clicks so you can have ability to chain click actions. If nothing is clicked on in that buffer time then you enter an action state. All these numbers can be tuned to maximize user friendliness and speed. This would also improve navigation in menus and responsiveness especially for people who tinker constantly with many options. Maximum lag in this scenario would be 50ms but even a bit more would be ok too

Post Reply