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

I ride a tadpole trike and would like to add the TSDZ2 with the FOS firmware. I'd like to mount the display on the vertical stub in front that the front derailleur attaches to (ie, between my feet). I think the LCD3 display would be easier to read there than the 850c. My issue is the buttons. I have not been able to find out how long the cable is that connects the buttons to the display, but it is almost assuredly too short for me to reach reasonably while seated. It looks as if the cable is wired directly into the unit, so I'd have to splice in another piece of cable. Has anybody done this? If so, any gotcha's? I would figure there are probably four wires in that cable, one for each button and a common, but if anybody knows for sure I'd appreciate a heads up. Thanks!
 
buba said:
bingo5 said:
Hi buba, thanks again for your effors.

I have a tiny question. What do you mean with "More customizable Street Mode"? I have no idea what more could be set as the power and speed :oops:

Hello Bingo5! Thank you for the appreciation!

Just a few more options to select in Street Mode. Take a look at the wiki here:

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-%28DEVELOPMENT%29-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual#9_Street_Mode
Buba, did you change again the logic of the blinking ASSIST in street mode?
In alpha10 (I've Street mode on at startup) the ASSIST text is solid, and starts blinking when I activate the off-road mode. I personally prefer this visualisation mode.
In the wiki it is stated the opposite.

I haven't installed the beta1 yet.
Thanks!!
 
bemused said:
I ride a tadpole trike and would like to add the TSDZ2 with the FOS firmware. I'd like to mount the display on the vertical stub in front that the front derailleur attaches to (ie, between my feet). I think the LCD3 display would be easier to read there than the 850c. My issue is the buttons.

What you describe sounds fine. I've been using a SW102 on my recumbent, but I'm just about to switch to a different recumbent with USS and two vertical posts for the handles/shifters. In that orientation the SW102 will be essentially sideways near the right thumb. Therefore (soon < 2wks) I'll add a mode to the SW102 software for 'horizontal' screen layouts rather than vertical. So each of the 3 main widgets will be left to right and the text will be at the correct orientation for reading ;).

I would be cautious about buying a LCD3 for new installs. Because there is a lot of cool new features which will only be possible on the 850C/SW102 - because of limitations on space and display in the LCD3.
 
Thanks for your reply, geeksville. I've read the two monster threads (this one and the other that stands at 231 pages currently), and have followed the discussions with regards to the lack of space in the LCD3 display. On the other hand, I have yet to have anyone say that the two new displays are more readable outdoors and what with the changes buba has put into v20 I'm not sure what else I would need. I know cosainho has got a super-duper calibration algorithm that linearizes the torque curve above 50kg, but if I werer to even approach that amount of force I don't think my 61-year-old knees will be long for this world. After all, as recumbent riders we can't relieve the stress of pushing too hard on the pedals by lifting our butts off the seat.

The other thing is that electrifybike.com has an LCD3 screen which uses the same connectors as the 850c, so if I set the system to use that one I can just swap in the 850c should I find some new feature I just don't think I can live without!
 
buba said:
andrea_104kg said:
Nothing news about 20 beta1? :( :(

I hope there will be some news soon! As I said, I have submitted everything and am hoping everything will work!

Edit: I recommend everyone to wait for the official release from the official GitHub page. But if there is anyone that simply can not wait I will include a link to my Google Drive :wink:

https://drive.google.com/drive/folders/1CPGT-V1ZX7FCzfhgbrPMYfbYtY4_JH2R
Thanks for the preview of the new version :)
I installed it today and honestly I am very happy :) it seems to me that there is more torque for each level. that is, it seems that the same watts are more powerful! it's possible?
 
geeksville said:
In that orientation the SW102 will be essentially sideways near the right thumb. Therefore (soon < 2wks) I'll add a mode to the SW102 software for 'horizontal' screen layouts rather than vertical. So each of the 3 main widgets will be left to right and the text will be at the correct orientation for reading ;).
That is great, I never though on this need and is so nice to have this feature, I guess no original firmware goes to this level of details!!
 
I'm so grateful for all the changes that were made so my handcycle is much easier, safer and more fun than it ever was with the stock firmware. But I do notice it's kinda missing some torque at low RPM's, so I am excited to try the new beta and see how the torque feels on it. Thanks, Jeff
:bigthumb:
 
Guys really getting excited about version 20, still on 16 and happy except for the known problem when you try to peddle harder the power reduces and the moment you back off a little it goes up again. Sounds like this is a maths issue and has been solved (I'm guessing??)

My question to Buba is whether you have looked at the FOC advance curve for the purpose of increasing the motor speed (and therefore the cadence up to 120rpm - AKA field weakening). This has been in github as an enhancement since pretty much the start of the project.

At the moment we have some fixed values under Experimental cadence but I'm not convinced that this gives the best efficiency for all speeds and loads. It could be we can get some more rpm and higher power output at the high revs as well as more torque at lower speeds if the advance curve is tuned in....

Thanks
JB
 
I did some test with 20beta1. SO far no issues at all.
My test configuration is acceleration 80%, modified high cadence mode and torque sensor adjustment to 75.
I mainly tested in city traffic power mode but also EMTB on a steep garage ramp from -2 to 0.
Power mode seems indeed a bit more torquey and the torque sensor range is definitively improved. I used 0.6 assist and on normal pedal I got 220w. On hard press i get 500w+. On 3 assist I get 700w+. :thumb:
Emtb mode works ok on flat but the true value is on climbing. It is very torquy at low rpms. Going up from garage I got 600-700w on 10 sesistivity. Very nice indeed!
I will test torque mode and emtb mode in the next weekend on some MTB trails with 1000m+ altitude level.
I think one of the key features in this release is the torque sensor adjustment. It really lets you tune the torque very well and increase the torque sensor range.

Respect Buba! :bolt:
 
thineight said:
buba said:
bingo5 said:
Hi buba, thanks again for your effors.

I have a tiny question. What do you mean with "More customizable Street Mode"? I have no idea what more could be set as the power and speed :oops:

Hello Bingo5! Thank you for the appreciation!

Just a few more options to select in Street Mode. Take a look at the wiki here:

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-%28DEVELOPMENT%29-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual#9_Street_Mode
Buba, did you change again the logic of the blinking ASSIST in street mode?
In alpha10 (I've Street mode on at startup) the ASSIST text is solid, and starts blinking when I activate the off-road mode. I personally prefer this visualisation mode.
In the wiki it is stated the opposite.

I haven't installed the beta1 yet.
Thanks!!

It should blink when in Offroad mode and be solid when in Street mode. Will fix wiki if it says anything else! Thank you for letting me know! :)
 
andrea_104kg said:
buba said:
andrea_104kg said:
Nothing news about 20 beta1? :( :(

I hope there will be some news soon! As I said, I have submitted everything and am hoping everything will work!

Edit: I recommend everyone to wait for the official release from the official GitHub page. But if there is anyone that simply can not wait I will include a link to my Google Drive :wink:

https://drive.google.com/drive/folders/1CPGT-V1ZX7FCzfhgbrPMYfbYtY4_JH2R
Thanks for the preview of the new version :)
I installed it today and honestly I am very happy :) it seems to me that there is more torque for each level. that is, it seems that the same watts are more powerful! it's possible?

Wonderful to hear that and thank you for confirming! :)
 
jeff.page.rides said:
I'm so grateful for all the changes that were made so my handcycle is much easier, safer and more fun than it ever was with the stock firmware. But I do notice it's kinda missing some torque at low RPM's, so I am excited to try the new beta and see how the torque feels on it. Thanks, Jeff
:bigthumb:

Looking forward to hear if the extra torque does feel better compared to the previous Alpha versions! Hope the response becomes much better!
 
Anyone here have the stock fw for KT-LCD3? I need to reflash one of my LCD3 for a KT controller, but I did not take a backup of the FW before flashing TSDZ2 FW on it.
 
jbalat said:
Guys really getting excited about version 20, still on 16 and happy except for the known problem when you try to peddle harder the power reduces and the moment you back off a little it goes up again. Sounds like this is a maths issue and has been solved (I'm guessing??)

My question to Buba is whether you have looked at the FOC advance curve for the purpose of increasing the motor speed (and therefore the cadence up to 120rpm - AKA field weakening). This has been in github as an enhancement since pretty much the start of the project.

At the moment we have some fixed values under Experimental cadence but I'm not convinced that this gives the best efficiency for all speeds and loads. It could be we can get some more rpm and higher power output at the high revs as well as more torque at lower speeds if the advance curve is tuned in....

Thanks
JB

Would love for you to test the 0.20.0 and give some feedback! But I understand you are waiting for the stable release. Everything in the 0.20.0 should be really tight and well controlled without any bugs.

I have looked at the FOC and there are several ways to improve the efficiency and torque. This would result in a cooler motor with less heating but with the same or even more torque. This can be done just by optimizing the existing code and functions. Adding field weakening will increase the cadence at the cost of efficiency but this can be acceptable in many use cases.

I see these changes as one major upgrade in the future! But to do this properly we need some serious instruments to really accurately measure and validate the changes and values. You have a suspicion that the static value we use in the experimental mode is not the most optimal and this is most likely true.

If I were to do some testing I would remove the motor from the TSDZ2 enclosure and install it in a motor torque dyno. Would make some extensive testing in the lab and then adapt the firmware for maximum efficiency = maximum torque at any given load and speed.

I think one user reported that we are around 60-70 % efficiency. In the best case scenario we would maybe be able to get to 80-90 %. This would mean that the actual torque increase would be around 50 % from the current 0.20.0 Beta 1! And we would have far less heat developing in the motor!

Sadly, we would have even more stress on the system (bye bye blue gear!) but that is another problem :wink:
 
maximusdm said:
I did some test with 20beta1. SO far no issues at all.
My test configuration is acceleration 80%, modified high cadence mode and torque sensor adjustment to 75.
I mainly tested in city traffic power mode but also EMTB on a steep garage ramp from -2 to 0.
Power mode seems indeed a bit more torquey and the torque sensor range is definitively improved. I used 0.6 assist and on normal pedal I got 220w. On hard press i get 500w+. On 3 assist I get 700w+. :thumb:
Emtb mode works ok on flat but the true value is on climbing. It is very torquy at low rpms. Going up from garage I got 600-700w on 10 sesistivity. Very nice indeed!
I will test torque mode and emtb mode in the next weekend on some MTB trails with 1000m+ altitude level.
I think one of the key features in this release is the torque sensor adjustment. It really lets you tune the torque very well and increase the torque sensor range.

Respect Buba! :bolt:

Great, Maximusdm! Thank you! :bigthumb:
 
buba said:
maximusdm said:
I did some test with 20beta1. SO far no issues at all.
My test configuration is acceleration 80%, modified high cadence mode and torque sensor adjustment to 75.
I mainly tested in city traffic power mode but also EMTB on a steep garage ramp from -2 to 0.
Power mode seems indeed a bit more torquey and the torque sensor range is definitively improved. I used 0.6 assist and on normal pedal I got 220w. On hard press i get 500w+. On 3 assist I get 700w+. :thumb:
Emtb mode works ok on flat but the true value is on climbing. It is very torquy at low rpms. Going up from garage I got 600-700w on 10 sesistivity. Very nice indeed!
I will test torque mode and emtb mode in the next weekend on some MTB trails with 1000m+ altitude level.
I think one of the key features in this release is the torque sensor adjustment. It really lets you tune the torque very well and increase the torque sensor range.

Respect Buba! :bolt:

Great, Maximusdm! Thank you! :bigthumb:

Forgot to mention that I got 15% battery saving :).
I tested this on my way to work(28km) and I do this road dozen of times, I usualy use 30%, now I got 25%! :lowbatt:
 
Beta1
I found backward resistance that kicks in when moving bike faster backwards. At low speed there is no any resistance.

Also had feeling that motor stops much quicker than on alfa

UPDATE: today did another ride without any backward resistance.. this could be very uniq case or upcoming HW issue..?
 
maximusdm said:
Forgot to mention that I got 15% battery saving :).
I tested this on my way to work(28km) and I do this road dozen of times, I usualy use 30%, now I got 25%! :lowbatt:

