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

Walk assist without throttle sounds very interesting. You guys do very good job. A lot of thanks for you.
 
Rafe said:
On the subject of the throttle I do disagree with jbalat that they are not needed on torque drives as I often find myself on sections of track with ruts where pedalling is not possible.
I disagree with your disagreement, my friend always cheat on the trails by using their throttles but somehow I always manage to make it without one, think of this as a challenge ;)

...rts and pulling anything from other ports that might drain power, in the end I gave up with lap top and now use a PC USB port connected directly to the MB and then a USB extension lead to the STlink dongle and on the odd occasion it still does not work I have to restart the PC.
This is great info for all to take on board. I haven’t had any issues but seems a few others have tried everything and still can’t get a good connection.
 
EC I wast to upgrade to 14.2 but I want to include my changes for high cadence.
How do I compile it for no throttle version after I make the changes ?
 
jbalat said:
EC I wast to upgrade to 14.2 but I want to include my changes for high cadence.
How do I compile it for no throttle version after I make the changes ?

Little question maybe it has been asked before but I can't find it.
How does PAS max cadence exactly work? By default it is 110 but what if I put it on 90 or 125?
I have a shimano nexus 8 gear and was playing around with it but I can not really feel a difference.
 
bart1006 said:
jbalat said:
EC I wast to upgrade to 14.2 but I want to include my changes for high cadence.
How do I compile it for no throttle version after I make the changes ?

Little question maybe it has been asked before but I can't find it.
How does PAS max cadence exactly work? By default it is 110 but what if I put it on 90 or 125?
I have a shimano nexus 8 gear and was playing around with it but I can not really feel a difference.
Human power = torque sensor * pedal cadence.
Pedal cadece is in percentage, where the value defined on LCD5 represents 100%.

Motor current is human power * some others values.

If you lower the pedal cadence value on setup options, you will get max assistance part due to pedal cadence earlier.
 
casainho said:
bart1006 said:
jbalat said:
EC I wast to upgrade to 14.2 but I want to include my changes for high cadence.
How do I compile it for no throttle version after I make the changes ?

Little question maybe it has been asked before but I can't find it.
How does PAS max cadence exactly work? By default it is 110 but what if I put it on 90 or 125?
I have a shimano nexus 8 gear and was playing around with it but I can not really feel a difference.
Human power = torque sensor * pedal cadence.
Pedal cadece is in percentage, where the value defined on LCD5 represents 100%.

Motor current is human power * some others values.

If you lower the pedal cadence value on setup options, you will get max assistance part due to pedal cadence earlier.

Thanks for the quick answer!
 
I did 50+ km with 14.02. Not bad at all! :)
I run it mostly on flat ground but also did some climbing in the park(tested with default settings).
What I like:
- Power is delivered linear without the cadence limitation of the old soft. As a comparison I was able to run similar medium effort 45km/h instead of 40km/h(1200w assistence level). I was able to get 50km/h+ with hard effort. Also I think is protecting the motor gears better.
- I had no power limitation: hit 850W on a 48V/18A battery.
- Temp sensor is good!
- I really like the LCD, it is perfect for lots of menus and the display is good. Also is cheaper than VLCD5.

I have a list of improvements suggestions, some were already mentioned. I will post when I have the complete list.

Thanks are in order to the DEV team who did an excellent job!
 
Quick question/request - I see FOC and SOC referenced a lot, but have not been able to figure out what they mean - help? On that note, it might be helpful to have a quick glossary reference to the wiki (under FAQ?) - thoughts?
 
gaber said:
Quick question/request - I see FOC and SOC referenced a lot, but have not been able to figure out what they mean - help? On that note, it might be helpful to have a quick glossary reference to the wiki (under FAQ?) - thoughts?

FOC is field oriented control, its a new way of driving the motor which is more efficient
SOC forgot what it stands for but its the percentage readout of home much battery is remaining. You can access it by pressing the middle and bottom buttons together.
 
gaber said:
Quick question/request - I see FOC and SOC referenced a lot, but have not been able to figure out what they mean - help? On that note, it might be helpful to have a quick glossary reference to the wiki (under FAQ?) - thoughts?

I agree.
 
Hello,

