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

Electric Motors and Controllers
barden   1 µW

1 µW
Posts: 2
Joined: Mar 13 2020 5:45am

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

Post by barden » Mar 31 2020 11:30am

Hello everybody,

To start A big thank you for developing all these wonderful tools around the TSDZ2, starting at casainho.
Please excuse my poor basic English (thanks google translate)
My name is Denis and I live in the French Alps, near Lake Geneva
I am paraplegic and I use a handbike (handcycle).
So I have on the roads and paths that I practice (I like to walk on unpaved paths) steep slopes, and steep descents, hence the interest of a mid-drive motor. And I need good brakes, I have a pad brake (V-Brake), but I plan to put a nexus (with maybe the double pinion as did brilliantly jeff.rides) with a brake drum brake second (roller brake or coaster brake, I talk about it later) And I had a BBS on another handbike, which works very well, but I like the idea of ​​a torque sensor with an engine that helps in proportion to the effort, to play sports as much as I can while being disabled.
Please excuse me for this long introduction, but necessary for you to understand my context of practice and my needs.
I read with interest in particular the interventions of jeff.rides, which I contacted by private email. He encouraged me to post on the forum, even if Jeff has already answered my questions well, but I have new ones (smiles).
I plan to buy a TSD2 and of course apply the open source firmware
I may be off topic on this topic but I was not sure in which TSDZ topic to post my questions
Being paraplegic and not quadriplegic, I am more interested in a motor with a freewheel and installing a roller brake (with the brake levers that I can operate with my hands) than a coaster brake with back-pedaling. But it seems that another advantage of the coaster brake is to be able to apply a negative torque when starting the engine, which facilitates the help of the engine (I have much less force in the arms than a valid one in the legs well sure). So I'm a little lost, should I take a coaster brake or a roller brake?
Then I would prefer a 48V, but it seems that if I have to choose a coaster brake, it only exists in 36V. What is it exactly about this? it seems that the 48V has more torque than the 36V, is it true?
Regarding the screen, I'm also lost there ... Jeff.rides has long used an LCD3 screen, with developments by mbuba, but this branch seems to have stopped. What about the coaster brake and the P850C screen? is it compatible?
I would prefer to have a stable version, with an engine that stops when we stop pedaling, a controller that does not catch fire (laughs) ... it seems that the versions in development are not yet completely stabilized (P850C )
To buy, from France, tips to give me? there seem to be big price differences (aliexpress, electrifybike), are they justified?
Sorry if I'm too long, and also if I'm off topic in this thread
I will certainly have lots of other questions to ask as my project progresses, see you soon!
Take care of yourself
cordially
Denis

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Mar 31 2020 11:50am

casainho wrote:
Mar 31 2020 2:34am
jeff.page.rides wrote:
Mar 30 2020 10:40pm
casainho wrote:
Mar 30 2020 9:57pm
jeff.page.rides wrote:
Mar 30 2020 7:37pm
I installed my shift sensor and wow does it shift great. The second I push my shift button the motor stops it shifts fast, smooth, and quiet. Now the problem is it powers off for about 2 seconds and about 2 revolutions at 75 RPM before the power comes back on, that's a long dead-spot.
Is there a way in the firmware that we can speed up this power back on, to only a half a second?
Try increasing the current ramp, I hope it works.
10: Advanced Setup
0; Motor acceleration adjustment 0-45% 35%
Is this what you're talking about? What setting should I try? Thanks
Motor current ramp, see the wiki configurations page.
It looks like your newest version for the 860C is getting very close to being ready for me to try it,
but right now I'm still on version 20 beta 1 this is the closest thing I can find to the motor current ramp.
Is this it and what setting would you try first?
Motor acceleration adjustment 0 %
Default value = 0 %
36 volt motor, 36 volt battery = 35 %
36 volt motor, 48 volt battery = 5 %
36 volt motor, 52 volt battery = 0 %
48 volt motor, 36 volt battery = 45 %
48 volt motor, 48 volt battery = 35 %
48 volt motor, 52 volt battery = 30 %

