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

Electric Motors and Controllers
phidauex   10 µW

10 µW
Posts: 5
Joined: Aug 13 2019 11:00pm
Location: Colorado

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

Post by phidauex » Aug 18 2019 1:58am

geeksville wrote:
Aug 17 2019 9:29pm
Not speaking for casainho, but for my part I need at least one week (possibly two if I slack off) before the 850C and SW102 will be running on a common codebase. I'd be in favor of not adding support for post 0.19 flavored motor controllers until after that date.
Good news! I agree that the effort to put the common codebase together is worth a little delay - the SW102 sounds like a nice display as well and I'm impressed at the rate the development has gone for it.
eyebyesickle wrote:
Aug 17 2019 10:40pm
Guys, just my perspective, but it wouldn't be cracking any 850c open... I expect to post info tonight or tomorrow for plug and play update... And casainho stated he would make the firmware changes required for easy updating... Took forever to get that sorted for the 850c... Was a real PITA for a dummy like me, haha.

Also working on that for the SW102... Gonna make it happen. Let's try not to crack these things open... is how I feel... We have almost reached the point where this will be easy and versatile for everyone. Plug and play/Bluetooth updates, big (850c) and small (sw102) display option, and widely available... Gonna get all the little bits stocked in a Chinese warehouse for cheap fast international shipped ng as well... You know I've been all for this since the beginning, and helped where I could... I think this is really all coming together in an awesome way at this point... Going for the trifecta.... Easy, cheap, and available
Even better! If the bootloader/OTA flashing situation is close to being solved them I'm all for it. I'm not opposed to soldering pins on and hacking it oldschool, but a "click to upgrade" solution would be great, and would open the modifications up for a lot more people. I'll hang tight with 0.2.0 and 0.19.0 as some of these great improvements come together.

User avatar
eyebyesickle   10 kW

10 kW
Posts: 678
Joined: Apr 07 2015 9:28pm
Location: Nashville

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

Post by eyebyesickle » Aug 18 2019 2:55am

Forgive me for spamming across the TSDZ2 threads guys, but I am really excited about this, and really put a lot of work in. No no no, nothing compared to anyone programming etc... but it is all relative, and I am extremely challenged sometimes :roll: :lol: so... I see this as a major thing, bringing the availability of the OSF TSDZ2 to a much wider range of people who would not even be able to think about cracking a 850C open. Anyway, let me know if anything looks like it needs correcting etc - I hope everything is good, took me long enough :shock:
eyebyesickle wrote:
Feb 21 2019 9:04pm
Making progress, hoping to hear good news by next week. I have another route to go if I don't get permission by then, but things appear to be working out.

You are currently using the 850c system for yourself, correct? Any new previews of the display screen to show off? I am trying not to crack open my 850C as is!!! Im too OCD for that mess :lol:
HAHAHA, hope to hear the good news by next week I said - just a few days shy of 6 months ago eh? WELL - at least it finally happened. Was not easy to obtain the information needed, that's for sure. Luckily we have pros on the team like casainho who knew what do to with said info, since my people are MIA :shock:

Everything is cleared with APT etc - and I also briefly mention a DIY method for making your own bootloader box - alhough this method is untested, and IMO may be more trouble than it is worth... but please let me know if anyone makes one and successfully upgrades, so we can update the article with the news!

FYI - Sending a bunch of these to a Chinese Warehouse for cheap/fast international shipping, and we already have plenty in the USA. 1750mm cords to make it a little easier on you if your display is mounted to your bike already... Things just got a little bit easier around here! Whew

850C Display - TSDZ2 Open Source Firmware - Plug and Play Bootloader Update Tutorial- ARTICLE WITH LINKS
https://www.eco-ebike.com/blogs/eco-cyc ... e-tutorial

850C Display - TSDZ2 Open Source Firmware - Plug and Play Bootloader Update Tutorial- VIDEO TUTORIAL / DEMO


FYI - the newest version with imperial unit/throttle/etc support IS NOT AVAILABLE YET for the bootloader, but is expected shortly. The bootloader DOES NOT USE THE SAME .bin FILE THAT YOU USE TO MANUALLY UPDATE!!!

Any ETA casainho? :wink:

casainho   1.21 GW

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

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

Post by casainho » Aug 18 2019 3:07am

eyebyesickle wrote:
Aug 18 2019 2:55am
Any ETA casainho? :wink:
Today I hope.

So, the wiki now needs a lot of updates, I hope to do it on next days. I will link to your site, to your documentation. Also it is very important to tell users the shops that sells the displays with the cables and/or already with firmware flash and that box, etc so I will also put the links to it.

I will keep on wiki the previous way to open and install the firmware as it is needed for development bit the first choice will obviously be this of using original bootloader.

Great work!!!
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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

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 18 2019 3:19am