As improvements I see the following in the priority order:
1. "2 sec lag" - This is already known. I think there is a problem in reading the magnets count (PAS issue). I needs more to connect the motor. If you have higher cadence the lag obviously gets smaller.
2. I have 48V 17Ah battery(LG). On stock software I had 100+ km autonomy on level 3 assistance. Now I have approx 60+ km in 1000w-1500w assistance. I tested in same conditions of riding. This is indeed a problem because I like to do 100+ km trips.
3. The bike is more powerful but less responsive.
I played a bit with the configuration of max cadence and it got more responsive than stock motor. I changed from 110 to 75. Now I have set 750w assistance and on hard push I hit 600-700w on a sprint. The motor now gets limited around 95 cadence, so I would not keep it above this anyway. However there is a catch because i get not longer good assistance at higher cadence and I do not pass 42km/h speed.
I think the problem is the way the human power is calculated
P = cad * torque
When you start pedaling even while riding you have almost 0 cadence and no matter the pedal torque, your assist is low.
Also when you ride at speed, the torque decreases and the cadence is bigger.
My suggestion to avoid the blind spots is this pseudo code:
Code:
int cadence = readCadence();
int torque = readTorque();
torque = (torque > config_min_torque) ? torque : config_min_torque;
cadence = (cadence > config_min_ cad) ? cadence : config_min_cad;

int human_power = torque * cadence;

Please let me know your opinion.

Thanks,
Max.
 
Maximum, 2 second lag.. we still haven’t figured our what’s causing this but if it is a cadence thing then..How can we solve this.. the only way is that If wheel speed >0 then don’t even check the cadence, just apply power when you have torque.

Power decreases range, indeed this is obvious, try riding under 25km/hr at under 200w and you can ride forever, less wind resistance.. the power override buttons middle and up allow you to lock power down so you can still get good assistance but get better battery life, I always set this to 350w max and I get really good range and still lots of assistance.

Less responsive.. not sure, I haven’t ridden the old firmware for ages but have no complaints about responsiveness.

Low cadence.. I have some really simple tweaks that give me 120+ cadence, it is really cool being able to wind out the motor rather than have to change gears all the time. The motor actually becomes very smooth above 90rpm and more powerful with my settings. Endless Cadence said he will add a high cadence option in the next release so you can try it yourself.

I did try using a squared law for cadence above 70 to give a power band but although the power was unbelievable I was hitting max duty cycle below 95 cadence. Anyway there are lots of tricks we can use to get more power at high rpm but try my settings first to see if that’s enough for you, or experiment for yourself and post back so I can try ;) I don’t really get what you are trying to achieve with that code above ?
 
jbalat said:
FOC is field oriented control, its a new way of driving the motor which is more efficient
SOC forgot what it stands for but its the percentage readout of home much battery is remaining. You can access it by pressing the middle and bottom buttons together.

StuRat said:
SOC = State Of Charge

Thank you both! Is the wiki open for editing? I would be happy to think about the best place for a glossary and add it. There have been a number of posts/information I've had to dig for that I thought would be nice to have logged in the wiki. Not having dev chops, I would be happy to contribute via documentation.
 
Ok, I see I was not fully understood. I'll try to rephrase.
1. "2 sec lag" = for me this happens like this: From full stop or while riding with pedals stopped I start to pedal. I get no assistance at all if I start to spin the pedals and apply serious force on pedals for 1-2 seconds. I think the problem is that it is considering that you are not spinning the pedals until it passes through more PAS sensing magnets.

2. Power - I understand your point. I am only comparing the 2 software in similar conditions and have 40% less range. Other users with similar batteries (48v 17ah) have 100km + autonomy with 0.14.2? Maybe there is some power optimization that we can apply to the algorithm if we review it.

3. By responsive I mean that you are able to obtain the assisted Watts faster. I set assistance to 750w and I am able to reach it. Please try on default settings to lower the max cadence from 110 to 60 and you will see what I mean.
Yes I am eager to try your high cadence option :).

What I meant with the code is that I propose to have some minimal values for min torque and min cadence in the power calculation. In this way you always get at least some minimal power at pedaling start (from stop or in movement).
For example:
1. I have 10 km/h resting on pedals and start pushing very slow(candence and torque).
P = min_cadence*min_torque
This power is bigger from what I am doing.
2. I have 10km/h and push hard but I have slow cadence
P= min_cadence * my_torque
3. I have 40km/h and I have cadence ok but torque is small.
P = my_ cadence * min_torque.

As a conclusion I am trying to increase the simulated human power in corner cases and leave the default behavior in rest which is good.
 
