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

Electric Motors and Controllers
casainho   1.21 GW

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

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

Post by casainho » Aug 06 2019 4:44am

nbdriver wrote:
Aug 06 2019 3:59am
Just something confusing is that we have to configure a power limit (new) in Basic setup, and a max current (as before). These two settings are doing the same thing for me because if i want to limit motor power to 576w i set current to 12Amp (12amp x 48v) and so on. I agree that it is more convenient for the end user to have a power limit in watts, and not having to calculate it by himself :D
That 2 configurations have different purposes.

Max current may be a value depending on the limit of your battery package or motor controller (you may want to limit this if you don't have the temperature sensor installed or other reasons).

Max power should be configured quickly not leaving the main screen and may be useful when you want limit the max power usage, like managing battery range on a long trip or want a fixed max power level from the motor like on a specific trip or part of it.

This must be explained on wiki or will bring confusion as you say.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) 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.

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 06 2019 4:50am

buba wrote:
Aug 04 2019 5:31pm




Rafe wrote:
Aug 04 2019 2:43pm
Throttle still behaves as an on off switch but suspect you know that.
Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.



With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0


You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.
Last edited by Rafe on Aug 06 2019 5:17am, edited 2 times in total.

thineight   100 W

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

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

Post by thineight » Aug 06 2019 5:00am

buba wrote:
Aug 04 2019 1:17pm
The video tutorial of the Cadence Sensor Automatic Calibration:


Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg
IMG_20180921_102250.jpg (283.9 KiB) Viewed 420 times
Thanks
MTB KTM Ultra 29" - City bike DAYTONA 28"

bwb   1 mW

1 mW
Posts: 18
Joined: Jun 23 2019 7:07am

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

Post by bwb » Aug 06 2019 5:42am

58 (on the road) km's done with 0.20.0 alpha2 (36V motor/battery combination).

There is indeed a small backward resistance, it didn't disappear as andrea_104kg mentioned, but it doesn't bother me.
When the cadence reaches +-90, then the motor power drops. I then just shift gear. I didn't notice that with 0.19.0, but I assume that both I and the motor were to enthusiastic with 0.20.0alpha.
The throttle is as Rafe describes, but my throttle usage is limited to keep the bike going at certain occasions. I can live with how it works today.

I really, really enjoy riding my bike with OSF!
Congrats to all contributors.

@casainho: I am looking forward to use the 850C display on OSF.

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 06 2019 5:46am

thineight wrote:
Aug 06 2019 5:00am
buba wrote:
Aug 04 2019 1:17pm
The video tutorial of the Cadence Sensor Automatic Calibration:


Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks
Is it not be possible to remove 2 chainring bolts and zip tie the crank through the bolt holes for the cal?

casainho   1.21 GW

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

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

Post by casainho » Aug 06 2019 5:54am

bwb wrote:
Aug 06 2019 5:42am
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) 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.

bwb   1 mW

1 mW
Posts: 18
Joined: Jun 23 2019 7:07am

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

Post by bwb » Aug 06 2019 6:10am

casainho wrote:
Aug 06 2019 5:54am
bwb wrote:
Aug 06 2019 5:42am
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?
No, I only started using OSF since 0.19.0 with LCD3, then switched to 0.20.0 and thought that 850C doesn't work yet with 0.20.0.
My display is opened, the correct programmer has arrived and I am keen to try it.

casainho   1.21 GW

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

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

Post by casainho » Aug 06 2019 6:13am

bwb wrote:
Aug 06 2019 6:10am
casainho wrote:
Aug 06 2019 5:54am
bwb wrote:
Aug 06 2019 5:42am
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?
No, I only started using OSF since 0.19.0 with LCD3, then switched to 0.20.0 and thought that 850C doesn't work yet with 0.20.0.
My display is opened, the correct programmer has arrived and I am keen to try it.
Ok, so is up to you.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) 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.

buba   10 kW

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

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

Post by buba » Aug 06 2019 6:56am

casainho wrote:
Aug 05 2019 9:28pm
buba wrote:
Aug 05 2019 7:31pm
Having runtime variables initialized to a value, not using the EEPROM in any way, minimizing structs and discarding all other instructions needed for the implementation we have today will be the best for programming memory.
I am pretty sure that every initialization value (other than 0) takes programing memory so we need to avoid it if possible.
1. Having runtime variables initialized to a value together with:
2. Not using the EEPROM in any way
3. Minimizing structs and discarding all other instructions needed for the implementation we have today will be the best for programming memory.

There are more instructions for what we have today than a simple:

static uint8_t ui8_motor_type = 48_VOLT_MOTOR;

I am comparing everything as a whole and not just the initialization.