You'll find this was a measurement bug, not a change in efficiency. My 360Wh LiPO battery that was dead flat at 365Wh (35V and plunging) started yielding 420Wh at some point during the 20 Alphas. Buba acknowledged and fixed in Beta1.

I just flashed to Beta1, so will have feedback once I have gone through a battery cycle this weekend.
 
While waiting for version 20 code for the 850C I decided to install on my wife's bike to test. (she has a bike with Bafang integrated torque motor ... https://www.bafang-e.com/oem-area/components/component/motor/mm-g330250c

The 850c layout looked a lot better than when I last saw it over 1 year ago. And I discovered the display is able to show data about the battery! like number of charge cycles, health, voltage of each cell and so on.

Is there a standard for this type of communication between BMS's and controllers? I assume then that Bosch and others are likely doing this since they make the batteries?

20190919_190040.jpg20190919_190142.jpg
 
I did the release of v0.20.0-beta.1, get it here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.20.0-beta.1

Unfortunately I am not able to test it because I do not have the KT-LCD3 anymore, and, just yesterday at night when I was going for a group ride, my TSDZ2 did fail because the torque sensor started to work intermittently... I wish I was running the v0.20.0-beta.1 and so I would have change from power mode to PAS mode, as PAS was working correctly. I had to go back home and not very happy....