eyebyesickle wrote:
Aug 18 2019 2:55am

FYI - the newest version with imperial unit/throttle/etc support IS NOT AVAILABLE YET for the bootloader, but is expected shortly. The bootloader DOES NOT USE THE SAME .bin FILE THAT YOU USE TO MANUALLY UPDATE!!!

Any ETA casainho? :wink:

Great work eyebyesickle it will be a game changer not to have to crack open these displays that are sealed at manufacture.

My one concern is does it matter which version of the 850 c display is used? I have one from last year which has been gathering dust, I purchased it for my BBSHD but found it was not really the correct version it works but it has it has things like eco mode which is not used on a BBSHD and will not give 9 levels of assistance. Will this be able to be flashed with the TSDZ2 firmware?

User avatar
eyebyesickle   10 kW

10 kW
Posts: 678
Joined: Apr 07 2015 9:28pm
Location: Nashville

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

Post by eyebyesickle » Aug 18 2019 3:41am

casainho wrote:
Aug 18 2019 3:07am
eyebyesickle wrote:
Aug 18 2019 2:55am
Any ETA casainho? :wink:
Today I hope.

So, the wiki now needs a lot of updates, I hope to do it on next days. I will link to your site, to your documentation. Also it is very important to tell users the shops that sells the displays with the cables and/or already with firmware flash and that box, etc so I will also put the links to it.

I will keep on wiki the previous way to open and install the firmware as it is needed for development bit the first choice will obviously be this of using original bootloader.

Great work!!!
YOU. ARE. THE. MAN!

:bigthumb: :flame:

Yes, I have been holding off on offering the OSF products this whole time, though since the beginning I contributed what I could to the process as far as controller pinout etc... now I feel like I can stand behind it solid and offer support etc as needed. This is really such an awesome project...it is great to see everything/everyone come together working on this. As far as the base motor goes- I am also working on some 'cool' upgrades as we speak. I see others talking about it in a thread too, but I have been able to apply thermal padding strategically around the motor (with a dab of thermal grease around the outside so the cover will still slide on) and can run longer at the higher power levels without overheating! =) I'll be posting a tutorial for people on this too, it just seems to take me forever.

Rafe - as far as your 850C goes - I really could not tell you... My impression is that if it is the 'newer' 850C model (maybe called P850C some places) then it should work - but I cannot say for sure. I do know I have successfully upgraded about 10 displays... which were from about 3 groups of different suppliers/varying ages and they all worked... except for 1 random display - but I think that may have been a fluke/loose connection - I have yet to investigate.

eetulaa   1 µW

1 µW
Posts: 3
Joined: Aug 04 2019 9:23am

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

Post by eetulaa » Aug 18 2019 4:09am

buba wrote:
Aug 13 2019 8:50pm
vadda wrote:
Aug 13 2019 6:52pm
On the A5 I found that the voltage reported by the LCD3 compared to that
measured with the Tester is 0.4V lower.
But in the end, the TSDZ2 will always be sensitive to heating. And going on long climbs is the worst thing you can do due to the combination of rolling friction, aerodynamic drag and the climb itself: you need to convert the energy in your battery to potential energy when climbing. And the faster you go the faster the conversion needs to happen and the more power you are pulling from the battery through the motor. And there is no way escaping that you need the power on those climbs. Which is a product of torque and angular velocity -> Torque means current -> Current means increased motor temperature.

So in short, I think it can be improved in the future. For now:

- Do not use the Experimental Motor modes as I think they are not as efficient
- Use a high nominal voltage battery. Your motor will be able to rotate faster in a lower gear and you could have the same power with less current but faster angular velocity. There is a small gain with higher voltages due to less transmission losses in cables and so on.
- Be as light as possible when climbing as this drastically reduces the power needed
- Maintain a low rolling resistance on the bike and keep drag at a minimum
- Reduce speed slightly as this also makes a big difference

All these suggestions have little effect on their own. But combined you might notice a small difference!
Does the experimental high cadence mode affect the way the motor is controlled below the old cut off rpm?
I think the high cadence mode was one of the most welcome add compared to original firmware when used a 36v battery.

Most useful i've found it in steep climbs on trails. With it you can shift small enough gear before start to climb and still get to gain good speed to start to climb.

User avatar
elem   100 W

100 W
Posts: 135
Joined: May 26 2017 4:27pm
Location: alpes maritimes
Contact:

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

Post by elem » Aug 18 2019 5:04am

Some more infos about the issue found testing V 0.20

gone back to v0.19 and problem is still there, not exactly the same but :
48V don t like experimentale mode, probably small demagnetized neodym when i tested exprimentale mode .

using standard mode ( 0 ) for a 48V motor i can match the desired power with V 0.19
yesterday before going back to V0.19 and with V0.20 i was also able to hit 400w and more using standard mode ( 0 ) but motor regulated many, in fact the motor regulation appear at about 80 rpm ( human )