casainho   10 GW

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

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

Post by casainho » Mar 31 2020 11:58am

barden wrote:
Mar 31 2020 11:30am
Hello everybody,

To start A big thank you for developing all these wonderful tools around the TSDZ2, starting at casainho.
Please excuse my poor basic English (thanks google translate)
My name is Denis and I live in the French Alps, near Lake Geneva
I am paraplegic and I use a handbike (handcycle).
So I have on the roads and paths that I practice (I like to walk on unpaved paths) steep slopes, and steep descents, hence the interest of a mid-drive motor. And I need good brakes, I have a pad brake (V-Brake), but I plan to put a nexus (with maybe the double pinion as did brilliantly jeff.rides) with a brake drum brake second (roller brake or coaster brake, I talk about it later) And I had a BBS on another handbike, which works very well, but I like the idea of ​​a torque sensor with an engine that helps in proportion to the effort, to play sports as much as I can while being disabled.
Please excuse me for this long introduction, but necessary for you to understand my context of practice and my needs.
I read with interest in particular the interventions of jeff.rides, which I contacted by private email. He encouraged me to post on the forum, even if Jeff has already answered my questions well, but I have new ones (smiles).
It is really important to keep the information public / open so you can inspire others in your situation!!

Jeff seems very experienced and lucky he shared some good videos about his build.
barden wrote:
Mar 31 2020 11:30am
But it seems that another advantage of the coaster brake is to be able to apply a negative torque when starting the engine, which facilitates the help of the engine (I have much less force in the arms than a valid one in the legs well sure). So I'm a little lost, should I take a coaster brake or a roller brake?
This is something I think Jeff didn´t understand yet, maybe because he could not play with the most recent version of the firmware that has high sensitivity on the torque sensor and full calibration, unlike older versions of the firmware and other forks.

On this firmware, you can make the motor start running with a value lower than 1kg of weight / force on the torque sensor, which is almost nothing and I am pretty sure more than enough for users like you!!

Please follow the torque sensor calibration wiki page and then discover by yourself what the sensor can detect, you will be amazed. You will see on the display the weight / force in KGs you are doing on the pedals and then you can choose the multiplication factor on assist level to produce the motor current / torque.
barden wrote:
Mar 31 2020 11:30am
Then I would prefer a 48V, but it seems that if I have to choose a coaster brake, it only exists in 36V. What is it exactly about this? it seems that the 48V has more torque than the 36V, is it true?
Read the wiki FAQ. Also, seems that 48V can hold for more time the motor high current, meaning you can pull the max power for longer time.
barden wrote:
Mar 31 2020 11:30am
Regarding the screen, I'm also lost there ... Jeff.rides has long used an LCD3 screen, with developments by mbuba, but this branch seems to have stopped. What about the coaster brake and the P850C screen? is it compatible?
For display, the best is the 860C -- but see the comparison table on the wiki.

The coaster brake version, while I don't have one to test, I am using the same code as Buba and other users with a coast brake are helping to test the code.
barden wrote:
Mar 31 2020 11:30am
I would prefer to have a stable version, with an engine that stops when we stop pedaling, a controller that does not catch fire (laughs) ... it seems that the versions in development are not yet completely stabilized (P850C )
I am active developing the firmware and sometimes there are issues but you can count with the best possible firmware, on for you case I think the best one because has high torque sensor sensitivity and full calibration.
barden wrote:
Mar 31 2020 11:30am
To buy, from France, tips to give me? there seem to be big price differences (aliexpress, electrifybike), are they justified?
I would expect support from electrifybike and none from aliexpress sellers, like PSWPower. Look also at PSWPower as they can sell from inside EU, so no extra taxes on customs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

casainho   10 GW

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

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

