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

Thancks marcoq for your contribution ...

Firmware tested with VLCD5 and seem to work fine .

As there is not many people in france that are using TSDZ2, i put the endless-sphere informations on my blog .
https://elementaire01.blogspot.com/2018/12/open-source-firmware-tsdz2-tongsheng.html
 
Casainho, soon I am submitting a new pull request with a new function: time measuring. Wanted to make another video explaining and showing the function but have no time right now. ( haha :wink: )

I think it would be smart to incorporate this in the version 0.17 release.

Changes:

- Time measured since last power on, displayed in seconds and minutes. Using TM symbol.
- Total time measured since last reset, displayed in minutes and hours. Using TTM symbol.
- New menu, 6, where you switch between TM or TTM. User choice saves in EEPROM.
- LCD_print function can print to two new fields.
- Solved other bugs that we have not yet noticed.
- Overall improvements and minor changes throughout.

Will try to test as much as possible and make the last changes so you get the pull request tomorrow/today.
 
I road tested 17.0 Beta4 and pleased to report that all the bugs I brought to your attention are now fixed. :bigthumb:

Not wanting to be a killjoy but I am going to have to mention it. Indicated human power (4.0) is now ridiculously high, I can easily get it past a Kilowatt so as a result I have had to reduce the power assist and power boost settings right down. The last time I looked at human power I could easily reach 500 watts plus and that must have been at least double my true input probably more. I'm not sure when human power increased to a Kilowatt plus but using 16.1 I certainly did not notice it and I did several hundred miles on that firmware but I never took any of the 17.0 Betas before 17.4 out on the road.

I am using 9 pedal assist levels and have spaced them out from 0.2 to 2.2 and also had them set at those values for 16.1 firmware but now with 17.4 beta I have had to reduce the power boost settings from what I had set at 2 (default is 4) right down to 0.2 on all 9 levels. Otherwise even in assist level 1 with this latest firmware the power boost set at default 4 was taking me towards 500 watts of motor power when I started pedalling again.
 
buba said:
Casainho, soon I am submitting a new pull request with a new function: time measuring. Wanted to make another video explaining and showing the function but have no time right now. ( haha :wink: )

I think it would be smart to incorporate this in the version 0.17 release.

Changes:

- Time measured since last power on, displayed in seconds and minutes. Using TM symbol.
- Total time measured since last reset, displayed in minutes and hours. Using TTM symbol.
- New menu, 6, where you switch between TM or TTM. User choice saves in EEPROM.
- LCD_print function can print to two new fields.
- Solved other bugs that we have not yet noticed.
- Overall improvements and minor changes throughout.

Will try to test as much as possible and make the last changes so you get the pull request tomorrow/today.
Seems the KT-LCD3 firmware is 98% finished!! I am not aware of other things missing, other than max and average speeds (I personally do not value that).

Also a small optimization, but not mandatory: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/55

And maybe make possible to configure on LCD the current ramp step...
 
:bigthumb:
  • And maybe make possible to configure on LCD the current ramp step...
perfect ! don t now if it was possible to do it before, but it s a feature i was hopping .

originale tongsheng was too strong ( no ramp but the first motor i got , the wish one who accepted also 48V had a progressive current ramp, and not the other motor ... i have 4, one for parts, the oldest waiting and 2 in use, one with 0.16 marcoq dev, and one waiting to test last casainho firmware but it s an ancient one with dedicated programming port and nothing on the connector from wheel )

Sorry if my english is difficult to understand, sometimes i don t want use google translator ... :roll:
 
casainho said:
buba said:
Casainho, soon I am submitting a new pull request with a new function: time measuring. Wanted to make another video explaining and showing the function but have no time right now. ( haha :wink: )

I think it would be smart to incorporate this in the version 0.17 release.

Changes:

- Time measured since last power on, displayed in seconds and minutes. Using TM symbol.
- Total time measured since last reset, displayed in minutes and hours. Using TTM symbol.
- New menu, 6, where you switch between TM or TTM. User choice saves in EEPROM.
- LCD_print function can print to two new fields.
- Solved other bugs that we have not yet noticed.
- Overall improvements and minor changes throughout.

Will try to test as much as possible and make the last changes so you get the pull request tomorrow/today.
Seems the KT-LCD3 firmware is 98% finished!! I am not aware of other things missing, other than max and average speeds (I personally do not value that).

Also a small optimization, but not mandatory: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/55

And maybe make possible to configure on LCD the current ramp step...

Do you have walk assist in LCD3?
 
AZUR said:
Seems the KT-LCD3 firmware is 98% finished!!
Do you have walk assist in LCD3?
[/quote]
Yes, LCD3 already implement walk assist but is the TSDZ2 motor controller firmware that lacks the needed implementation.
 