using experimental mode ( 2 ) seem motor stop at about 250w and human cadence ( rpm ) not only the cause .

ok as i m not using easily english i stop report here, i ll try to explain more using google translate later, because i don t know all the world i would use to explain .

But someting is 95% sure : 48v motor don t like experimental mode as long as we can't reduce the max RPM to about 100, i was able to hit 125 rpm with may short test in the garage, as it was only a short burn of less than 25/30 meters i haven t detected the problem i spoke about since 2 days .

sorry buba but i thinck V0.20 isn t in cause, it s probably a technical issue an only "circonstancial" ( in french : un concours de circonstance, don t know in english !? )

and, last thing, why i suspect a partialy demagnetised, because even if i was abble to hit power ( from battery ) it s seem my motor don t give the same power for the same use of the wattage ( :roll: what a hard job to translate french speacking to english language, sorry .... )

have fun, carpe diem ;)
Last edited by elem on Aug 18 2019 8:25am, edited 1 time in total.
RockRider 9.1 TSDZ2 open source firmware .

thineight   100 W

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

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

Post by thineight » Aug 18 2019 5:17am

Hello, hope you are enjoying your bike over these days.
Yesterday I had a 1000m climb with the v0.20alfa7.
I did not setup the advanced cadence yet, and I used the power mode because I did not have time to try out the rest of the options.

The overall feeling is very positive, very good one! :thumb: :thumb:

I have 4 levels plus eMTB and used pretty much the eMTB mode which, with the actual configuration (factor 3), could develop around 300-350w on the steepest part (20-25%). The 4th assistance could reach 400-450w which is the limit I set for my 36v motor.
As the eMTB mode is not then able to develop the full power under heavy load, I should try changing the eMTB parameter (from 3-->4) to increase the power, or leave as it is to keep a safe margin against overheat and, in case of need of extra power, switch to the max assistance to get the 450w for a limited period.

Even if I try myself to keep a safe margin against overheat, I will wait the instructions of the thermal pads installation to install it and finally improve the overall thermal performance. Next time I open it up for greasing I will add the thermal pads as well.

Buba, yesterday I had to push the bike on the steepest rough slopes and I had to use the walk assist. Unfortunately it is not really usable on that condition due to the shakes, and you consequently loose the assist. We discussed this matter before, but I really think we should implement something to improve that behaviour otherwise it is nearly impossible to use the walk assist when you need it the most.
We discussed about a "denounce" filter or a always-on (not desired by casainho for safety reasons). Do you think we have room to improve that function a bit?
Maybe walk assist, once enabled, can be disabled after 1-2 second of no button pressed? I think it will be safe enough, what do you guys think?

Thanks and looking forward to see the new firmware-display improvements.
:bigthumb:
Last edited by thineight on Aug 18 2019 8:09am, edited 2 times in total.
MTB KTM Ultra 29" - City bike DAYTONA 28"

andrea_104kg   100 W

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

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

Post by andrea_104kg » Aug 18 2019 7:33am

Today I spent an hour on the test of version 20, unfortunately alpha5 (I couldn't upgrade but I think it changes little)
Obviously every test is conditioned by a thousand factors
1) I live in a hilly area, so only descents and climbs, no plains
2) I am old and fat :-(, 55 years old, 173 cm tall and currently 101kg in weight
3) every torsimeter seems to be unfortunately different :-(
so my impressions must be taken for what they are, simple impressions.
torque mode: how the original software suffers from oscillations during pedaling. It is much better than the original software but the power is not delivered constantly during pedaling, it is probably more real, even the power delivered by the legs is not constant.
Emtb mode: amplifies the defect of the torque mode, that is the power oscillation is even bigger and I don't like it.
I have tried various levels of sensitivity but the result does not change.
I'm not worried at all because power mode is SIMPLY FANTASTIC.
With a x3 multiplier I get a perfect, wonderful, exceptional emtb level.
With the pressure of my legs I can obtain a very precise power progression, from less than 100w to over 800w (48v 750w motor) in an extremely linear and pleasant way. The power goes up gradually, sweetly, with an impressive ease of adjustment.
For me only this change is worth a nobel prize :-)
So buba, I'll propose you in Stockholm :-)
Thank you!

geeksville   10 W

10 W
Posts: 75
Joined: Aug 02 2019 6:44pm

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

Post by geeksville » Aug 18 2019 12:15pm

btw eyebyesickle,

I think the "open source" aspect of this software could be a nice marketing tool for you (and even for the Chinese manufacturers you are working with). Because it can address doubts customers might have about buying from you as a "small" manufacturer. With all of the code out there they don't need to worry about support if you were to go away. And for TongSheng it gives them a differentiator vs the the (currently more popular) Bafang ecosystem.

