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

casainho said:
At higher speeds you may be near the limit of motor speed. Please look on LCD3 for the motor erps speed and the PWM duty-cycle value. If PWM duty-cycle is like 250 at that situations, then you are on the limit of the motor and the energy that flows to the motor drops. You can get the max energy flow to the motor at near 0 speed of the motor and vice-versa.

ERPS speed goes around 480 at high load
PWM duty-cycle hits 254 quite easy

Is there a way to overcome this limitation? Can this be increased?
High cadence mode for 48v helps here?
 
NIPSEN said:
It seems that the internal resistance of one cell is 40mOhm, as you have 13 in series, this gives a total resistance of 520mOhm.
Is it not the sum of the inverse parallel cells so 40 mohm per cell would be for a 4p pack 10mohm and if 13s, total 130mohm?
 
James Broadhurst said:
orfait said:
NIPSEN said:
bs47G said:
Currently I am a step before installing kit on the bike. Could you advise me how many milliohms is recommended to set for my battery (13s5p Sanyo 17,5A NCR18650GA 840Wh)? I set default 130 but I guess this number have to be different.
It seems that the internal resistance of one cell is 40mOhm, as you have 13 in series, this gives a total resistance of 520mOhm.
5 in parallel, 13 in serie : 105 mOhms
Is it not the sum of the inverse parallel cells so 40 mohm per cell would be for a 4p pack 10mohm and if 13s, total 130mohm?

Oh sorry guys, it's 104 mOhms for 13S5P (8mOhm for 5P multiply by 13). :oops:
 
For the developers: last update of marcoq firmware after few bugs correction, useful to take a look at the backwards resistance code (don't know if this changed from yesterday's rev. 0.3)

http://www.jobike.it/Public/data/marcoq/2019318215058_TSDZ2_Controller_vM0.18.C_and_TSDZ2_Configurator_Beta_0.3.2.zip

No fried controllers reported so far in the other forum...
 
maximusdm said:
I managed to do some good testing of 0.18.2 in the past 3 weeks.
A strange thing that I noticed is that in some cases even if the human power increases, the motor power in W drops. This happens at higher speeds. Also if I use assist of 0.6 and assist of 4 it is almost same difficulty to pass 42-43 km/h.
Scenario:
- Setup: run 0.6 assistance, speed 35km/h
- Start to press harder maintaining the cadence
- Screen shows a drop from 400w to 300w

Any ideas? It looks like the easier you press the harder you are assisted.

Maximus, I noticed that too as soon as you back off the watts go up and definitely not at max cadence but perhaps close to the max duty cycle ? It doesnt make sense though by backing off the torque a little you get an increase in power.. There must be something wrong there somewhere ?? I have definitely noticed I can get more power in this range with the high cadence mods for sure...
 
casainho said:
Rydon, can you help on this questions??

Yes, as soon as possible. Unfortunately, I am slammed this week and also need to get the coaster brake bike back in the shop. Next week for sure.
 
I am just now starting to dig deep on this, as I have been laid up mostly, and not able to test myself.... so now that I have been riding...no matter what I try to do I notice that when I am pedaling HARD, at FAST CADENCE/RPM - the motor starts to 'shudder' a little bit... I tried variations of riding/pedaling style,and could not replicate the problem by ONLY pedaling HARD, or ONLY pedaling FAST, but when I pedal HARD AND FAST, once I hit around 90ish RPM at the cranks - Motor SHUDDER/unbalanced rotation or something...

Am I just topping out the RPM and need to look at the settings you guys are referring to? I like the smooth roll-on variations of power compared to the micro steps from the stock firmware, but when hitting max/min power, and like I described above...things can get a little jolty and rough... still trying various setups... but I have rode a bit with around 10 different configurations, and so far at one point or another, I am hitting rough patches where the motor power is not smooth...

Any recommendations? (as I scramble to go back and re-read this)...
 