casainho said:
AZUR said:
Seems the KT-LCD3 firmware is 98% finished!!
Do you have walk assist in LCD3?


Yes, LCD3 already implement walk assist but is the TSDZ2 motor controller firmware that lacks the needed implementation.


Thanks Casainho.
Have an Happy new year.
 
AZUR said:
Thanks Casainho.
Have an Happy new year.
Thanks. And I started this project on April and in 2019 will be the first spring that I will be riding on mountains that I like so much and that I never did before -- ebikes and in particular TSDZ2 really improved my life (also for my family members!). I am happy that this technology will also improve the life of others on the new year!!

Screenshot-from-2018-12-30-11-33-47.png


I don't know what will happen to ebikes but I already started to looking at my next project, something that may take 10 years or more and that I did discover the need using TSDZ2 on mountains!!

Other than cycling, a lot of people here also run/walk on mountains... put an electric motor on an already existing bicycle is kind of easy but developing an exoskeleton so the heavy people like me can run/walk on mountains, should be very hard!!
And for commuting, could be walking/running at 1/2 or 1/4 of effort be a good solution? could exoskeletons be more convenient to use than bicycles or scooters? -- I wish I could go running to work, with a happy big smile on the face :)

There are no cheap chinese exoskeleton on Ebay or Aliexpress...
 
casainho said:
Yes, LCD3 already implement walk assist but is the TSDZ2 motor controller firmware that lacks the needed implementation.

If I remember correctly Marcoq mentioned that in its fork with the original display the walk assist function was working.
From your point of view is it possible to get the necessary piece of code and Implement it in the motor firmware?

Thanks and happy new year's eve.
Ciao.
 
casainho said:
Other than cycling, a lot of people here also run/walk on mountains... put an electric motor on an already existing bicycle is kind of easy but developing an exoskeleton so the heavy people like me can run/walk on mountains, should be very hard!!
And for commuting, could be walking/running at 1/2 or 1/4 of effort be a good solution? could exoskeletons be more convenient to use than bicycles or scooters? -- I wish I could go running to work, with a happy big smile on the face :)

There are no cheap chinese exoskeleton on Ebay or Aliexpress...

This project is already up an running from US military research. I saw a video where they use exoskeleton to move troops in rough terrain with considerable payload impossible to carry by human.
Quite a few videos on YouTube on the topic. Not sure if 36 or 48v :lol:
 
thineight said:
casainho said:
Other than cycling, a lot of people here also run/walk on mountains... put an electric motor on an already existing bicycle is kind of easy but developing an exoskeleton so the heavy people like me can run/walk on mountains, should be very hard!!
And for commuting, could be walking/running at 1/2 or 1/4 of effort be a good solution? could exoskeletons be more convenient to use than bicycles or scooters? -- I wish I could go running to work, with a happy big smile on the face :)

There are no cheap chinese exoskeleton on Ebay or Aliexpress...

This project is already up an running from US military research. I saw a video where they use exoskeleton to move troops in rough terrain with considerable payload impossible to carry by human.
Quite a few videos on YouTube on the topic. Not sure if 36 or 48v :lol:
Militar technology and knowledge is not accessible for the general of us, so no big point about it.
 
Rafe said:
Not wanting to be a killjoy but I am going to have to mention it. Indicated human power (4.0) is now ridiculously high, I can easily get it past a Kilowatt...

Have not looked at that before and may look into it. Have made a pull request for the latest beta and I am simply dividing the value by half in that firmware. So it should represent human power a bit better. That will work for now. Thank you for your feedback!

casainho said:
Seems the KT-LCD3 firmware is 98% finished!! I am not aware of other things missing, other than max and average speeds (I personally do not value that).

Also a small optimization, but not mandatory: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/55

And maybe make possible to configure on LCD the current ramp step...

Let us see what the new year will bring! :wink:

A new pull request has been submitted and awaiting approval!

casainho said:
There are no cheap chinese exoskeleton on Ebay or Aliexpress...