Also possibly useful for positive hype if you ever do something like a kickstarter. (Because you can point backers at code that exists right now and is already working on vehicles. And the openness of it is nice for some people)

And if you do talk the SF102 folks into doing a semi-custom build you might ask them if they can stuff the nRF51422 instead of the nRF51822. Because it seems to be the same CPU but they just paid the licensing fees for ANT protocol. Which would make it possible for the SF102 to talk to garmin GPSes (for super seamless uploading of cadence and human pedal power). I bet the COGS difference is less than $0.50 per unit.

Just my 2 c.

User avatar
eyebyesickle   10 kW

10 kW
Posts: 678
Joined: Apr 07 2015 9:28pm
Location: Nashville

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

Post by eyebyesickle » Aug 18 2019 12:30pm

geeksville wrote:
Aug 18 2019 12:15pm
btw eyebyesickle,

I think the "open source" aspect of this software could be a nice marketing tool for you (and even for the Chinese manufacturers you are working with). Because it can address doubts customers might have about buying from you as a "small" manufacturer. With all of the code out there they don't need to worry about support if you were to go away. And for TongSheng it gives them a differentiator vs the the (currently more popular) Bafang ecosystem.

Also possibly useful for positive hype if you ever do something like a kickstarter. (Because you can point backers at code that exists right now and is already working on vehicles. And the openness of it is nice for some people)

And if you do talk the SF102 folks into doing a semi-custom build you might ask them if they can stuff the nRF51422 instead of the nRF51822. Because it seems to be the same CPU but they just paid the licensing fees for ANT protocol. Which would make it possible for the SF102 to talk to garmin GPSes (for super seamless uploading of cadence and human pedal power). I bet the COGS difference is less than $0.50 per unit.

Just my 2 c.
Makes sense... that isn't something I would really be considering unless the OSF developers and everyone involved wanted in... I do this mostly because I like it... although lately it seems things have developed a bit more - I actually value this whole process because it is forcing me to learn new things as well!

I will see what we can do about the nRF51422 instead of the nRF51822- that sounds possible!

Thanks for all your hard work!

casainho   1.21 GW

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

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

Post by casainho » Aug 18 2019 1:03pm

eyebyesickle wrote:
Aug 18 2019 12:30pm
geeksville wrote:
Aug 18 2019 12:15pm
btw eyebyesickle,

I think the "open source" aspect of this software could be a nice marketing tool for you (and even for the Chinese manufacturers you are working with). Because it can address doubts customers might have about buying from you as a "small" manufacturer. With all of the code out there they don't need to worry about support if you were to go away. And for TongSheng it gives them a differentiator vs the the (currently more popular) Bafang ecosystem.

Also possibly useful for positive hype if you ever do something like a kickstarter. (Because you can point backers at code that exists right now and is already working on vehicles. And the openness of it is nice for some people)

And if you do talk the SF102 folks into doing a semi-custom build you might ask them if they can stuff the nRF51422 instead of the nRF51822. Because it seems to be the same CPU but they just paid the licensing fees for ANT protocol. Which would make it possible for the SF102 to talk to garmin GPSes (for super seamless uploading of cadence and human pedal power). I bet the COGS difference is less than $0.50 per unit.

Just my 2 c.
Makes sense... that isn't something I would really be considering unless the OSF developers and everyone involved wanted in... I do this mostly because I like it... although lately it seems things have developed a bit more - I actually value this whole process because it is forcing me to learn new things as well!

I will see what we can do about the nRF51422 instead of the nRF51822- that sounds possible!

Thanks for all your hard work!
So my list for a new version of SW102:
- ANT
- RTC clock just like 850C
- USB charger just like 850C (I travel in mountains and my phone, computer and 4G router, all of them charge on the 850C USB charger, this technology equipment are very important to me in this travels)
- more flash memory, maybe 512 kbytes (twice current value because having ANT we would need more space for more features, connect to other ANT sensors, etc)

Could be a quickstarter for presales of like 1000 units, $60 each unit for final user. Then with money of presales, you could ask the production in the Chinese company of that 1000 units.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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

User avatar
eyebyesickle   10 kW

10 kW
Posts: 678
Joined: Apr 07 2015 9:28pm
Location: Nashville

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

Post by eyebyesickle » Aug 18 2019 2:02pm

Ok,

Commitment of $$ isn't the issue (thanks to my associates, im too broke to even 'pay' - attention, myself , haha) Let's see what the possibilities from the manufacturer are.

Do you guys want to discuss a bit more, and confirm, and I will submit the request? I want to be sure before I reach out again, I am swarming them with requests, as I was asking about other changes already as well. I don't want to overload them or delay any answers.