casainho wrote:
Aug 05 2019 9:28pm
buba wrote:
Aug 05 2019 7:31pm
casainho wrote:
Aug 05 2019 6:28pm
Maybe you can say how much memory in being used right now on the motor controller from the available 32 kbytes.
Yes, we are at 77 % used up and therefore 23 % left.
So I think we are in red zone because I think we should let 10% free for maintenance, then only 13% is left. I want to implement at least more 4 features:
- torque sensor full calibration
- configuration to disable PAS, torque sensor, brake sensor or wheel speed sensor, so in case of a failing while riding far from home we can still use the ebike
- field weakening to increase motor max RPM of current 4000
- password protection as used on KT-LCD3 and 850C LCDs original firmware but here the password paired with the motor controller

I think the 13% will not be enough for that 4 features and I am sure we will have other features in the list, like improving motor errors to give user more feedback of system state, etc.

So, we are on red zone already, we need to save every byte possible on the motor controller firmware.
Well I have optimized not only the new things but the whole system has gotten optimizations. In comparison, the 0.19.0 is at 66 % compared to 0.20.0 with 77 %! But the 0.19.0 got some optimizations as well so it is maybe better to compare to the 0.18.0 but that is not the point. What I am trying to say is if we move forward and consider every step there should be no problem to implement the things you are planning and still have space left for maintenance.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 7:03am

bwb wrote:
Aug 06 2019 5:42am
58 (on the road) km's done with 0.20.0 alpha2 (36V motor/battery combination).

There is indeed a small backward resistance, it didn't disappear as andrea_104kg mentioned, but it doesn't bother me.
When the cadence reaches +-90, then the motor power drops. I then just shift gear. I didn't notice that with 0.19.0, but I assume that both I and the motor were to enthusiastic with 0.20.0alpha.
The throttle is as Rafe describes, but my throttle usage is limited to keep the bike going at certain occasions. I can live with how it works today.

I really, really enjoy riding my bike with OSF!
Congrats to all contributors.

@casainho: I am looking forward to use the 850C display on OSF.
I will take a look at everything you have mentioned and everything should be solved in the 0.20.0 Alpha 3! Please let me know if I miss something or forget. But this is exactly why I love that you are out and testing! I get some great feedback and all this goes into making the Alpha 3 better :)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 7:14am

thineight wrote:
Aug 06 2019 5:00am
buba wrote:
Aug 04 2019 1:17pm
The video tutorial of the Cadence Sensor Automatic Calibration:
Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks
Looking forward to hear your impressions!

It is a lacking video tutorial but wanted to get it out so at least there is something. I do apologize as the steps could be more descriptive.

When you lock the pedals to the crank they rotate with the motor. The motor rotates perfectly with no change in the rotational speed. Much easier than if we were to manually rotate the pedals and of course much more accurate.

I see you have a situation that requires another setup for the calibration. Maybe use some sort of metal wire to wrap around the pedal arm and attach it somewhere on the chainwheel?

Or maybe:
Rafe wrote:
Aug 06 2019 5:46am
Is it not be possible to remove 2 chainring bolts and zip tie the crank through the bolt holes for the cal?
Also, It would maybe possible to loosen one bolt and get a metal wire around that and of course have it wrap around the pedal arm.

There is not much pressure during rotation. So it is only important that the pedal arm rotates at a constant speed with the chainwheel and it does not need to be rock solid. You will see that is works when the value in the odometer field actually converges to a value.

Please let me know if you find a way or need more ideas how to do it! I do not mind at all throwing around ideas and trying to get it to work. My goal is that you only need to do this calibration once with your display and that is it. So I hope that makes it even more worthwhile.

(Nice bike! I see you have the Thudbuster, I can imagine it is a smooth ride!)
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 06 2019 7:26am

thineight wrote:
Aug 06 2019 5:00am
buba wrote:
Aug 04 2019 1:17pm
The video tutorial of the Cadence Sensor Automatic Calibration:


Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks
I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG
screwdrivere.JPG (148.36 KiB) Viewed 379 times
Mr Perryscope
Empowered people support rider and trustee
www.empoweredpeople.co.uk

Rafe   10 W

10 W
Posts: 91
Joined: Oct 16 2018 5:56pm

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

Post by Rafe » Aug 06 2019 7:47am

The backwards resistance in the new software is intermittent. For example power up and enable the 3 different modes (PTC) in turn and it is there and also in eMTB mode but after using walk assist there is no backwards resistance, then switch off and on again and it is back use walk assist and it has gone. That's just one example but I have noticed it come and go in use too. It's only a slight resistance though and nothing like it used to be.

andrea_104kg   100 W

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

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

Post by andrea_104kg » Aug 06 2019 7:51am

but cadence calibration it's only for cadence mode or also for power and torque mode?

buba   10 kW

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

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

Post by buba » Aug 06 2019 7:56am