Post by casainho » Mar 31 2020 12:01pm

jeff.page.rides wrote:
Mar 31 2020 11:50am
It looks like your newest version for the 860C is getting very close to being ready for me to try it,
but right now I'm still on version 20 beta 1 this is the closest thing I can find to the motor current ramp.
Is this it and what setting would you try first?
You need to ask on the right thread, not on this one.

On latest firmware version, find here the configurations instructions for motor current ramp: https://github.com/OpenSource-EBike-fir ... play#Motor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Mar 31 2020 1:01pm

casainho wrote:
Mar 31 2020 12:01pm
jeff.page.rides wrote:
Mar 31 2020 11:50am
It looks like your newest version for the 860C is getting very close to being ready for me to try it,
but right now I'm still on version 20 beta 1 this is the closest thing I can find to the motor current ramp.
Is this it and what setting would you try first?
You need to ask on the right thread, not on this one.

On latest firmware version, find here the configurations instructions for motor current ramp: https://github.com/OpenSource-EBike-fir ... play#Motor
As soon as I see that someone with a coaster brake motor that is using the latest firmware successfully then I'll go ahead and install my 860C and give it a try. Thanks

vshitikov   10 W

10 W
Posts: 72
Joined: Mar 05 2020 7:24am

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

Post by vshitikov » Mar 31 2020 3:37pm

jeff.page.rides wrote:
Mar 31 2020 1:01pm

As soon as I see that someone with a coaster brake motor that is using the latest firmware successfully then I'll go ahead and install my 860C and give it a try. Thanks
Yep, I just ordered 860c display as well. For me the main advantages of this display is the water proof. With others you never know how sealed they are. This one is hard to open so should be better sealed.
I wait till Casainho stabilizes his version. I still use version 0.54 with the patch for the overrun and I don't see any issues that you guys report here, really stable. I guess some regression was introduced when number of assist levels passed for 20...

I think also it's easy implement some of the assist modes from the 0.20 version, but personally I don't miss any of them as I don't push my bike to the limits. I have non-electric bike for that :) Casainho version is really bread 'n'butter for general touring use I guess.
When some of my parts from China come here I will play a bit more to merge some of the Buba's modes into Casainho branch to see how it works.

Lubin   100 µW

100 µW
Posts: 7
Joined: Oct 04 2019 3:59am
Contact:

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

Post by Lubin » Mar 31 2020 3:59pm

Hi,

I fried a 850C display due to wrong manipulation.

Anyway, It seems the uc is the fried part.
I did not find an exact replacement for the GD32F103RET6 (with 512kB size).
I pick a STM32F103RETb and solder it to give it a try.

Programmer detect:
Device ID:0x414
Rev Y
Device flash Size : 256 Kbytes
Device family :STM32F10x High-density
Flash size 256 kB

When programming with the TSDZ2 firmware it complains that size is bigger than the flash size which was quite obvious.

I doubt the firmware requires all the flash size. (I might be wrong !)
Any volonteers to compile the project for a STM32F103RETb ? I did not manage to set-up tools (I am not a STM guru !)
Maybe it compiles and I could report if it works (might help the many of thoses that fried their 850c)

Thanks !

vshitikov   10 W

10 W
Posts: 72
Joined: Mar 05 2020 7:24am

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

Post by vshitikov » Mar 31 2020 4:16pm

Lubin wrote:
Mar 31 2020 3:59pm
Hi,

I fried a 850C display due to wrong manipulation.

Anyway, It seems the uc is the fried part.
I did not find an exact replacement for the GD32F103RET6 (with 512kB size).
I pick a STM32F103RETb and solder it to give it a try.

Programmer detect:
Device ID:0x414
Rev Y
Device flash Size : 256 Kbytes
Device family :STM32F10x High-density
Flash size 256 kB

When programming with the TSDZ2 firmware it complains that size is bigger than the flash size which was quite obvious.