The USB charger though... I feel like even if you could fit one, it's gonna hurt the waterproofing... Maybe in the bottom side, but you think there is room? I think running a voltage converter to USB from the battery may be a better option... They are like 5-10$... I have a few of them I use on bikes from time to time...

User avatar
elem   100 W

100 W
Posts: 135
Joined: May 26 2017 4:27pm
Location: alpes maritimes
Contact:

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

Post by elem » Aug 19 2019 5:16am

Simplified wiki ( in french ) V.019 based : https://elementaire01.blogspot.com/2019 ... tsdz2.html
RockRider 9.1 TSDZ2 open source firmware .

buba   10 kW

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

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

Post by buba » Aug 19 2019 9:17am

elem wrote:
Aug 17 2019 8:35am
buba wrote:
Aug 17 2019 8:08am
elem wrote:
Aug 17 2019 7:55am
hello, have an issue with V0.20, suspected ancient value not cleared even if i writed all 00 before programming .
Okay, everything is working as expected I just need to explain a couple of things :)

When you install the 0.20.0 it will load the default values, it will not be all zeros. Instead, the default values will be loaded and you can change those to whatever you want.

elem wrote:
Aug 17 2019 7:55am
ok, motor stop at about 250w, like if street mode was activate, was testing torque mode, changed to power mode, it s the same .
You need to set the motor power limit. Disregard the Street Mode and disable it for now. Just set the power limit to what you want it to be. It is in the Basic Setup sub menu.


elem wrote:
Aug 17 2019 7:55am
trying to activate street mode with different value ( 35 km/h and 450 w max ) it s the same
trying to reset to defaut value, was impossible, a value of 42 was there and impossible to change ...
Disable the Street Mode for now so you get comfortable with configuring the normal system. And later on it is no problem at all to enable Street Mode.

Please follow the instructions on the wiki on how to reset to defualt values. The system will not power down as it did previously. It will just smoothly set all values to default.



elem wrote:
Aug 17 2019 7:55am
well, with my short test it s seem the start delay noticied in V 0.19 as gone
I am glad to hear that! :) For MTB riding, Startup assist without pedal rotation is very good if you properly configure that. But maybe wait until you get comfortable with the 0.20.0.


elem wrote:
Aug 17 2019 7:55am
also tested in my garage the torque on pedal, it s different, you probably modified something ;)

in menu 11 ( previously 9 in v 0.19 )
2 torque sensor ADC : static 217, left and right with my weight ( 64 kg ) 340, dynamic ( pedaling ) hiting 320 wich is less than static and very different than V 0.19
3 pedal cadence hitting 125 max
4 PWN duty cycle : from 80 to 120( about )
5 ERPS hitting 360 ( about )

okay, i ll try to clear controler memory and reprogramm it .

in case of problm, is it possible to use V0.20.7 for LCD3 and for example V0.20.6 for controler ?
You can clear it but it will load the default values again. I think you thought the old values were there. I am pretty sure there are no bugs so you can use the Alpha 7 on both the motor controller and display.

So take a look at the wiki and I assure you everything will work! :)

https://github.com/OpenSource-EBike-fir ... %7C-Manual

Ok, i was using V0.20 alpha 7 , the one for LCD3 and the one for TSDZ2, i know the standard process .
fact, it's seem the default value you used are good ;)
had only to change max power to 550 w ( my standard set up ), nomber of cells ( 12 ), max curent ( 15 )
eMTB configured to 3 ( instead of 2 from default value )

If you said alpha 7 work it s okay i thinck it s true

why i thinck there is some value from previous install ( v 0.19 ) is because when i came to power mode menu i found the same value i used in v 0.19 and i m pretty sure it s not your default value ( 0.3/0.6/0.9/1.5/2.1 this was my set up for different lvl in v 0.19 )
So sorry for the late reply, I was away for a day and have missed so much! :shock:

Here are the default values for the Power Assist:

#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_0 0 // 0
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_1 3 // 0.3
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_2 6 // 0.6
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_3 9
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_4 12
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_5 15
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_6 18
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_7 21
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_8 24
#define DEFAULT_VALUE_POWER_ASSIST_LEVEL_9 30

So: 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 3.0. I think you will find that everything is working and is properly installed. But the default values are very similar to your previous values so you maybe thought something was wrong.

elem wrote:
Aug 17 2019 8:35am
i just tried to clear my controleur ( may be not necessary, as i remenber you said it was the last time needed ! ) and reprogram it
sadly i have the same problem, and the same value for " reset default value " = 42, is it a timer to the reset ? haven t see it decrementing !?

Edit : sorry found the reason : Reset to default values. Enter the sub menu so that the number 42 starts blinking. Hold the POWER button a short amount of time and the system will reset to default values.

soo many things to learn :oops:

and also my own value from my previous install .

soo i thinck that it s some stored value in my LCD3 and i need to reprogramming it twice !?

