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

Electric Motors and Controllers
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 30 2019 8:38am

buba wrote:
Aug 30 2019 6:42am

Do you mean that it should use the assist level just before eMTB? That could be possible to fix but I am afraid that some users have really high values and could get surprised if accidentally on eMTB and enabling Walk Assist.

I understand the inconvenience you are trying to solve though!

EDIT: Have fixed the bug you reported! Thank you!
Just an idea but could you maybe store the last walkassist level used and assume that's a good starting point and set to that level unless the user changes the level while using walkassist, at which point you save the last level again?

I know i tend to use the same walkassist level when i use it and only change a little but another user will likely want a different level.

when you leave WalkAssist you could then return to the previous assist level /eMTB you were on , if you go back into walkassist you should still be at the right level as you were before.
Last edited by perryscope on Aug 30 2019 9:07am, edited 1 time in total.
Empowered people support rider and trustee
www.empoweredpeople.co.uk

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 30 2019 8:58am

There is absolutely nothing wrong now with walk assist as it is. If it ain't broke don't fix it.

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 30 2019 9:17am

Rafe wrote:
Aug 30 2019 8:58am
There is absolutely nothing wrong now with walk assist as it is. If it ain't broke don't fix it.
Fair enough. To be honest i don't have an issue myself, just thinking out loud in case there is a situation other users are seeing an issue with it.
Empowered people support rider and trustee
www.empoweredpeople.co.uk

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Aug 30 2019 10:04am

This is my very first post, I'm a quadriplegic and ride a handcycle with the coaster brake motor. I've been working with Rydon for 2 plus years, as we convert other handcycles and recumbent trikes for the disability community here in Utah and other states. I am so grateful for all those that have contributed to this opensource firmware, it's so much better than the factory firmware. Thank you, Buda, for starting version 20 specifically to address the coaster brake motor. As has been talked about previously the biggest problem was resistance to braking if you didn't pause before you try to apply the coaster brake. When it really became apparent is when you were riding uphill and needed to brake suddenly and the motor would go into reverse and start backing down the Hill. That is Scary!

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Aug 30 2019 10:16am

Whoops, I pushed post before I was finished. Again I am truly grateful for everyone's help getting the coaster brake motor working correctly for riders with very little strength in their arms like me. I have thoroughly enjoyed getting to know version 20 and actually being able to use a coaster brake motor with this firmware for the first time.
I would like to know Is Alpha 10 is going to be available today?
I would love to give it a try tomorrow morning early on my next ride.
I'll try to add my perspective and suggestions and grateful thoughts in the future. As a quad, it takes me some time to either type out a message or use voice and then have to go back and correct everything that it does wrong.
Thanks, Jeff

casainho   10 GW

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

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

Post by casainho » Aug 30 2019 10:34am

jeff.page.rides wrote:
Aug 30 2019 10:16am
Whoops, I pushed post before I was finished. Again I am truly grateful for everyone's help getting the coaster brake motor working correctly for riders with very little strength in their arms like me. I have thoroughly enjoyed getting to know version 20 and actually being able to use a coaster brake motor with this firmware for the first time.
I would like to know Is Alpha 10 is going to be available today?
I would love to give it a try tomorrow morning early on my next ride.
I'll try to add my perspective and suggestions and grateful thoughts in the future. As a quad, it takes me some time to either type out a message or use voice and then have to go back and correct everything that it does wrong.
Thanks, Jeff
Rydon previously shared a picture of you and your hand cycle, on the first time the firmware worked on your coast brake motor :-) Please keep enjoying cycling and help the others that also need this technology and knowledge.
- 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.

andrea_104kg   100 W

100 W
Posts: 181
Joined: Mar 05 2018 5:51pm

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

Post by andrea_104kg » Aug 30 2019 11:28am

what will be the news in the alpha 10 version whose release was dated for today?

User avatar
elfnino   100 mW

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

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

Post by elfnino » Aug 30 2019 12:40pm