nbdriver wrote:
Aug 06 2019 3:59am
Thanks buba for the answer about flashing .ihx, indeed it is working like a .hex file.
I tested the bike this morning to work, and everything went great, felt smoother and more reactive (Advanced cadence enabled and calibrated, thanks to your video :thumb:).
All that sounds great and I am ecstatic to hear that! Hope you enjoy the ride! :)


nbdriver wrote:
Aug 06 2019 3:59am
Just something confusing is that we have to configure a power limit (new) in Basic setup, and a max current (as before). These two settings are doing the same thing for me because if i want to limit motor power to 576w i set current to 12Amp (12amp x 48v) and so on. I agree that it is more convenient for the end user to have a power limit in watts, and not having to calculate it by himself :D

But it can also be confusing because if i have a current limit at 10Amps (48V battery) and a power limit set at 550Watts i suppose that i will not be able to reach that limit because current limit would have priority, am i right ?
You should set the battery current limit to the maximum current you can safely pull from your particular battery. But also the current you feel is safe for the motor in your riding environment. No calculations required.

But the wattage you set is the amount of power you want to be assisted. You can put this to whatever you like as the system will always take the lower limit of the two. So if you set the power limit to 1000 watts but the current limit is lower it will automatically use the current limit. If you set the current limit to 18 A and the power limit is lower then the power limit will be used.

You do not need to calculate anything nor match the values. Just set the limit you feel is more important and set the other limit higher.

So if you want to be sure that you get as much assistance as possible from the motor, but not exceeding a certain amperage and therefore limit motor heating, you can configure it to 10 amps and it will adjust the power so this condition does not exceed. But if you are more concerned of getting a certain power level at all times you can configure the power limit and the current will adjust so the power level is maintained. No limit is ever exceeded.


nbdriver wrote:
Aug 06 2019 3:59am
And also, i don't understand the difference between Power mode and torque mode, as it is always a multiplier of human input. What is the advantage of using one instead of the other ?
Power Assist:

1. Measure the torque sensor value and convert it to torque.
2. Measure the cadence.
3. Calculate human power, it is defined as torque * cadence.
4. The target motor power is calculated by human power * assist level multiplier. So if we measure a value of 200 watts human power and multiply it with an assist level multiplier of 2.0 we will be asking the motor to assist us with 400 watts motor power.

Result: the more you sweat the more assistance you will get.


Torque Assist:

1. Measure the torque sensor value.
2. The target motor torque is calculated by torque * assist level multiplier

Result: the more you push on the pedals the more assistance you will get.

There are no advantages. Just different experiences. Personal preference :)


nbdriver wrote:
Aug 06 2019 3:59am
last question, in the wiki, section Power Assist we find :
"The assist level multipliers sets the motor power as a factor of the power the rider is generating at the crankshaft. For instance, if a multiplier is set to 2.0 the motor will assist with 100 watts if the human power generated at the crank shaft is 100 watts."

Is it not with a multiplier of 1.0 that the motor should give 100W if the rider gives 100W ? it seems more logic to me to multiply the human power by a factor to find the motor power, i always understood the multiplier this way.
The wiki seems to have bugs and is in development :lol: Will change!

nbdriver wrote:
Aug 06 2019 3:59am
Thank you for this wonderful work, and i will update my impressions and findings. Also i'm still available to translate wiki to french, this would make the firmware accessible for more people.
Thank you for the kind words!

That would be great and is very generous of you! Maybe when the 0.20.0 is released and the wiki is finished together with the help from others as well!
Last edited by buba on Aug 06 2019 8:10am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 8:01am

andrea_104kg wrote:
Aug 06 2019 7:51am
but cadence calibration it's only for cadence mode or also for power and torque mode?
Cadence Sensor calibration is used for every riding mode and used for everything that uses the cadence sensor. It can improve several aspects and makes the system more responsive :)

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

For clarification:

PAS stands for Pedal Assist System. A hand throttle is not defined as PAS.

The torque sensor is a type of PAS.

The cadence sensor is a type of PAS.

The cadence sensor calibration improves the cadence sensor. Sometimes referred to as the PAS sensor... I think it is better to call it the cadence sensor for obvious reasons.
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 06 2019 8:15am

EDIT: Sorry double post this one was incorrect, see next post
Last edited by perryscope on Aug 06 2019 8:24am, edited 3 times in total.
Empowered people support rider and trustee
www.empoweredpeople.co.uk

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 06 2019 8:18am

perryscope wrote:
Aug 06 2019 8:15am
Rafe wrote:
Aug 06 2019 4:50am
buba wrote:
Aug 04 2019 5:31pm




Rafe wrote:
Aug 04 2019 2:43pm
Throttle still behaves as an on off switch but suspect you know that.
Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.



With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0