I doubt the firmware requires all the flash size. (I might be wrong !)
Any volonteers to compile the project for a STM32F103RETb ? I did not manage to set-up tools (I am not a STM guru !)
Maybe it compiles and I could report if it works (might help the many of thoses that fried their 850c)

Thanks !
I suppose you have set up correctly the processor type in your STM programmer?
The program is already complied for the STM32F10x family so your MCU should theoretically work but I see that the size of the .bin file is 266kB just over the limit of the size your MCU. I don't know why it is so big.

BTW I just checked there is the same part from ST with 512kB of the Fash. I did not check out the pinout though
7Eur!
https://eu.mouser.com/ProductDetail/STM ... 3bu1Xcew==
Last edited by vshitikov on Mar 31 2020 4:52pm, edited 1 time in total.

Lubin   100 µW

100 µW
Posts: 7
Joined: Oct 04 2019 3:59am
Contact:

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

Post by Lubin » Mar 31 2020 4:40pm

Hi,

I used STM32 ST-Link Utility (windows) which detected the chip (seems soldering is ok on programming pin at least).

Btw, I was just seeing your Sweet Curry cargo bike. I pick the Kombi version from yuba either (few pictures: https://lubin.kerhuel.eu/post/motorized-kombi-bike/ ; 1200 Km with original chain and motor "blue gear" with two kids & the TSDZ2 fw).

vshitikov   10 W

10 W
Posts: 72
Joined: Mar 05 2020 7:24am

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

Post by vshitikov » Mar 31 2020 4:54pm

Lubin wrote:
Mar 31 2020 4:40pm
Hi,

I used STM32 ST-Link Utility (windows) which detected the chip (seems soldering is ok on programming pin at least).

Btw, I was just seeing your Sweet Curry cargo bike. I pick the Kombi version from yuba either (few pictures: https://lubin.kerhuel.eu/post/motorized-kombi-bike/ ; 1200 Km with original chain and motor "blue gear" with two kids & the TSDZ2 fw).
I think that the code is too big for that chip. My compiler gives 271kB, maybe Casainho knows where to change memory map but I'm a bit lost with that.
There is an exact chip from ST from Mouser
https://eu.mouser.com/ProductDetail/STM ... 3bu1Xcew==

jeff.page.rides   100 W

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

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

Post by jeff.page.rides » Mar 31 2020 6:02pm

vshitikov wrote:
Mar 31 2020 3:37pm
jeff.page.rides wrote:
Mar 31 2020 1:01pm

As soon as I see that someone with a coaster brake motor that is using the latest firmware successfully then I'll go ahead and install my 860C and give it a try. Thanks
Yep, I just ordered 860c display as well. For me the main advantages of this display is the water proof. With others you never know how sealed they are. This one is hard to open so should be better sealed.
I wait till Casainho stabilizes his version. I still use version 0.54 with the patch for the overrun and I don't see any issues that you guys report here, really stable. I guess some regression was introduced when number of assist levels passed for 20...

I think also it's easy implement some of the assist modes from the 0.20 version, but personally I don't miss any of them as I don't push my bike to the limits. I have non-electric bike for that :) Casainho version is really bread 'n'butter for general touring use I guess.
When some of my parts from China come here I will play a bit more to merge some of the Buba's modes into Casainho branch to see how it works.
THANKS Keep me posted.

mctubster   100 W

100 W
Posts: 231
Joined: Feb 26 2018 6:21am

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

Post by mctubster » Apr 01 2020 3:59am

HughF wrote:
Mar 31 2020 7:08am

Latest Casainho code only supports Power mode then?
Yes I believe so. I am still using the LCD3, I have a 850c in the drawer because I rely on EMTB mode which is like a progressive torque mode. It is great and I believe solves all of the issues you are raising.

.20beta1 is very stable. It has a few small issues but no major issues, very polished, not sure why we continue calling it a beta! More like a release candidate.

I don't want to have to play with power levels, I just want lots of power to accelerate, and then a steady background power to assist once up to speed. EMTB mode does this. It is not as sophisticated as a Bosch implementation since the CPU cycles (and sensor) are not available - ideally you would input torque, bike speed, cadence and gradient in real time to optimise the power output for the conditions.

casainho   10 GW

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

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

Post by casainho » Apr 01 2020 4:03am

mctubster wrote:
Apr 01 2020 3:59am
I am still using the LCD3, I have a 850c in the drawer because I rely on EMTB mode which is like a progressive torque mode. It is great and I believe solves all of the issues you are raising.
That is because you never tried the torque sensor full calibration, because it is only available on latest firmware version.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

mctubster   100 W

100 W
Posts: 231
Joined: Feb 26 2018 6:21am

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

Post by mctubster » Apr 01 2020 5:21am

casainho wrote:
Apr 01 2020 4:03am
mctubster wrote:
Apr 01 2020 3:59am
I am still using the LCD3, I have a 850c in the drawer because I rely on EMTB mode which is like a progressive torque mode. It is great and I believe solves all of the issues you are raising.
That is because you never tried the torque sensor full calibration, because it is only available on latest firmware version.
Casainho - very true, but based on HughF descriptions, he is facing the very issues I fear, even with the full torque sensor calibration. A power only mode that does not take into account speed or torque is very limited in understanding what the rider wants. For me at least EMTB mode is a very simple approximation that works well enough.

Your effort and work on this project is amazing and very appreciated and yes it is completely up to you what you want you implement, however as you previously mentioned people have different styles of riding and differing expectations.

Since we are almost completely locked down here in AU, I will try the new firmware with my 850c

Finally one other issue I face is that my wife sometimes uses this bike. She does not think like an engineer. The usability of having to calibrate the torque sensor each ride would be too much for her. She expects the bike to operate just like a car. Turn it on and go.

casainho   10 GW

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

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

Post by casainho » Apr 01 2020 6:00am

mctubster wrote:
Apr 01 2020 5:21am
The usability of having to calibrate the torque sensor each ride would be too much for her. She expects the bike to operate just like a car. Turn it on and go.
Seems you didn't understand. Torque sensor calibration is only done once.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

plpetrov   1 W

1 W
Posts: 63
Joined: Oct 22 2019 7:25am

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

Post by plpetrov » Apr 01 2020 6:01am

casainho wrote:
Mar 31 2020 7:40am
plpetrov wrote:
Mar 31 2020 4:06am
I was experiencing similar issues also during my testings with the previous versions of the motor firmware. At that time I thought that they are caused by the different version of the motor I am using. You know that in the coaster brake version the pedals are always turned by the motor. My explanation of the effect was that the inertia moment of the pedal arms and the pedals will influence the sensor data that there is continuation of the pedalling effort even there was no any.
Now with the motor overrun issue solved the problem became more evident as the motor will try to stop faster as soon as you stop turning the pedals.
I did a release of motor firmware version were we can disable the permitted relative min cadence (motor overrun), enabling the lights on the display disable the permitted relative min cadence.

Can you please test by enable/disable the lights and see the left and right pedals seems to produce different assist levels??

Here the firmware 0.56.3: https://github.com/OpenSource-EBike-fir ... ses/0.56.3
I am sorry for the delayed response. The result from the testing are as follows:
1. With the light off. Exactly the same behaviour as 0.56.2. The motor is going in power burst for 1/4 turn starting from the point where the left pedal is on top.

2. With the lights on. The motor is going into almost uncontrolled power burst rotating that can be exited only be pressing the handbrake. I did not dare to try to catch them with hand. The bust starts at the left pedal on top and continues for 3/4 turns

This test confirms my previous conclusion that the overrun patch is perfectly working.

On the rest. I think we have two issues.

1. Starting from the left pedal on top some additional power is needed to the motor. As I wrote in my previous test I see increase of the human power from 7 to 10 times with no change on the way how I turn the pedal.

2. The test I do is a corner one. As I wrote I am doing the test in the living room with the back tyre rotating freely in the air. This means it quickly reaches very high RPM. Are we sure that there is really a problem with the motor control. It might be an issue with the way of calculation the motor assist power. The problem appears only on power levels above 10 and is in controllable state until level 13. Above that the situation is uncontrollable.

plpetrov   1 W

1 W
Posts: 63
Joined: Oct 22 2019 7:25am

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

Post by plpetrov » Apr 01 2020 6:09am

plpetrov wrote:
Apr 01 2020 6:01am
casainho wrote:
Mar 31 2020 7:40am
plpetrov wrote:
Mar 31 2020 4:06am
I was experiencing similar issues also during my testings with the previous versions of the motor firmware. At that time I thought that they are caused by the different version of the motor I am using. You know that in the coaster brake version the pedals are always turned by the motor. My explanation of the effect was that the inertia moment of the pedal arms and the pedals will influence the sensor data that there is continuation of the pedalling effort even there was no any.
Now with the motor overrun issue solved the problem became more evident as the motor will try to stop faster as soon as you stop turning the pedals.
I did a release of motor firmware version were we can disable the permitted relative min cadence (motor overrun), enabling the lights on the display disable the permitted relative min cadence.

Can you please test by enable/disable the lights and see the left and right pedals seems to produce different assist levels??

Here the firmware 0.56.3: https://github.com/OpenSource-EBike-fir ... ses/0.56.3
I am sorry for the delayed response. The result from the testing are as follows:
1. With the light off. Exactly the same behaviour as 0.56.2. The motor is going in power burst for 1/4 turn starting from the point where the left pedal is on top.

2. With the lights on. The motor is going into almost uncontrolled power burst rotating that can be exited only be pressing the handbrake. I did not dare to try to catch them with hand. The bust starts at the left pedal on top and continues for 3/4 turns

This test confirms my previous conclusion that the overrun patch is perfectly working.

On the rest. I think we have two issues.

1. Starting from the left pedal on top some additional power is needed to the motor. As I wrote in my previous test I see increase of the human power from 7 to 10 times with no change on the way how I turn the pedal.

2. The test I do is a corner one. As I wrote I am doing the test in the living room with the back tyre rotating freely in the air. This means it quickly reaches very high RPM. Are we sure that there is really a problem with the motor control. It might be an issue with the way of calculation the motor assist power. The problem appears only on power levels above 10 and is in controllable state until level 13. Above that the situation is uncontrollable.
Repeated the tests with the speed sensor disconnected. The behaviour is the same. So the input from it is not the one causing the problem.

HughF   100 W

100 W
Posts: 114
Joined: Jan 23 2020 6:13pm

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

Post by HughF » Apr 01 2020 6:37am

mctubster wrote:
Apr 01 2020 3:59am
HughF wrote:
Mar 31 2020 7:08am

Latest Casainho code only supports Power mode then?
Yes I believe so. I am still using the LCD3, I have a 850c in the drawer because I rely on EMTB mode which is like a progressive torque mode. It is great and I believe solves all of the issues you are raising.

.20beta1 is very stable. It has a few small issues but no major issues, very polished, not sure why we continue calling it a beta! More like a release candidate.

I don't want to have to play with power levels, I just want lots of power to accelerate, and then a steady background power to assist once up to speed. EMTB mode does this. It is not as sophisticated as a Bosch implementation since the CPU cycles (and sensor) are not available - ideally you would input torque, bike speed, cadence and gradient in real time to optimise the power output for the conditions.
I have my VLCD6 with me at my lockdown location and my soldering stuff and my STLINK, I will fit the old display back and reflash with 0.20beta1. I ride a single speed and did find the eMTB mode worked very well for that, stand on the pedals and you get maximum assistance, which then backed off as you got onto the flat, without any need to cycle up and down through assistance levels. It could be that the latest Casainho code might not suit the single speed gear train I have. I cannot calibrate the torque sensor at the moment because I do not have enough suitable weights with me.

I plan to fit a TSDZ2 to my hardtail mountain bike with an alfine8, perhaps the latest code will be more suitable for that where I have gears.
Single speed 700c frame, 36v TSDZ2, 13s battery, SW102 display
Genesis iOiD Alfine8 Hard tail MTB, soon to be TSDZ2, SW102 display

mctubster   100 W

100 W
Posts: 231
Joined: Feb 26 2018 6:21am

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

Post by mctubster » Apr 01 2020 4:25pm

casainho wrote:
Apr 01 2020 6:00am
mctubster wrote:
Apr 01 2020 5:21am
The usability of having to calibrate the torque sensor each ride would be too much for her. She expects the bike to operate just like a car. Turn it on and go.
Seems you didn't understand. Torque sensor calibration is only done once.
Great. I thought the crank arm had to be positioned correctly each time the motor is turned on. That is what I was referring to. If that is solved then maybe it is more usable

Brlowe   100 mW

100 mW
Posts: 45
Joined: Nov 15 2019 10:16am

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

Post by Brlowe » Apr 01 2020 8:04pm

Not sure is anyone brought this up but I just got a new 860C wit the 070 firmware and on startup it says 850C firmware.
Just letting you know, it is not a big deal.

skestans   100 W

100 W
Posts: 150
Joined: Jul 12 2019 12:42am
Location: Switzerland

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

Post by skestans » Apr 02 2020 2:18am

mctubster wrote:
casainho wrote:
Apr 01 2020 6:00am
mctubster wrote:
Apr 01 2020 5:21am
The usability of having to calibrate the torque sensor each ride would be too much for her. She expects the bike to operate just like a car. Turn it on and go.
Seems you didn't understand. Torque sensor calibration is only done once.
Great. I thought the crank arm had to be positioned correctly each time the motor is turned on. That is what I was referring to. If that is solved then maybe it is more usable
I think you still have to put the left or right crank arm down depending on your settings when powering on. Unless this has changed?

casainho   10 GW

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

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

Post by casainho » Apr 02 2020 2:25am

skestans wrote:
Apr 02 2020 2:18am
mctubster wrote:
casainho wrote:
Apr 01 2020 6:00am
mctubster wrote:
Apr 01 2020 5:21am
The usability of having to calibrate the torque sensor each ride would be too much for her. She expects the bike to operate just like a car. Turn it on and go.
Seems you didn't understand. Torque sensor calibration is only done once.
Great. I thought the crank arm had to be positioned correctly each time the motor is turned on. That is what I was referring to. If that is solved then maybe it is more usable
I think you still have to put the left or right crank arm down depending on your settings when powering on. Unless this has changed?
Well, if his wife don't care and use the not calibrated, then there is no issue since the no calibration ignores left or right.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

casainho   10 GW

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

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

Post by casainho » Apr 02 2020 7:41am

Brlowe wrote:
Apr 01 2020 8:04pm
Not sure is anyone brought this up but I just got a new 860C wit the 070 firmware and on startup it says 850C firmware.
Just letting you know, it is not a big deal.
Thanks, will be corrected on next version.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

casainho   10 GW

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

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

Post by casainho » Apr 02 2020 7:48am

plpetrov wrote:
Apr 01 2020 6:01am
I am sorry for the delayed response. The result from the testing are as follows:
1. With the light off. Exactly the same behaviour as 0.56.2. The motor is going in power burst for 1/4 turn starting from the point where the left pedal is on top.

2. With the lights on. The motor is going into almost uncontrolled power burst rotating that can be exited only be pressing the handbrake. I did not dare to try to catch them with hand. The bust starts at the left pedal on top and continues for 3/4 turns

This test confirms my previous conclusion that the overrun patch is perfectly working.

On the rest. I think we have two issues.

1. Starting from the left pedal on top some additional power is needed to the motor. As I wrote in my previous test I see increase of the human power from 7 to 10 times with no change on the way how I turn the pedal.

2. The test I do is a corner one. As I wrote I am doing the test in the living room with the back tyre rotating freely in the air. This means it quickly reaches very high RPM. Are we sure that there is really a problem with the motor control. It might be an issue with the way of calculation the motor assist power. The problem appears only on power levels above 10 and is in controllable state until level 13. Above that the situation is uncontrollable.
Thanks and I am lost...

For your note 2., high assist level factor will multiply the human power (torque sensor value * cadence * a constant). Torque sensor value is not exactly 0 when you are not doing force on the pedals..., so, cadence plays an important role here, once cadence equal to 0, the motor stops even if torque sensor value is not zero... but your TSDZ2 motor is a coast version and so this kind of interactions may work differently from regular TSDZ2...

Do you have suggestions for next steps??
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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

plpetrov   1 W

1 W
Posts: 63
Joined: Oct 22 2019 7:25am

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

Post by plpetrov » Apr 02 2020 10:00am

casainho wrote:
Apr 02 2020 7:48am
plpetrov wrote:
Apr 01 2020 6:01am
I am sorry for the delayed response. The result from the testing are as follows:
1. With the light off. Exactly the same behaviour as 0.56.2. The motor is going in power burst for 1/4 turn starting from the point where the left pedal is on top.

2. With the lights on. The motor is going into almost uncontrolled power burst rotating that can be exited only be pressing the handbrake. I did not dare to try to catch them with hand. The bust starts at the left pedal on top and continues for 3/4 turns

This test confirms my previous conclusion that the overrun patch is perfectly working.

On the rest. I think we have two issues.

1. Starting from the left pedal on top some additional power is needed to the motor. As I wrote in my previous test I see increase of the human power from 7 to 10 times with no change on the way how I turn the pedal.

2. The test I do is a corner one. As I wrote I am doing the test in the living room with the back tyre rotating freely in the air. This means it quickly reaches very high RPM. Are we sure that there is really a problem with the motor control. It might be an issue with the way of calculation the motor assist power. The problem appears only on power levels above 10 and is in controllable state until level 13. Above that the situation is uncontrollable.
Thanks and I am lost...

For your note 2., high assist level factor will multiply the human power (torque sensor value * cadence * a constant). Torque sensor value is not exactly 0 when you are not doing force on the pedals..., so, cadence plays an important role here, once cadence equal to 0, the motor stops even if torque sensor value is not zero... but your TSDZ2 motor is a coast version and so this kind of interactions may work differently from regular TSDZ2...

Do you have suggestions for next steps??
No one is lost. If you allow me to suggest, we have two options:

1. Experimental approach. In case you have doubts in the current versions of the motor code, I may try to install some old versions in order to try to identify the code where an error was introduced. However this may lead to nothing.

2. Analytical approach. Try to identify what causes the jump increase of the human power from the moment the left pedal is at the top and starts going down. As I previously wrote, while rotating the pedals for 3/4 turn I see human power for 0 to 1 and for 1/4 turn jump from 7 to 10. If I use an an analogue clock as example and the minute hand of the clock is rotating back, from 0 to 45 we have the bust. From 45 to 0 all is OK.
- Is there something specific in the motor control that starts or is reinitialised a 0 - the left pedal on top? E.G. Handling the switch from one two another pedal with the calibration settings of the torque sensor? I still do not know why we get different values for the left and right pedals. I assume we have one sensor but the pedal shaft on the left and the right sight behaves differently from mechanical point of view? Am I correct or lost?
- As you know everything much better, you can advise me at which values available on the display I should look at, in order to try to identify a pattern that may causes this particular behaviour of the system.

Post Reply