buba wrote:
Aug 30 2019 6:42am

Do you mean that it should use the assist level just before eMTB? That could be possible to fix but I am afraid that some users have really high values and could get surprised if accidentally on eMTB and enabling Walk Assist.

I understand the inconvenience you are trying to solve though!

EDIT: Have fixed the bug you reported! Thank you!
Well I see your point safety first :thumb:
Then the only option is to let user to select Assist Level for the Walk Assist in eMTB mode..
I am glad that we have discussed this topic and I am pretty sure an elegant solution will pop up sooner or later .. this is just very minor inconvenience which can wait.

andrea_104kg   100 W

100 W
Posts: 181
Joined: Mar 05 2018 5:51pm

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

Post by andrea_104kg » Aug 30 2019 2:01pm

buba wrote:
Aug 30 2019 4:38am
andrea_104kg wrote:
Aug 28 2019 2:41pm
Today I did 2 tests: installed the alpha 9 version on the 36v engine, obviously it works great. thank you!
Unfortunately the emtb is still bad for me :-(
Later I tried to power the 48v bike with a 36v battery. It becomes very quiet, it is still fully usable on the road. I think we are the only ones who can use different batteries on a central :-)
Thanks again.
but a small test of emtb based on power mode, just to see if it works?
Very glad to hear that you had a great experience on the 36 V motor! :)

I am afraid to change the eMTB now because:

1. Users already use the current eMTB and some are satisfied.
2. I would need to create another eMTB based on power so users can switch between eMTB modes. This would take up more space and I am not comfortable to "borrow" more space when there are a lot more things to fit inside the motor controller.

It will be possible to further improve everything in the future. And then experiment with more functionality and different implementations! Imagine the difference the torque sensor calibration will have that Casainho is planning! So do not perceive the 0.20.0 as the final version. This project will always steadily improve and evolve!

I value the feedback from the community immensely! There will always be someone that thinks of something and then someone else thinks of another thing. And a third thing gets to be implemented that is perfect for all. Together we are slowly making the world's best firmware for the TSDZ2. Without the user suggestions and different views from everyone we would be nowhere close to the firmware we have today.

So I do hope you understand I respect your desire for a power based eMTB! It would be very simple to implement but it needs to go together with everything else planned. It will just take time and cooperation to make everything fit. For the time being, I truly hope you are satisfied with the Power Assist mode and that everything else is working perfectly for you! :)
I don't ask for a new emtb level if for the most part what is there is fine. But if in your experiments you could try, just to see if it actually works and how it works ... so as not to exclude something without trying ...
Then the development can come or not come, no problem. However as you say I am very satisfied even so, I do not feel the real need since on my engine the power mode is already very very emtb :-)

buba   10 kW

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

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

Post by buba » Aug 30 2019 2:34pm

jeff.page.rides wrote:
Aug 30 2019 10:04am
This is my very first post, I'm a quadriplegic and ride a handcycle with the coaster brake motor. I've been working with Rydon for 2 plus years, as we convert other handcycles and recumbent trikes for the disability community here in Utah and other states. I am so grateful for all those that have contributed to this opensource firmware, it's so much better than the factory firmware. Thank you, Buba, for starting version 20 specifically to address the coaster brake motor. As has been talked about previously the biggest problem was resistance to braking if you didn't pause before you try to apply the coaster brake. When it really became apparent is when you were riding uphill and needed to brake suddenly and the motor would go into reverse and start backing down the Hill. That is Scary!

Again I am truly grateful for everyone's help getting the coaster brake motor working correctly for riders with very little strength in their arms like me. I have thoroughly enjoyed getting to know version 20 and actually being able to use a coaster brake motor with this firmware for the first time.
What an absolute pleasure to have you join this wonderful community! Thank you for the kind words and for your appreciation for the development in the 0.20.0! I am stoked!

There is actually much more work that needs to be done with the Coaster Brake version but I think we have a good starting point. Especially with the Alpha 10! Everything will continually develop and improve with all versions onward.