Eyebyecickle That's what happens when you hit the max cadence. When you use the high cadence mods it's actually really smooth and powerful at 90+ rpm but as mentioned above the power can start dropping off a little which I can't explain.
 
I believe it is a characteristic of the simple torsimeter of the tsdz2. needs to feel the strength of the wheel to give power. when the wheel advances with little resistance the torsion force decreases and obviously the watts supplied by the motor decrease. On more complex bikes the software can remedy the inconvenience but I don't think it's on our side.
 
Hi guys,
About the shudder issue, I think you reach the maximum current limit, so controller start to decrease duty-cycle (every 12 cycle of 64µs if necessary), and then increase (because signal like torque pedal may be noisy, or under battery current limit) and you feel it, like micro torque decrease/increase.

If you try to reduce "max current battery" in settings, you could have the issue sooner.

I suggest you to reduce the duty-cyle ramp up (not the ramp down one because of safety).

File config.h
Code:
#define PWM_DUTY_CYCLE_RAMP_UP_INVERSE_STEP 20

The higher the value, the slow it will be. So maybe try 40, 80 or 120 (it is the number of cycles before increasing the duty cycle).
 
I am trying to make a summary of what are my options:
1. Use high cadence 48v to see how it works
2. Decrease the inverse ramp. I am pretty sure I am not hitting max current with 300w. (300w/48v is much smaller than 18a.)
3. Increase the PWM_Max_Duty_Cycle. This is not trivial because the calculations for this use uint8 which has max value 255.
@casainho Do you think it is possible to to something about this?

From what I understood PWM is max power the motor can provide/cycle. ERPS * torque/cycle.
 
maximusdm said:
casainho said:
At higher speeds you may be near the limit of motor speed. Please look on LCD3 for the motor erps speed and the PWM duty-cycle value. If PWM duty-cycle is like 250 at that situations, then you are on the limit of the motor and the energy that flows to the motor drops. You can get the max energy flow to the motor at near 0 speed of the motor and vice-versa.

ERPS speed goes around 480 at high load
PWM duty-cycle hits 254 quite easy

Is there a way to overcome this limitation? Can this be increased?
High cadence mode for 48v helps here?

Strange that with a PWM at 254 you only have 300W motor.
 
NIPSEN said:
Strange that with a PWM at 254 you only have 300W motor.
That is not strang. Please tell also what is the erps value when you measured the other values.
 
casainho said:
NIPSEN said:
Strange that with a PWM at 254 you only have 300W motor.
That is not strang. Please tell also what is the erps value when you measured the other values.
Just saw the previous message, where the erps value is 480.

Our motors has 16 magnets, so 8 pairs of them. Motor max rpm is 4000 at 48V. So, (4000/60)* 8 = 533 erps.

48v/533 = 0.09V per erps of motor generated BEMF that is contrary to power supply 48V.

At 480 erps, it is a BEMF of 43.2V. This means the only voltage on motor coils are 48 - 43.2 = 4.8V.

If the power was 300W, the current can be about 300/48 = 6 amps.

So, motor is absorbing only 6 amps instead of the 18 amps you would like to, but that is a limitation of the BLDC motors, they say they has max torque at startup and it reduces to 0 at motor max speed.
 
Thank you for all this valuable informations, if I understand correctly, it respects this graph quite well:

14b8ef14bf9e24fbd686fb021b45efea7da90401.jpg
 
casainho said:
So, motor is absorbing only 6 amps instead of the 18 amps you would like to, but that is a limitation of the BLDC motors, they say they has max torque at startup and it reduces to 0 at motor max speed.

Ok so by increasing erps we can get more power near the high end.

So we have done some very basic tweaking to get higher RPM using Field weakening but to get further benefits we need variable phase advance angle and this needs to be calculated under different load conditions.

ie. a special version of the firmware where we can advance throttle and phase advance angle manually have a readout of all the stats including erps and power then use a bicycle trainer to increase load. We can then make a better judgment of how to increase field weakening in an efficient way to get more power and cadence.
 