sorry to disturb buba, all seems good when i was programming, no errors, nothing special, and i m using often my st link because i m also using marcoq code witch need to reprogram each time you want to improve a set up .
I seem to have missed a lot of things and there are a lot of posts in a very short amount of time. So please let me know if something does not work or if you have any questions and I will try to help!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

btslo   100 mW

100 mW
Posts: 49
Joined: Apr 17 2019 8:55am

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

Post by btslo » Aug 19 2019 9:51am

How do you "wipe" before upgrading? I just flashed over 0.19 and it seems to be working okay, had to setup everything again.

User avatar
elem   100 W

100 W
Posts: 135
Joined: May 26 2017 4:27pm
Location: alpes maritimes
Contact:

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

Post by elem » Aug 19 2019 9:56am

yes buba you are right, i ihanck it was my own value but was littely different .

Soo, seem ok, all run right, gone back to V0.19 and will go ti V0.20 later after testing all the improvment in V0.19, in fact too many things happenned in the same time, changing my engine to a 48V version, changing my metal gear to a new nylon one because the sound of the metal gear is stressing me ;), moving faster from V0.19 ( only 3/4 ride with 36V motor in exp mode ) to 0.20, only one ride with V0.19 in standard mode ( 0) with the 48V engine, and going to V0.20 directly with activating exp mode witch was only tested with lvl 1 in my garage .

Soo all seem ok, i haven t any experience with 48V engine, it s different than 36V motor

i liked to be able to use exprimentale mode with 36v motor because my natural pedal frequency is about 70 rpm and it was cool to be able run the 36v at 95 rpm or more witch i usely hit with my harmonic/muscular ( without motor ) bike .

36v motor is good as it seem it accept easily experimental mode, 48v motor is good because the useable range of use ( human rpm ) is better, when it s a problem climbing in trial mode at 40 to 60 rpm with 36v motor it s easy with 48v motor .

the bad thing : i can t get the best of the two "world", the good thing, even if 48v can t reach the same rpm than 36v motor using experimental mode, it s just necessary to remenber that we are " assisted " and we could get the best of the motor learning how use it in the best way .

well, it seem V0.19 it s a very good release in fact, very stable and also the latency at start up may be the wrong way to preserve the nylon gear, will post as soon as i ll move to V0.20 and thancks all to the hard way done,
i can t make donation to all invloved in the devellopment but you and casainho have done a great job, merci beaucoup .
Last edited by elem on Aug 19 2019 11:18am, edited 1 time in total.
RockRider 9.1 TSDZ2 open source firmware .

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:00am

jimmyfergus wrote:
Aug 17 2019 4:08pm
I'm sad to I can't try out 0.20, because before I got it flashed I cracked my LCD3 display (so I'm awaiting a new display. Worse I ordered a SW102, which isn't yet ported so I'll either have to wait or try to port myself).

In the meantime, when I first heard of the eMTB exponential multiplier I thought it was applied on top of Torque or Power proportional. I think I was wrong about that though - it's it's own mode.

However, couldn't / shouldn't it be just an filter on the other modes? It could just be a factor applied to the result (or the torque input). Assuming the loop can afford another multiplication operation? That way I could adjust assist level for how much I feel like contributing, but still get the responsive adaptive nature of the exponential curve.

Thanks as always for all the work devs - I'm loving what you're doing.
Hope you get to try out the 0.20.0 soon, in one way or another! :)

Your suggestions are overall interesting and I understand what you are trying to accomplish! But it would take considerable more space and complexity to do it in that form and still keep the power calculation (power curve). I have tried to choose the most optimal path considering many aspects but still have the best experience possible.

I am so sorry for not giving a more detailed response. I also apologize for providing a very delayed one. There was an explosion of interesting things and I was away for one day so seems I have missed a lot. And I still need to release the Alpha 8 I have on my bike and make the last changes.

Thank you for your points and support! :bigthumb: Be certain we will never stop evolving and improving the firmware in one way or another!

EDIT: Again, am sorry for the lacking value in my reply.
Last edited by buba on Aug 19 2019 10:07am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:02am

btslo wrote:
Aug 19 2019 9:51am
How do you "wipe" before upgrading? I just flashed over 0.19 and it seems to be working okay, had to setup everything again.
With the 0.20.0 you do not need to wipe anything. Just install the latest alpha and it will work perfectly! You only need to setup the system after personal preference and then you will be ready to ride!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:19am

elem wrote:
Aug 19 2019 9:56am
yes buba you are right, i ihanck it was my own value but was littely different .

Soo, seem ok, all run right, gone back to V0.19 and will go ti V0.20 later after testing all the improvment in V0.19, in fact too many things happenned in the same time, changing my engine to a 48V version, changing my metal gear to a new nylon one because the sound of the metal gear is stressing me ;), moving faster from V0.19 ( only 3/4 ride with 36V motor in exp mode ) to 0.20, only one ride with V0.19 in standard mode ( 0) with the 48V engine, and going to V0.20 directly with activating exp mode witch was only tested with lvl 1 in my garage .