Side note: every little change that improves the Coaster Brake version is also improving all other versions of the TSDZ2. So when making the Coaster Brake version work better it literately improves the experience for every other version and user. This is because the Coaster Brake version needs to be very responsive to user input. And whenever you improve the responsiveness it is automatically transferred to all other versions.


jeff.page.rides wrote:
Aug 30 2019 10:04am
I would like to know Is Alpha 10 is going to be available today?
I would love to give it a try tomorrow morning early on my next ride.
I'll try to add my perspective and suggestions and grateful thoughts in the future. As a quad, it takes me some time to either type out a message or use voice and then have to go back and correct everything that it does wrong.
Thanks, Jeff
Let us welcome you with a release within an hour or so! :wink: I look forward to your thoughts! There are some things I can improve and other things will take more time and extensive work as it changes core functionality. But whatever I can do I will do!

I understand it takes some time to write so we are even more appreciative to be able to read your suggestions.

Thank you!

buba   10 kW

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

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

Post by buba » Aug 30 2019 2:44pm

andrea_104kg wrote:
Aug 30 2019 2:01pm
buba wrote:
Aug 30 2019 4:38am
So I do hope you understand I respect your desire for a power based eMTB! It would be very simple to implement but it needs to go together with everything else planned. It will just take time and cooperation to make everything fit. For the time being, I truly hope you are satisfied with the Power Assist mode and that everything else is working perfectly for you! :)
I don't ask for a new emtb level if for the most part what is there is fine. But if in your experiments you could try, just to see if it actually works and how it works ... so as not to exclude something without trying ...
Then the development can come or not come, no problem. However as you say I am very satisfied even so, I do not feel the real need since on my engine the power mode is already very very emtb :-)
That is fair enough and you are very right! It is on the list! :)


andrea_104kg wrote:
Aug 30 2019 11:28am
what will be the news in the alpha 10 version whose release was dated for today?
Very, very soon there will be some info!

buba   10 kW

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

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

Post by buba » Aug 30 2019 2:46pm

casainho wrote:
Aug 30 2019 10:34am
jeff.page.rides wrote:
Aug 30 2019 10:16am
Whoops, I pushed post before I was finished. Again I am truly grateful for everyone's help getting the coaster brake motor working correctly for riders with very little strength in their arms like me. I have thoroughly enjoyed getting to know version 20 and actually being able to use a coaster brake motor with this firmware for the first time.
I would like to know Is Alpha 10 is going to be available today?
I would love to give it a try tomorrow morning early on my next ride.
I'll try to add my perspective and suggestions and grateful thoughts in the future. As a quad, it takes me some time to either type out a message or use voice and then have to go back and correct everything that it does wrong.
Thanks, Jeff
Rydon previously shared a picture of you and your hand cycle, on the first time the firmware worked on your coast brake motor :-) Please keep enjoying cycling and help the others that also need this technology and knowledge.
I agree! :bigthumb:
Last edited by buba on Aug 30 2019 2:59pm, edited 1 time in total.

buba   10 kW

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

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

Post by buba » Aug 30 2019 2:49pm

elfnino wrote:
Aug 30 2019 12:40pm
buba wrote:
Aug 30 2019 6:42am

Do you mean that it should use the assist level just before eMTB? That could be possible to fix but I am afraid that some users have really high values and could get surprised if accidentally on eMTB and enabling Walk Assist.

I understand the inconvenience you are trying to solve though!

EDIT: Have fixed the bug you reported! Thank you!
Well I see your point safety first :thumb:
Then the only option is to let user to select Assist Level for the Walk Assist in eMTB mode..
I am glad that we have discussed this topic and I am pretty sure an elegant solution will pop up sooner or later .. this is just very minor inconvenience which can wait.
I agree. There will most certainly be some solution that will be very elegant! It is great to have these discussions!

buba   10 kW

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

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

Post by buba » Aug 30 2019 4:21pm

Alpha 10 is GO!

------------------------