Sadly, no... :(

I want to wish everyone a happy New Year if this ends up being my last reply this year! :D
 
Hello everybody

I am new to the forum and an owner of the tsdz2 system.

Would really apreciate if someone could help me. I' ve read through some of the pages of the forum but haven't seen the solution for my "problem". What is the easiest way to increase the cadence on the system?

Thank you!
 
There is no easy way to up the cadence I'm afraid with the standard motor direct from the factory, it is a pain for any body who cycles a lot and has a slightly more higher cadence than you average commuter. Do consider though to simply revise your riding style to a lower more torque based cadence which once you get used to simply using a larger gear and slower cadence is OK

There are a number of routes to up its cadence however.

1/ change the voltage from 36volt to 48 volt but you will need to change the base voltage levels in the motor Epprom as the 36 volt unit will not work with simply upping the voltage. There are a number of video links on these pages as how you do this.
2/ Change the motor firmware to what is now called the OpenSource firmware. Casainho and with the help of others has implemented a better firmware which makes the use of specialist software to allow the cadence to rise and the efficiency of the engine improve. At this stage you will also need to change the LCD to another type LCD3 or the latter colour 850C.
3/ Wait a bit, there are others working on taking that OpenSource firmware and incorporating it into the standard LCD display.

Personally I would suggest spend a bit of time reading up a bit on the other thread (There is no easy lunch I'm afraid to say ) and you will quickly work out which route you want to go. Remember there is no easy path here and you yourself are going to have to put in a bit of time and effort to get the maximum benefit back to you.
 
elem said:
36V stock firmware accept 11S battery, that s up 10% rpm .

But that is a specialist non standard battery with a non standard charger, is it worth the agro or better simply reprogramming to take the 48v.

Others have also fitted a 36v engine into a 48v unit or fitted a 48v controller into 36v unit. Far easier to buy a cheap STlink and reprogram.
 
Hi,

I am ordering the motor from aliexpress, but there are options
48V 500W
48V 750W
52V 750W

It is actually the same motor and same controller ?
 
Peetsyo said:
Hi,

I am ordering the motor from aliexpress, but there are options
48V 500W
48V 750W
52V 750W

It is actually the same motor and same controller ?
With all due respect this is the software side of the TDSZ2, perhaps you could spend 10 minutes and read a bit of the main tdsz2 thread and you will find your answer.
 
thineight said:
casainho said:
Yes, LCD3 already implement walk assist but is the TSDZ2 motor controller firmware that lacks the needed implementation.

If I remember correctly Marcoq mentioned that in its fork with the original display the walk assist function was working.
From your point of view is it possible to get the necessary piece of code and Implement it in the motor firmware?

Thanks and happy new year's eve.
Ciao.
Let me quote my own message.. I saw the Italian forum where Marcoq confirmed that he implemented the walk assist function.
Does any of the gurus think about copying the necessary code to implement the function in the stable version?

Happy 2019!!!
 
Peetsyo said:
Hi,

I am ordering the motor from aliexpress, but there are options
48V 500W
48V 750W
52V 750W

It is actually the same motor and same controller ?

Yes they are all the same except the controllers have a different program. You could in theory just buy the cheapest version and either go straight to the open source firmware on this discussion topic using LCD3 or reprogram the OEM Tongsheng firmware following this link


https://www.eco-ebike.com/blogs/eco-cycles-instructionals/tsdz2programmingfromscratch

Hope that helps.
 
buba said:
Rafe said:
Not wanting to be a killjoy but I am going to have to mention it. Indicated human power (4.0) is now ridiculously high, I can easily get it past a Kilowatt...

Have not looked at that before and may look into it. Have made a pull request for the latest beta and I am simply dividing the value by half in that firmware. So it should represent human power a bit better. That will work for now. Thank you for your feedback!

Im curious on this as I have really been going over the power calculation code stuff quite heavily the last few days. At first I thought(human power calculation being off) might be something with the left/right pedals giving different torque readings but I verified they both gave the same readings (47) with 20# attached to each pedal with the back wheel blocked. This value matches what the code is using for torque sensor scaling. I even played with some c code today trying to characterize the reading of the torque sensor at 10Hz vs different cadence and the filtering of it by the display. No conclusions yet other than it can get complicated and we are dealing with 8 bit processors here

https://bicycles.stackexchange.com/questions/23405/analysis-of-stages-high-speed-data

0.17.x has no changes to the motor controller, only on the display.

The torque/power/assist level calculation is done in the controller software at 10Hz and sent to the display which applies a low pass filter so the display changes in 0.17.x shouldnt affect assist level multipliers, only the display of power.

So in summary, the controller power calculations seem spot on, basically measuring the torque sensor at 10Hz, using that and cadence to compute power. While there are fluctuations in the pedal pressure and computed power, I believe this is exactly how the assist should be working (i.e. amplifying your inputs throughout the pedal stroke).

How this works out on the display might/could be improved(i.e. computing average of all values from controller every second). Heck simply dividing by 2 on the display might be good enough.

I decided to abandon the 850c display today and go back to the LCD3 with the buttons from the 850C which are AWESOME. After I got it all wired up I noticed that what the LCD3 was showing for config settings in no way matched what the 850C was telling me. Although I had done 'restore to defaults' on the 850C, what was being shown on the LCD3 were the values I had set on the LCD3 prior to using the 850C. Just a note to casainho. This might be 'as expected' depending on what is stored in the display vs controller, just wanted to mention it
 
linklemming said:
buba said:
Rafe said:
Not wanting to be a killjoy but I am going to have to mention it. Indicated human power (4.0) is now ridiculously high, I can easily get it past a Kilowatt...

Have not looked at that before and may look into it. Have made a pull request for the latest beta and I am simply dividing the value by half in that firmware. So it should represent human power a bit better. That will work for now. Thank you for your feedback!

Im curious on this as I have really been going over the power calculation code stuff quite heavily the last few days. At first I thought(human power calculation being off) might be something with the left/right pedals giving different torque readings but I verified they both gave the same readings (47) with 20# attached to each pedal with the back wheel blocked. This value matches what the code is using for torque sensor scaling. I even played with some c code today trying to characterize the reading of the torque sensor at 10Hz vs different cadence and the filtering of it by the display. No conclusions yet other than it can get complicated and we are dealing with 8 bit processors here

https://bicycles.stackexchange.com/questions/23405/analysis-of-stages-high-speed-data

0.17.x has no changes to the motor controller, only on the display.

The torque/power/assist level calculation is done in the controller software at 10Hz and sent to the display which applies a low pass filter so the display changes in 0.17.x shouldnt affect assist level multipliers, only the display of power.

So in summary, the controller power calculations seem spot on, basically measuring the torque sensor at 10Hz, using that and cadence to compute power. While there are fluctuations in the pedal pressure and computed power, I believe this is exactly how the assist should be working (i.e. amplifying your inputs throughout the pedal stroke).

How this works out on the display might/could be improved(i.e. computing average of all values from controller every second). Heck simply dividing by 2 on the display might be good enough.

I decided to abandon the 850c display today and go back to the LCD3 with the buttons from the 850C which are AWESOME. After I got it all wired up I noticed that what the LCD3 was showing for config settings in no way matched what the 850C was telling me. Although I had done 'restore to defaults' on the 850C, what was being shown on the LCD3 were the values I had set on the LCD3 prior to using the 850C. Just a note to casainho. This might be 'as expected' depending on what is stored in the display vs controller, just wanted to mention it
There is the low pass filter on hardware and I don't know how it changes the signal.

How about find the max/peak values on every cadence RPS and consider it is 2 half of sinewaves per RPS and then calc the average value with the math formulate for a sinewave??

https://www.electronics-tutorials.ws/accircuits/average-voltage.html
 
Waynemarlow said:
There is no easy way to up the cadence I'm afraid with the standard motor direct from the factory, it is a pain for any body who cycles a lot and has a slightly more higher cadence than you average commuter. Do consider though to simply revise your riding style to a lower more torque based cadence which once you get used to simply using a larger gear and slower cadence is OK

There are a number of routes to up its cadence however.

1/ change the voltage from 36volt to 48 volt but you will need to change the base voltage levels in the motor Epprom as the 36 volt unit will not work with simply upping the voltage. There are a number of video links on these pages as how you do this.
2/ Change the motor firmware to what is now called the OpenSource firmware. Casainho and with the help of others has implemented a better firmware which makes the use of specialist software to allow the cadence to rise and the efficiency of the engine improve. At this stage you will also need to change the LCD to another type LCD3 or the latter colour 850C.
3/ Wait a bit, there are others working on taking that OpenSource firmware and incorporating it into the standard LCD display.

Personally I would suggest spend a bit of time reading up a bit on the other thread (There is no easy lunch I'm afraid to say ) and you will quickly work out which route you want to go. Remember there is no easy path here and you yourself are going to have to put in a bit of time and effort to get the maximum benefit back to you.


Thank you for your reply.

I already bought the stlink. So the "easyest" i guess is then changung the firmware and the lcd to KT-lcd3 right?
I really don't like the big lcd that is needed. So for now there is no way to keep the stock XH18 display and increase the cadence with software?

Thank you
 
Pirmoz said:
Thank you for your reply.

I already bought the stlink. So the "easyest" i guess is then changung the firmware and the lcd to KT-lcd3 right?
I really don't like the big lcd that is needed. So for now there is no way to keep the stock XH18 display and increase the cadence with software?

Thank you

Can I suggest you transfer over to the main thread on this engine, all your questions are already answered and if you read probably the last 10 or so pages it will be pretty clear what you should be doing.


https://endless-sphere.com/forums/viewtopic.php?f=28&t=79788
 
Back
Top