My focus is the new displays and there are now 4 developers working on them, and on last days a critical issue of "full white screen" was solved on 850C - because seems there are different LCDs used on the 850C display.

We expect soon to support the v0.20.0-beta.1.

buba said:
I have submitted another pull request with the latest bug fixes. And I have tried to write a changelog on all changes from the 0.19.0. I have most definitely missed something so if there is anything anyone thinks is worth adding please let me know.

Changelog from the stable 0.19.0:

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

Wiki:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-(DEVELOPMENT)-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual

Edit:
Casainho, let me know if the Makefile is working okay on Linux. Would love to hear if you get any error codes. Am hoping it is okay but am not sure that is the case.
 
Buba: Would it be possible to add an option to street mode, where the throttle is limited to 6 km/h? As that is the legal limit in the EU, and would then justify having the throttle on the bike instead of a throttle that does nothing.
 
Hey guys,

First post here and let me first thank you all the hard effort! I'm bought a cube MTB with a standard 73mm BB. I was planning on buying a bafang but after reading the last 30 pages I guess it would be more wise for my preferences to buy a TSDZ2 drive. Hope to give some useable information back to the community when I start riding.

I found this drive on aliexpress from the seller EUNORAU which seems to be a respectable one. They offer a TSDZ2 with a 850C display and multicable for brakes.