maximusdm said:
What I meant with the code is that I propose to have some minimal values for min torque and min cadence in the power calculation. In this way you always get at least some minimal power at pedaling start (from stop or in movement).
For example:
1. I have 10 km/h resting on pedals and start pushing very slow(candence and torque).
P = min_cadence*min_torque
This power is bigger from what I am doing.
2. I have 10km/h and push hard but I have slow cadence
P= min_cadence * my_torque
3. I have 40km/h and I have cadence ok but torque is small.
P = my_ cadence * min_torque.

As a conclusion I am trying to increase the simulated human power in corner cases and leave the default behavior in rest which is good.
Did you try startup power boost??
 
jbalat said:
Low cadence.. I have some really simple tweaks that give me 120+ cadence, it is really cool being able to wind out the motor rather than have to change gears all the time. The motor actually becomes very smooth above 90rpm and more powerful with my settings. Endless Cadence said he will add a high cadence option in the next release so you can try it yourself.

EndlessCadence said:
@jbalat
Can you create a Github issue with your custom FOC settings? Then I'm happy to create the experimental motor profile for you :D
Still waiting for an answer, I only received some hex files from you :p

When I have the settings confirmed it will be easy to create and release an experimental high cadence version (36V motor).

Have you tried your changes with a 14.x firmware version already?
 
gaber said:
jbalat said:
FOC is field oriented control, its a new way of driving the motor which is more efficient
SOC forgot what it stands for but its the percentage readout of home much battery is remaining. You can access it by pressing the middle and bottom buttons together.

StuRat said:
SOC = State Of Charge

Thank you both! Is the wiki open for editing? I would be happy to think about the best place for a glossary and add it. There have been a number of posts/information I've had to dig for that I thought would be nice to have logged in the wiki. Not having dev chops, I would be happy to contribute via documentation.
Yes, it is if you have a Github account (free). I've created a page for you! You can find it here:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-Glossary

Thanks!

Please let us know beforehand if you want to contribute to other documentation as well.
 
EndlessCadence said:
Still waiting for an answer, I only received some hex files from you :p

When I have the settings confirmed it will be easy to create and release an experimental high cadence version (36V motor).

Have you tried your changes with a 14.x firmware version already?
Ok created this issue
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/27

I have been using these settings on the original 14.x but not on the 2 latest versions with no throttle
 
maximusdm said:
What I meant with the code is that I propose to have some minimal values for min torque and min cadence in the power calculation. In this way you always get at least some minimal power at pedaling start (from stop or in movement).
For example:
1. I have 10 km/h resting on pedals and start pushing very slow(candence and torque).
P = min_cadence*min_torque
This power is bigger from what I am doing.
2. I have 10km/h and push hard but I have slow cadence
P= min_cadence * my_torque
3. I have 40km/h and I have cadence ok but torque is small.
P = my_ cadence * min_torque.

As a conclusion I am trying to increase the simulated human power in corner cases and leave the default behavior in rest which is good.

Hey what about something really simple like p=torque+cadence
So you get good torque control at low rpm and pas like power at high rpm ?
I might give it a try tonight if I can figure out how to program in this weird language, sorry I grew up with vb6 :)
 
jbalat said:
EndlessCadence said:
Still waiting for an answer, I only received some hex files from you :p

When I have the settings confirmed it will be easy to create and release an experimental high cadence version (36V motor).

Have you tried your changes with a 14.x firmware version already?
Ok created this issue
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/27

I have been using these settings on the original 14.x but not on the 2 latest versions with no throttle
Thanks jbalat!

I've implemented it today, did a test ride and I love how it feels!

:!:

I've released version 0.14.3 which includes this high cadence mode (experimental). You can find it here:
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.14.3

The wiki has been updated as well:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Usage-and-configuration-of-firmware-version-0.14.x#8-various
 
Hi everyone,

apologies for hijacking this thread. Been following this amazing project for a while now. Got 5 motors from Tongsheng a while back and have two bikes running 48v with the stock controller. Have a Ktlcd3 that i've rewired from the butchered vlcd. Reprogramming appears to be successful but I ended up with the display just showing all the figures solidly on.... as per Jbalat video I tried swapping the rx/tx cables but the result is the same...



Any ideas greatly appreciated.

Keep up the good work and I'll contribute what I can to the project.

I understand that the config can be transferred from one ktlcd3 to another by connecting them with the external cables. Is there any way this cable can be used for programming with the STlink? As Jbalat mentioned in the video, its a real PITA opening the unit everytime it is to be configured, not to mention it destroys the factory waterproof seal.

Allen
 
Hi, thanks for the reply

I did flash the controller also. No such thing as a silly question.

I'm doing it again now to make sure.

Cheers
 
Back
Top