Will this firmware work with TSDZ2 coaster brake version ?
and if will this need any specific configuration ?
 
klaus2650 said:
Will this firmware work with TSDZ2 coaster brake version ?
and if will this need any specific configuration ?

Not yet. However, this is being addressed. There is a lot of resistance pedaling backward in the current version that hopefully will be fixed soon. Watch this forum for updates.
 
casainho said:
So, motor is absorbing only 6 amps instead of the 18 amps you would like to, but that is a limitation of the BLDC motors, they say they has max torque at startup and it reduces to 0 at motor max speed.
Thanks for the good technical explanation!

jbalat said:
So we have done some very basic tweaking to get higher RPM using Field weakening but to get further benefits we need variable phase advance angle and this needs to be calculated under different load conditions.
I know there is an enhancement request in github for this. If the devs have some idea how to enhance this, I will help with beta testing.
 
maximusdm said:
casainho said:
So, motor is absorbing only 6 amps instead of the 18 amps you would like to, but that is a limitation of the BLDC motors, they say they has max torque at startup and it reduces to 0 at motor max speed.
Thanks for the good technical explanation!

jbalat said:
So we have done some very basic tweaking to get higher RPM using Field weakening but to get further benefits we need variable phase advance angle and this needs to be calculated under different load conditions.
I know there is an enhancement request in github for this. If the devs have some idea how to enhance this, I will help with beta testing.

Unfortunately, I think our engine is limited by the BEMF and this limit is unbreakable.
If you only reach 480erps instead of 522, is due to the fact that the engine was not running idle (load), the rpm stabilizes at the balance of forces.
 
maximusdm said:
I know there is an enhancement request in github for this. If the devs have some idea how to enhance this, I will help with beta testing.

you could increase the advance angle at high speeds for field weakening by using an exponential function. But I don't know, if the calculation can be done in real time. Perhaps we could use a lookup table.



regards
stancecoke
 
stancecoke said:
maximusdm said:
I know there is an enhancement request in github for this. If the devs have some idea how to enhance this, I will help with beta testing.

you could increase the advance angle at high speeds for field weakening by using an exponential function. But I don't know, if the calculation can be done in real time. Perhaps we could use a lookup table.

advance angle with power law.PNG

regards
stancecoke
I really like to see users/developers participating like this!! <3
 
850C LCD

I am happy, although I did burn a 850C LCD and an USB port of my computer. I was blocked on this firmware because I was missing communication packages and the display data was hanging/blocking but now it is now more. I had to rewrite a lot of things to get it working. There is still more parts to optimize but the LCD do not blocks anymore which means it is usable at least for me.
 
casainho said:
850C LCD

I am happy, although I did burn a 850C LCD and an USB port of my computer. I was blocked on this firmware because I was missing communication packages and the display data was hanging/blocking but now it is now more. I had to rewrite a lot of things to get it working. There is still more parts to optimize but the LCD do not blocks anymore which means it is usable at least for me.

It's a great step forward, good work! :thumb:
 
casainho said:
stancecoke said:
maximusdm said:
I know there is an enhancement request in github for this. If the devs have some idea how to enhance this, I will help with beta testing.

you could increase the advance angle at high speeds for field weakening by using an exponential function. But I don't know, if the calculation can be done in real time. Perhaps we could use a lookup table.

advance angle with power law.PNG

regards
stancecoke
I really like to see users/developers participating like this!! <3

Lookup table will be the way to go.. As I said we would need to obtain the data with real life testing under load using a bike trainer... Does anyone have a good one?? Also is anyone willing to write some special code that allows you to manually set the throttle and phase angle in real time ? I guess the aim would be to read off load applied (from bike trainer), power delivered and possibly speed ? Then keep tweaking the advance angle until we get an optimal speed for each throttle/load case
 
Back
Top