https://nl.aliexpress.com/item/32821670861.html

Would this work? Finding the pinout one my own and contributing back to community would not be problem. Just have to be sure these are the right parts, as I cant find another seller that sells this package on aliexpress.

It's not even that much cheaper but I do like the idea of skipping the cable splicing part.
 
xyrus said:
I found this drive on aliexpress from the seller EUNORAU which seems to be a respectable one. They offer a TSDZ2 with a 850C display and multicable for brakes.

https://nl.aliexpress.com/item/32821670861.html

Would this work? Finding the pinout one my own and contributing back to community would not be problem. Just have to be sure these are the right parts, as I cant find another seller that sells this package on aliexpress.

It's not even that much cheaper but I do like the idea of skipping the cable splicing part.
Should work.
 
h27 said:
Help needed: I have installed the OpenSource firmware without problems on my TSDZ2 (0.19.0). But I didn‘t succeed to install the firmware on the 850C using the USB to UART cable method (anybody successful yet?) ...
Any ideas?

I have built a number of these 850c bootloaders over the last few years. Very easy DIY project. The trick is that you must use a USB/TTL adapter with a CP2102 chipset in it. This is required by the APT software which uses a CP210 VCP driver. The easiest kit is to just hook up a 24v dc wall wart with the ground wire going to the black display wire and ground on the UART. +24 red wire on the wall wart goes to the brown p+ display wire. TX and RX on the display go to the corresponding connections on the UART. That's it. The APT software will find it (if you have the driver installed) and the 850c will flash.

DIY bootloader.jpg
 
buba said:
jbalat said:
Guys really getting excited about version 20, stil...
Thanks
JB

Would love for you to test the 0.20.0 and give some feedback! But I understand you are waiting for the stable release. Everything in the 0.20.0 should be really tight and well controlled without any bugs.

I have looked at the FOC and there are several ways to improve the efficiency and torque. This would result in a cooler motor with less heating but with the same or even more torque. This can be done just by optimizing the existing code and functions. Adding field weakening will increase the cadence at the cost of efficiency but this can be acceptable in many use cases.

I see these changes as one major upgrade in the future! But to do this properly we need some serious instruments to really accurately measure and validate the changes and values. You have a suspicion that the static value we use in the experimental mode is not the most optimal and this is most likely true.

If I were to do some testing I would remove the motor from the TSDZ2 enclosure and install it in a motor torque dyno. Would make some extensive testing in the lab and then adapt the firmware for maximum efficiency = maximum torque at any given load and speed.

I think one user reported that we are around 60-70 % efficiency. In the best case scenario we would maybe be able to get to 80-90 %. This would mean that the actual torque increase would be around 50 % from the current 0.20.0 Beta 1! And we would have far less heat developing in the motor!

Sadly, we would have even more stress on the system (bye bye blue gear!) but that is another problem :wink:

Buba glad to see we are thinking along the same lines, Instead of pulling the motor out I was thinking You could make a special version of the firmware that you could adjust throttle and advance angle by using up and down arrows and then mount the bike on a bike exercise machine with adjustable load.. then display all the stats on the screen which you could copy down and graph...
 
Back
Top