Soo all seem ok, i haven t any experience with 48V engine, it s different than 36V motor

i liked to be able to use exprimentale mode with 36v motor because my natural pedal frequency is about 70 rpm and it was cool to be able run the 36v at 95 rpm or more witch i usely hit with my harmonic/muscular ( without motor ) bike .

36v motor is good as it seem it accept easily experimental mode, 48v motor is good because the useable range of use ( human rpm ) is better, when it s a problem climbing in trial mode at 40 to 60 rpm with 36v motor it s easy with 48v motor .

the bad thing : i can t get the best of the two "world", the good thing, even if 48v can t reach the same rpm than 36v motor using experimental mode, it s just necessary to remenber that we are " assisted " and we could get the best of the motor learning how use it in the best way .

well, it seem V0.19 it s a very good release in fact, very stable and also the latency at start up may be the wrong way to preserve the nylon gear, will post as soon as i ll move to V0.20 and thancks all to the hard way done,
i can t make donation to all invloved in the devellopment but you casainho have done a great job, merci beaucoup .
I understand that even the 0.19.0 will have a lot of changes to get used to. I am very proud of the 0.19.0 and think it will always be a special version for many reasons. Regardless, I am glad to hear you seem somewhat satisfied.

I appreciate your impressions for the different motors and that you shared that with the community!


elem wrote:
Aug 18 2019 5:04am
sorry buba but i thinck V0.20 isn t in cause, it s probably a technical issue an only "circonstancial" ( in french : un concours de circonstance, don t know in english !? )

and, last thing, why i suspect a partialy demagnetised, because even if i was abble to hit power ( from battery ) it s seem my motor don t give the same power for the same use of the wattage ( :roll: what a hard job to translate french speacking to english language, sorry .... )

have fun, carpe diem ;)
You did a great job and thank you! Even though it might have been hard to translate it is very valuable for us all!
Last edited by buba on Aug 19 2019 10:33am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:29am

eetulaa wrote:
Aug 18 2019 4:09am
buba wrote:
Aug 13 2019 8:50pm
vadda wrote:
Aug 13 2019 6:52pm
On the A5 I found that the voltage reported by the LCD3 compared to that
measured with the Tester is 0.4V lower.
But in the end, the TSDZ2 will always be sensitive to heating. And going on long climbs is the worst thing you can do due to the combination of rolling friction, aerodynamic drag and the climb itself: you need to convert the energy in your battery to potential energy when climbing. And the faster you go the faster the conversion needs to happen and the more power you are pulling from the battery through the motor. And there is no way escaping that you need the power on those climbs. Which is a product of torque and angular velocity -> Torque means current -> Current means increased motor temperature.

So in short, I think it can be improved in the future. For now:

- Do not use the Experimental Motor modes as I think they are not as efficient
- Use a high nominal voltage battery. Your motor will be able to rotate faster in a lower gear and you could have the same power with less current but faster angular velocity. There is a small gain with higher voltages due to less transmission losses in cables and so on.
- Be as light as possible when climbing as this drastically reduces the power needed
- Maintain a low rolling resistance on the bike and keep drag at a minimum
- Reduce speed slightly as this also makes a big difference

All these suggestions have little effect on their own. But combined you might notice a small difference!
Does the experimental high cadence mode affect the way the motor is controlled below the old cut off rpm?
I think the high cadence mode was one of the most welcome add compared to original firmware when used a 36v battery.

Most useful i've found it in steep climbs on trails. With it you can shift small enough gear before start to climb and still get to gain good speed to start to climb.
Experimental mode affects the entire operating range and not just under the cut off RPM. What could be done is to improve this so it switches when the motor rotates faster. Then we would have the best of both worlds. So expect some cool news in future versions :wink:
Last edited by buba on Aug 19 2019 10:57am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:37am

thineight wrote:
Aug 18 2019 5:17am
Hello, hope you are enjoying your bike over these days.
Yesterday I had a 1000m climb with the v0.20alfa7.
I did not setup the advanced cadence yet, and I used the power mode because I did not have time to try out the rest of the options.

The overall feeling is very positive, very good one! :thumb: :thumb:

I have 4 levels plus eMTB and used pretty much the eMTB mode which, with the actual configuration (factor 3), could develop around 300-350w on the steepest part (20-25%). The 4th assistance could reach 400-450w which is the limit I set for my 36v motor.
As the eMTB mode is not then able to develop the full power under heavy load, I should try changing the eMTB parameter (from 3-->4) to increase the power, or leave as it is to keep a safe margin against overheat and, in case of need of extra power, switch to the max assistance to get the 450w for a limited period.