You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.
I have done some tests on the throttle as well

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
Yes but only uses half the throttle range
2. Are you seeing around 127 when giving half throttle?
Yes
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
No there is control over the first half of throttle
4. What is the maximum value on 11:0 when giving full throttle?
184
6. What is the resting value on 11:0, no throttle applied?
43
7. What is the resting value on 11:1, no throttle applied?
0

I have recorded a video to try and show this, you should be able to see i hit full throttle with plenty of moment left and higher values showing on the screen for 11:1 also you can hear in the motor that the speed hits a limit at around a value of 90ish. Please excuse the rattle without a chain attached this motor is a bit noisy!

Empowered people support rider and trustee
www.empoweredpeople.co.uk

buba   10 kW

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

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

Post by buba » Aug 06 2019 8:25am

Rafe wrote:
Aug 06 2019 4:50am
buba wrote:
Aug 04 2019 5:31pm
Rafe wrote:
Aug 04 2019 2:43pm
Throttle still behaves as an on off switch but suspect you know that.
Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.
With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0
Would you mind testing one last thing so we can confirm something? :wink:

Can you set the power limit to 1000+ watt and increase the max battery current to 18 A? And then try the throttle and see if it reacts more as one would expect.

Rafe wrote:
Aug 06 2019 4:50am
You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.
Okay, totally agree. Let us put Cadence Assist on hold for now and just think about it in the back of our heads. A lot of things going on now. There is a chance we will revisit this when everything else settles :)

Also agree on your comments regarding the gear!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 8:30am

perryscope wrote:
Aug 06 2019 8:18am
I have recorded a video to try and show this, you should be able to see i hit full throttle with plenty of moment left and higher values showing on the screen for 11:1 also you can hear in the motor that the speed hits a limit at around a value of 90ish. Please excuse the rattle without a chain attached this motor is a bit noisy!
Hmm... this just proves how much value there is in giving me as much information as possible. Nice!

Okay, so basically the throttle is a torque mode implementation so it only works when there is a load on the motor. That is why it bottoms out at around half throttle when there is no load. So when testing there needs to be a load on the motor.

If you try the throttle "live" outside and configure 1000+ watts and set the maximum battery limit to 18 A, does it operate any better?
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 8:35am

Rafe wrote:
Aug 06 2019 7:47am
The backwards resistance in the new software is intermittent. For example power up and enable the 3 different modes (PTC) in turn and it is there and also in eMTB mode but after using walk assist there is no backwards resistance, then switch off and on again and it is back use walk assist and it has gone. That's just one example but I have noticed it come and go in use too. It's only a slight resistance though and nothing like it used to be.
Will solve this as soon as possible! And Rafe (+ all others) THANK you for the constant feedback!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Aug 06 2019 8:44am

A lot of things going on right now and I must have missed to answer someone so I do apologize if that is the case.

This will not get any better as I will be away for the day so I hope everyone knows that I read every post and take everything in consideration!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

thineight   100 W

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

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

Post by thineight » Aug 06 2019 8:46am

buba wrote:
Aug 06 2019 7:14am

(Nice bike! I see you have the Thudbuster, I can imagine it is a smooth ride!)
Thanks, yes the Thudbuster smooths up the bumps you find along your paths, on a front MTB you can put some weight on the seat going downhill without risking your nuts each rock you hit :mrgreen: :mrgreen:
MTB KTM Ultra 29" - City bike DAYTONA 28"

thineight   100 W

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

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

Post by thineight » Aug 06 2019 8:51am

perryscope wrote:
Aug 06 2019 7:26am
I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG

Mr Perryscope
Thanks Perryscope, I see you do not have the chain mounted in your picture. Is that not required? In that case I would put a zip-tie somehow between the chainweel teeth and the crank.
How is the process of calibration, are the cranks rotating forward or backwards?

Thanks
MTB KTM Ultra 29" - City bike DAYTONA 28"

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

thineight wrote:
Aug 06 2019 8:51am
perryscope wrote:
Aug 06 2019 7:26am
I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG

Mr Perryscope
Thanks Perryscope, I see you do not have the chain mounted in your picture. Is that not required? In that case I would put a zip-tie somehow between the chainweel teeth and the crank.
How is the process of calibration, are the cranks rotating forward or backwards?

Thanks
I understood it that the chain and drive did not need to be connected, but I may be wrong about that? ( buba can you confirm if this is ok?)
I just thought it was easier than trying to prop the bike up as i don't have a stand on this or the trike

The trike does not actually need a stand ;) and in this case lifting a wheel would be an issue as well it has a limited slip differential! I kid you not! so still drives forward with a wheel lifted, fun to ride on two wheels but not good for testing!

The calibration process drives forward slowly..
Empowered people support rider and trustee
www.empoweredpeople.co.uk

Post Reply