Here is the wiki (work in progress):
https://github.com/OpenSource-EBike-fir ... %7C-Manual

------------------------

Here is my Google Drive folder with the Alpha 10:
https://drive.google.com/open?id=1CPGT- ... bYtY4_JH2R

------------------------

Here is my branch where you can see the source code and latest changes:
https://github.com/leon927/TSDZ2-Smart- ... evelopment

------------------------

Here are the changes from Alpha 9:
- Much better brake handling, almost instant system response time when braking
- Coaster brake version has no longer backwards resistance when braking
- Coaster Brake version will enable brake symbol when braking
- Coaster Brake version can enable brake flashing of lights when braking
- Faster motor response
- Safer torque sensor handling

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Aug 30 2019 4:26pm

:bigthumb:
Thank you very much, Rydon will flash it for me tonight and I'll pick it up and be ready to ride in the morning and let you know how things go!

buba   10 kW

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

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

Post by buba » Aug 30 2019 5:20pm

Comment regarding the 0.20.0 Alpha 10:

Coaster Brake is tricky! Not really satisfied with the Coaster Brake response time. Started working on improving it and made some extreme changes for testing. It was extreme enough that it could be classified as another firmware version and would take some time to validate. But to avoid restarting the debugging and validation process I think it is best to limit extreme changes and focus more on quick improvements. I have already pushed back the 0.21.0 plenty, sorry!