Even if I try myself to keep a safe margin against overheat, I will wait the instructions of the thermal pads installation to install it and finally improve the overall thermal performance. Next time I open it up for greasing I will add the thermal pads as well.
:bigthumb:


thineight wrote:
Aug 18 2019 5:17am
Buba, yesterday I had to push the bike on the steepest rough slopes and I had to use the walk assist. Unfortunately it is not really usable on that condition due to the shakes, and you consequently loose the assist. We discussed this matter before, but I really think we should implement something to improve that behaviour otherwise it is nearly impossible to use the walk assist when you need it the most.
We discussed about a "denounce" filter or a always-on (not desired by casainho for safety reasons). Do you think we have room to improve that function a bit?
Maybe walk assist, once enabled, can be disabled after 1-2 second of no button pressed? I think it will be safe enough, what do you guys think?

Thanks and looking forward to see the new firmware-display improvements.
:bigthumb:
Will take a look and come up with something!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

User avatar
eyebyesickle   10 kW

10 kW
Posts: 678
Joined: Apr 07 2015 9:28pm
Location: Nashville

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

Post by eyebyesickle » Aug 19 2019 10:43am

casainho wrote:
Aug 18 2019 1:03pm
So my list for a new version of SW102:
- ANT
- RTC clock just like 850C
- USB charger just like 850C (I travel in mountains and my phone, computer and 4G router, all of them charge on the 850C USB charger, this technology equipment are very important to me in this travels)
- more flash memory, maybe 512 kbytes (twice current value because having ANT we would need more space for more features, connect to other ANT sensors, etc)

Could be a quickstarter for presales of like 1000 units, $60 each unit for final user. Then with money of presales, you could ask the production in the Chinese company of that 1000 units.
Per SW102 manufacturer:

nRF51422 instead of the nRF51822—OK

ANT-OK

RTC clock—no space for the RTC chip

More flash memory (ANT needs more room, and we have alot of code to write) current room is 256K, no space for expand

This is regardless of quantity (well, meaning doesn't matter if we buy more, they can't do certain upgrades....but they won't even make the changes that were OK'd unless we get quite a few of course)

buba   10 kW

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

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

Post by buba » Aug 19 2019 10:51am

andrea_104kg wrote:
Aug 18 2019 7:33am
Today I spent an hour on the test of version 20, unfortunately alpha5 (I couldn't upgrade but I think it changes little)
Obviously every test is conditioned by a thousand factors
1) I live in a hilly area, so only descents and climbs, no plains
2) I am old and fat :-(, 55 years old, 173 cm tall and currently 101kg in weight
3) every torsimeter seems to be unfortunately different :-(
so my impressions must be taken for what they are, simple impressions.
torque mode: how the original software suffers from oscillations during pedaling. It is much better than the original software but the power is not delivered constantly during pedaling, it is probably more real, even the power delivered by the legs is not constant.
Emtb mode: amplifies the defect of the torque mode, that is the power oscillation is even bigger and I don't like it.
I have tried various levels of sensitivity but the result does not change.
I'm not worried at all because power mode is SIMPLY FANTASTIC.
With a x3 multiplier I get a perfect, wonderful, exceptional emtb level.
With the pressure of my legs I can obtain a very precise power progression, from less than 100w to over 800w (48v 750w motor) in an extremely linear and pleasant way. The power goes up gradually, sweetly, with an impressive ease of adjustment.
For me only this change is worth a nobel prize :-)
So buba, I'll propose you in Stockholm :-)
Thank you!
I have nothing to add other than repeating myself:

Thank you so much for your feedback and for testing out the 0.20.0! You personally have improved the 0.20.0 in more ways than one. Much appreciated!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

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 19 2019 10:53am

buba wrote:
Aug 19 2019 10:37am
thineight wrote:
Aug 18 2019 5:17am
thineight wrote:
Aug 18 2019 5:17am
Buba, yesterday I had to push the bike on the steepest rough slopes and I had to use the walk assist. Unfortunately it is not really usable on that condition due to the shakes, and you consequently loose the assist. We discussed this matter before, but I really think we should implement something to improve that behaviour otherwise it is nearly impossible to use the walk assist when you need it the most.
We discussed about a "denounce" filter or a always-on (not desired by casainho for safety reasons). Do you think we have room to improve that function a bit?
Maybe walk assist, once enabled, can be disabled after 1-2 second of no button pressed? I think it will be safe enough, what do you guys think?

Thanks and looking forward to see the new firmware-display improvements.
:bigthumb:
Will take a look and come up with something!
+1 :thumb: I think this would be useful as well as its easy to have your fingers bounced of the button for a short time and loose all walk assist when you are needing it most.
Empowered people support rider and trustee
www.empoweredpeople.co.uk

Post Reply