I hope everyone considers to update to this alpha version because this should be the last one before we go to beta status on the official project GitHub page. (I just jinxed it didn't I? :wink:) The beta release from the official project page will enable one last validation and check for bugs. Users that update to the Alpha 10 will not have to update to the first 0.20.0 beta.

As always, let me know if there is anything I need to know about the Alpha 10!

buba   10 kW

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

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

Post by buba » Aug 30 2019 5:21pm

jeff.page.rides wrote:
Aug 30 2019 4:26pm
:bigthumb:
Thank you very much, Rydon will flash it for me tonight and I'll pick it up and be ready to ride in the morning and let you know how things go!
Good to hear! Thank you! :bigthumb:

josafrik   1 mW

1 mW
Posts: 13
Joined: Aug 27 2019 1:26pm

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

Post by josafrik » Aug 31 2019 9:31am

I have read on github:
If you don't want to buy the original bootloader box from the manufacturer, you can always use any USBUART 3.3V, like the cheap ones used on Arduino. Also you will need to power the 850C with the battery power.
I live in Spain and it is expensive to buy from the United States with the possible payment of customs fees
Perhaps it has already been posted, but I can't find it, how is made the DIY bootloader to load the firmware on the P850C screen?

Thanks to the forum community

casainho   10 GW

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

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

Post by casainho » Aug 31 2019 12:54pm

josafrik wrote:
Aug 31 2019 9:31am
I have read on github:
If you don't want to buy the original bootloader box from the manufacturer, you can always use any USBUART 3.3V, like the cheap ones used on Arduino. Also you will need to power the 850C with the battery power.
I live in Spain and it is expensive to buy from the United States with the possible payment of customs fees
Perhaps it has already been posted, but I can't find it, how is made the DIY bootloader to load the firmware on the P850C screen?

Thanks to the forum community
Search on Google from USB<->UART cable for Arduino. You will need to use the 3.3V version and connect from your PC to the 850C wires: go to wiki to find which ones are the UART tx and rx wires.
- 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: 135
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Aug 31 2019 2:27pm

I am going to start by talking about who I am and what kind of physical strengths and weaknesses I have as a quadriplegic. By doing this it will be easier for all of you to understand the comments I make about the TSDZ2 and the awesome open-source software that's gonna make a life-changing difference for me and others with disabilities. And then from now on, I can just focus on the Awesome Firmware and ways it helps and ways to improve it.

On August 24th, 2015 I was mountain biking in Colorado and rode off a 6-foot drop I didn't see and broke my neck at C 6-7. Wow, a lack of concentration for just a few seconds can change your whole life. Before this time I rode mountain bikes 3 times a week and had been doing so since 1986.

When you see someone in a wheelchair or on a handcycle that has full arms and hands that means there an Amputee or a paraplegic that broke their back or some other cause. Their upper body works exactly the same as yours and they could build huge muscles. When you see someone in a wheelchair or on a handcycle and their hands don't work they are a quadriplegic and they broke their neck or some other cause. Their upper body is compromised in many different ways. Most of the time their heart and lungs never move past Idol so they can not do cardio which means it's very difficult to build muscle. The easy way to remember the majority of the time is a paraplegic =2 lower limbs doesn’t work correctly or at all and they broke there back. A quadriplegic =4 lower and upper limbs don’t work correctly or at all and they broke their necks. I luckily have biceps that work about 50% of a normal week person and triceps that work about 30% of a normal week person.

From the spring of 2016, I had searched the Internet worldwide and made phone calls many times trying to find a power-assist motor that would work with a coaster brake, that quads need because their arms are generally strapped on to the pedals because they have no grip. Then I found Mark (Rydon) the fall of 2017 at https://www.electrifybike.com/#/ and he was only a couple miles away right down the street. He told me he had a power assist that works with the coaster brake.

The TSDZ2 with its factory firmware did not work at all with week arms it was designed to work with legs. It would work when I had a short steep climb I could get up it without someone pushing me and that's about all it did. I accidentally turned it on a couple of times with my other arm pulling backward on the crank. That fooled the torque sensor into thinking that zero was actually a negative? After a couple of months of trial and error figuring out exactly what was needed. I knew the exact amount of pressure to put on the backward rotation to get the correct amount of power-assist.
If I didn't pull hard enough the power-assist wasn't strong enough if I pull too hard it was difficult to stop forward rotation. Without power assist my average speed was 5 miles an hour I could ride 25 miles in 5 hours. After I figured out the power assist I could ride an average of 15 miles an hour for 30 miles in 2 hours. Wow-what a difference, I called it maximizing my joy, others said I was cheating, but how can you cheat if you're not competing?

Mark and I have built handcycles with power-assist and XShifter to do all the shifting without all the cables and wires going everywhere. We have built them for the University of Utah's Trails program, Wasatch Adaptive Sports the National Ability Center and some personal handcycles for individuals. The programs help those with disabilities enjoy the outdoors by cycling, skiing, and other activities.

With this new open-source firmware, they can ride and have a power-assist that works correctly without having to pull back on the cranks the correct amount. Although if I just use the weight of my arm hanging from the crank in the backward rotation when I turn on the power assistit with the new firmware it works much better than if I just leave the cranks in a neutral position. We can now tailor the amount of assistance to meet the exact needs of each rider.

Below are some links to my Strava page so you can see how far and how often I'm able to ride!

Thanks for reading and trying to understand,
Jeff

https://www.strava.com/athletes/180753

https://www.strava.com/activities/2648226863

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Aug 31 2019 2:54pm

This is a document I made so that I can see all the settings on my phone as I ride and know exactly how to make changes during the ride. The list is at all my current settings.

It's for version 20 Alpha 10
https://docs.google.com/document/d/1orj ... sp=sharing


0: Basic Setup
0: Miles, kilometers

1: Maximum wheel speed (35)

2: Wheel circumference (26=2060)

3: Motor voltage type (0 48v) 1 36v

4: Motor power limit 350W-700W (500W)
or push up&on together

5: Set odometer, Set the odometer to preferred value (0) for new or what your old system has on it. (?)

6: Light 0 Day Time 1 Night 3 Remember last setting (0)

7: Screen brightness, day time mode (5)

8: Screen brightness, night time mode (30)

9: Screen auto power off (15)

10: Reset to defaults 42 Blinks hold the power button


1: Battery Setup
0: Maximum battery current 10A-18 A (13A)

1: Battery low-cut-off voltage 40-42 (40)

2: Number of cells in series13 (14) Jumbo Shark

3: Battery internal resistance 130-(140) Jumbo Shark

4: Battery voltage (SOC) current voltage is ?

5: Enable and set State of Charge function
0 disabled 1 enabled 100-0 2 enabled 0-100 (1)

6: Threshold voltage to reset watt-hour meter (53.0) Jumbo Shark

7: Total watt-hours of battery (870) Jumbo Shark

8: consumed watt-hours since the last reset. is?

2: Power Assist
0: 0 Disable 1 Enable (1)
1: Number of assist levels 1-9 (3)
2: Power Assist level (1)-1.5 (2)-3.0 (3)-6.0

3: Torque Assist
0: 0 Disable 1 Enable (0)
1: Number of assist levels 1-9
2: Power Assist level 1-5

4: Cadence Assist
0: Disable Cadence Assist (0) disable, do not enable without brake cut off’s

5: eMTB Assist
0 Disable 0 Enable (1) eMTB assist sensitivity 1-20 (20)

6: Walk Assist
(0) Walk Assist disabled

7: Cruise
(0) Cruise disabled

8: Main Screen Setup
0 Distance data 1 enabled 0 disable. (1)

1 Battery SOC 1 enabled 0 disable. (1)

2 Battery state 1 enabled 0 disable. (0)

3 Pedal data 1 enabled 0 disable. (0)

4 Energy data 1 enabled 0 disable. (0)

5 Time measurement 1 enabled 0 disable. (1)

6 Wheel speed 1 enabled 0 disable. (0)

7 Motor temperature 1 enabled 0 disable. (0)

8 Display target speed for cruise 1 enabled 0 disable. (0)

9 Enable main screen power menu 1 enabled 0 disable. (1)

10 Temperature field setup 0 = Display nothing (5)
(1) = Motor temperature
(2) = Battery state of charge in percent
(3) = Instantaneous voltage on battery
(4) = Instantaneous current drawn from battery 0
(5) = Pedal cadence (5)
(6) = Average wheel speed since power on

9: Street Mode
0: (0) Street Mode disabled

10: Advanced Setup
0; Motor acceleration adjustment 0-35 % 15

1: Startup assist without pedal rotation 0-30 % 20

2: Pedal torque conversion factor 57- 87 (57)

3: Weight on pedals is?

4: Cadence sensor mode

0 Standard Mode 1 Advanced Mode (1)

5: External lights configuration

(0) lights ON when enabled

6: Optional ADC channel

(0) Not in use

7: Minimum temperature in Celsius (0)

8: Maximum temperature in Celsius (0)

11: Advanced Technical Data
0-7 View only

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Aug 31 2019 2:56pm

:bigthumb:
On today's ride, the first ride with version 20 Alpha 10 the resistance going from pedaling to braking without a pause is much much shorter. Before if you went from pedaling to braking the resistance lasted until you backed off the pressure. Now the resistance only lasts one or two seconds and then it backs off the Resistance itself and the brakes are applied.

With E-MTB and my weak arms, I am using setting 20.
:bigthumb:

casainho   10 GW

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

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

Post by casainho » Aug 31 2019 5:15pm

jeff.page.rides wrote:
Aug 31 2019 2:27pm
I am going to start by talking about who I am and what kind of physical strengths and weaknesses I have as a quadriplegic. By doing this it will be easier for all of you to understand the comments I make about the TSDZ2 and the awesome open-source software that's gonna make a life-changing difference for me and others with disabilities. And then from now on, I can just focus on the Awesome Firmware and ways it helps and ways to improve it.

On August 24th, 2015 I was mountain biking in Colorado and rode off a 6-foot drop I didn't see and broke my neck at C 6-7. Wow, a lack of concentration for just a few seconds can change your whole life. Before this time I rode mountain bikes 3 times a week and had been doing so since 1986.

When you see someone in a wheelchair or on a handcycle that has full arms and hands that means there an Amputee or a paraplegic that broke their back or some other cause. Their upper body works exactly the same as yours and they could build huge muscles. When you see someone in a wheelchair or on a handcycle and their hands don't work they are a quadriplegic and they broke their neck or some other cause. Their upper body is compromised in many different ways. Most of the time their heart and lungs never move past Idol so they can not do cardio which means it's very difficult to build muscle. The easy way to remember the majority of the time is a paraplegic =2 lower limbs doesn’t work correctly or at all and they broke there back. A quadriplegic =4 lower and upper limbs don’t work correctly or at all and they broke their necks. I luckily have biceps that work about 50% of a normal week person and triceps that work about 30% of a normal week person.

From the spring of 2016, I had searched the Internet worldwide and made phone calls many times trying to find a power-assist motor that would work with a coaster brake, that quads need because their arms are generally strapped on to the pedals because they have no grip. Then I found Mark (Rydon) the fall of 2017 at https://www.electrifybike.com/#/ and he was only a couple miles away right down the street. He told me he had a power assist that works with the coaster brake.

The TSDZ2 with its factory firmware did not work at all with week arms it was designed to work with legs. It would work when I had a short steep climb I could get up it without someone pushing me and that's about all it did. I accidentally turned it on a couple of times with my other arm pulling backward on the crank. That fooled the torque sensor into thinking that zero was actually a negative? After a couple of months of trial and error figuring out exactly what was needed. I knew the exact amount of pressure to put on the backward rotation to get the correct amount of power-assist.
If I didn't pull hard enough the power-assist wasn't strong enough if I pull too hard it was difficult to stop forward rotation. Without power assist my average speed was 5 miles an hour I could ride 25 miles in 5 hours. After I figured out the power assist I could ride an average of 15 miles an hour for 30 miles in 2 hours. Wow-what a difference, I called it maximizing my joy, others said I was cheating, but how can you cheat if you're not competing?

Mark and I have built handcycles with power-assist and XShifter to do all the shifting without all the cables and wires going everywhere. We have built them for the University of Utah's Trails program, Wasatch Adaptive Sports the National Ability Center and some personal handcycles for individuals. The programs help those with disabilities enjoy the outdoors by cycling, skiing, and other activities.

With this new open-source firmware, they can ride and have a power-assist that works correctly without having to pull back on the cranks the correct amount. Although if I just use the weight of my arm hanging from the crank in the backward rotation when I turn on the power assistit with the new firmware it works much better than if I just leave the cranks in a neutral position. We can now tailor the amount of assistance to meet the exact needs of each rider.

Below are some links to my Strava page so you can see how far and how often I'm able to ride!

Thanks for reading and trying to understand,
Jeff

https://www.strava.com/athletes/180753

https://www.strava.com/activities/2648226863
Jeff, I will share your story with my family so we all learn more about paraplegic and quadriplegic. Can you please share some more pictures of you riding??
I was thinking in creating a wiki page with your story and some pictures and so this could be an example of what we did achieve with this project, which for me is the real success and then hope this can be the inspiration for other projects alike!!

Knowing this stories, keep me motivated to keep learning for next project, the ELegs: viewtopic.php?f=1&t=100507&p=1470879#p1472460
If I want to have the ELegs for myself, I need to keep working on it with focus and forget every other things around. I think I will stop working on TSDZ2 when the firmware for 850C and SW102 have working stable versions, maybe in 4 or 6 months.
- 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: 135
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Aug 31 2019 5:28pm

casainho wrote:
Aug 31 2019 5:15pm
jeff.page.rides wrote:
Aug 31 2019 2:27pm
I am going to start by talking about who I am and what kind of physical strengths and weaknesses I have as a quadriplegic. By doing this it will be easier for all of you to understand the comments I make about the TSDZ2 and the awesome open-source software that's gonna make a life-changing difference for me and others with disabilities. And then from now on, I can just focus on the Awesome Firmware and ways it helps and ways to improve it.

On August 24th, 2015 I was mountain biking in Colorado and rode off a 6-foot drop I didn't see and broke my neck at C 6-7. Wow, a lack of concentration for just a few seconds can change your whole life. Before this time I rode mountain bikes 3 times a week and had been doing so since 1986.

When you see someone in a wheelchair or on a handcycle that has full arms and hands that means there an Amputee or a paraplegic that broke their back or some other cause. Their upper body works exactly the same as yours and they could build huge muscles. When you see someone in a wheelchair or on a handcycle and their hands don't work they are a quadriplegic and they broke their neck or some other cause. Their upper body is compromised in many different ways. Most of the time their heart and lungs never move past Idol so they can not do cardio which means it's very difficult to build muscle. The easy way to remember the majority of the time is a paraplegic =2 lower limbs doesn’t work correctly or at all and they broke there back. A quadriplegic =4 lower and upper limbs don’t work correctly or at all and they broke their necks. I luckily have biceps that work about 50% of a normal week person and triceps that work about 30% of a normal week person.

From the spring of 2016, I had searched the Internet worldwide and made phone calls many times trying to find a power-assist motor that would work with a coaster brake, that quads need because their arms are generally strapped on to the pedals because they have no grip. Then I found Mark (Rydon) the fall of 2017 at https://www.electrifybike.com/#/ and he was only a couple miles away right down the street. He told me he had a power assist that works with the coaster brake.

The TSDZ2 with its factory firmware did not work at all with week arms it was designed to work with legs. It would work when I had a short steep climb I could get up it without someone pushing me and that's about all it did. I accidentally turned it on a couple of times with my other arm pulling backward on the crank. That fooled the torque sensor into thinking that zero was actually a negative? After a couple of months of trial and error figuring out exactly what was needed. I knew the exact amount of pressure to put on the backward rotation to get the correct amount of power-assist.
If I didn't pull hard enough the power-assist wasn't strong enough if I pull too hard it was difficult to stop forward rotation. Without power assist my average speed was 5 miles an hour I could ride 25 miles in 5 hours. After I figured out the power assist I could ride an average of 15 miles an hour for 30 miles in 2 hours. Wow-what a difference, I called it maximizing my joy, others said I was cheating, but how can you cheat if you're not competing?

Mark and I have built handcycles with power-assist and XShifter to do all the shifting without all the cables and wires going everywhere. We have built them for the University of Utah's Trails program, Wasatch Adaptive Sports the National Ability Center and some personal handcycles for individuals. The programs help those with disabilities enjoy the outdoors by cycling, skiing, and other activities.

With this new open-source firmware, they can ride and have a power-assist that works correctly without having to pull back on the cranks the correct amount. Although if I just use the weight of my arm hanging from the crank in the backward rotation when I turn on the power assistit with the new firmware it works much better than if I just leave the cranks in a neutral position. We can now tailor the amount of assistance to meet the exact needs of each rider.

Below are some links to my Strava page so you can see how far and how often I'm able to ride!

Thanks for reading and trying to understand,
Jeff

https://www.strava.com/athletes/180753

https://www.strava.com/activities/2648226863
Jeff, I will share your story with my family so we all learn more about paraplegic and quadriplegic. Can you please share some more pictures of you riding??
I was thinking in creating a wiki page with your story and some pictures and so this could be an example of what we did achieve with this project, which for me is the real success and then hope this can be the inspiration for other projects alike!!

Knowing this stories, keep me motivated to keep learning for next project, the ELegs: viewtopic.php?f=1&t=100507&p=1470879#p1472460
If I want to have the ELegs for myself, I need to keep working on it with focus and forget every other things around. I think I will stop working on TSDZ2 when the firmware for 850C and SW102 have working stable versions, maybe in 4 or 6 months.
Where and how would you like me to share some pictures?

casainho   10 GW

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

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

Post by casainho » Aug 31 2019 6:04pm

jeff.page.rides wrote:
Aug 31 2019 5:28pm
Where and how would you like me to share some pictures?
Here and them I will put also on the wiki.
- 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.

Post Reply