New "TSDZ2 Torque Sensor Central Motor"

Hillhater said:
OK ..thanks for that.
So all the motors and controllers are the same mecnically ?
But the different LCD display unit etc , is required to alter the firmware ?

From what I have read all the controllers are about the same (there are differences for throttle versions). A couple members have successfully removed the voltage cutoffs. I too would like to use different batteries. I would like to go a little bigger if possible (15s battery) though. To alter the firmware you need to make a custom cable and use a computer program. It does not have an interface that shows settings that you can change, you have to actually edit the firmware file / code. The code is not clear and it has values that mean something that you must investigate to figure out what it is, it was not made to make it easy to hack it.

A couple people have stated 500w and 750w units are the same too, just different amp settings. The 36v unit has a different motor that operates at 36v. If you were to run your 48v unit at 36v it would (I believe) have a lower engine max cadence rpm (maybe 70 - 60 depnding on battery charge remaining), but a 36v unit with 36v motor will have 90 cadence rpm with a 36v battery.

The motor amp settings on the vlcd5 do not work either. Firmware is stored in the controller not in the lcd.
 
Diva said:
One trip of my commute is 16 km long, with a big downhill at the end. No particular problem to go (excepted that I lost the battery on a small jump, I forgot to lock it...). But on the way back, after 3 km uphill, the controller limited the current at ~8amps. It was a bit warm outside, near 30°C, and the motor was really hot.
Really strange as I think TSDZ2 motor controller can't read motor or even the motor controller/mosfets temperature and so It is not possible to limit the current when that temperature rise... I wish it could.... or maybe I am missing some information?? Do you guys already had this forced limit of current??
 
I just gave my experience :) Maybe I should try again to see if it does the same again, but you'll have to offer me a beer for my effort :p
 
casainho said:
What you mean by max torque/averaging?

Maybe in 3 weeks I hope to get a testin version...

Remember we said that the power can vary between zero watts and 600+w in one cycle which you can see on the lcd. You mentioned you can smooth out the power delivery by using the max power from the previous pedal cycle which will make the power delivery smoother :)
 
jbalat said:
casainho said:
What you mean by max torque/averaging?

Maybe in 3 weeks I hope to get a testin version...

Remember we said that the power can vary between zero watts and 600+w in one cycle which you can see on the lcd. You mentioned you can smooth out the power delivery by using the max power from the previous pedal cycle which will make the power delivery smoother :)
That kind of refinements take time and will be for later. First let's have something raw that people can try and give feedback, so we can decide paths. But even I can't promise anything -- I wish more developers join... a lot of users of TSDZ2 and no one capable to help on improving the firmware?? - motor control is almost done and then will be more ebike application, like reading sensors like thottle or torque sensor and craft input signal to the motor current / power controller.
 
John and Cecil said:
.....
A couple people have stated 500w and 750w units are the same too, just different amp settings. The 36v unit has a different motor that operates at 36v. If you were to run your 48v unit at 36v it would (I believe) have a lower engine max cadence rpm (maybe 70 - 60 depnding on battery charge remaining), but a 36v unit with 36v motor will have 90 cadence rpm with a 36v battery.

The motor amp settings on the vlcd5 do not work either. Firmware is stored in the controller not in the lcd.
Ahh ! ..OK, thanks J&C..
So there are different motors (winding config) for 36/48v .
I certainly expect the cadence (motor rpm) to be lower if running a 48v unit from a 36 v battery, bit its an irritation not to be able to change the voltage settings without consulting Bill Gates ! :lol:
What ever happened to dip switches ?
I guess that is what you call progress, or a "learning oportunity" for us oldies.
PS... If these things were really "smart" , then these changes would be voice activated !
...."Hey Siri...set me to 36 volts "....
 
casainho said:
Diva said:
One trip of my commute is 16 km long, with a big downhill at the end. No particular problem to go (excepted that I lost the battery on a small jump, I forgot to lock it...). But on the way back, after 3 km uphill, the controller limited the current at ~8amps. It was a bit warm outside, near 30°C, and the motor was really hot.
Really strange as I think TSDZ2 motor controller can't read motor or even the motor controller/mosfets temperature and so It is not possible to limit the current when that temperature rise... I wish it could.... or maybe I am missing some information?? Do you guys already had this forced limit of current??

There was another user that said the motor cut out completely when the ESC got too hot. Unfortunately I’m not willing to potentially destroy mine by testing this.
 
I do not think so, I did 25km of off-road with strong climbs, the outside of the engine was so hot that after a while you had to turn away your hand. I think it's very hot inside, unfortunately
 
andrea_104kg said:
I do not think so, I did 25km of off-road with strong climbs, the outside of the engine was so hot that after a while you had to turn away your hand. I think it's very hot inside, unfortunately
I wish there is a sensor on the hardware because I would like to protect it on the firmware, even because I plan to use on our OpenSource firmware increased current from the standard 18 amps to 22.5 amps (+25%).
 
I do not know for the controller, but the problem is the motor windings. The risk of burning them is very high and there is no temperature sensor on the engine.
 
andrea_104kg said:
I do not know for the controller, but the problem is the motor windings. The risk of burning them is very high and there is no temperature sensor on the engine.
Right.

And I was looking again at original firmware disassembly file to see which ADC channels are being using, since a temperature sensor would use and ADC. All ADCs that are used, none is for a temperature sensor.
 
Can someone tell what happens when the battery voltage drops over max limit? what happens on LCD, does it blinks or stays with battery symbols empty?

What happens when the voltage approaches to the limit, does the motor starts assists less or simple it stops until next power restart of the TSDZ2?

I got the motor code done. Motor seems to run very wheel using FOC, I am being testing on a bike training roller for now.

This are the protections that are implemented:
- limit battery undervoltage: when undervoltage is hit, motor quickly reduces the current usage and this way user will always have assistance until battery is fully discharged
- limit battery max current: the value should be as max 18 amps as in original firmware but I also plan to test 22.5 amps (+25%)
- limit motor max phase current (25 amps for now): this protects mosfets from burning at motor startup and running at low speed and high currents
- limit motor max ERPS to 520: this is a limit of FOC. Motor has 8 poles and so 520ERPS = 3900RPMs. This value can be increased a bit later, but need to be tested. I think later we can improve FOC to run motor at like 4600RPMs (higher +600 RPMS than original firmware)

1. to make motor run, we just call : ebike_app_battery_set_current_max(18); (18 is the current value but can be any other value)
2. to stop the motor: ebike_app_battery_set_current_max(0);

As soon we call ebike_app_battery_set_current_max with a value > 0, motor will accelerate and maintain constant that current value. The torque sensor value will define this value: when user makes a stronger force on the pedals, we will increase the current value!
 
- limit motor max ERPS to 520: this is a limit of FOC. Motor has 8 poles and so 520ERPS = 3900RPMs. This value can be increased a bit later, but need to be tested. I think later we can improve FOC to run motor at like 4600RPMs (higher +600 RPMS than original firmware)

Does that mean persons aiming for slightly higher cadence can set higher motor rpm, instead of combining a 36Vmotor with a 48V controller? Pedal RPM would increase from, say, 80RPM to 94RPM. How about efficiency of the motor after higher RPM is applied? (Of course, the 36V motor running at 48V is probably not very efficient, so the improved FOC may be better)
 
Uturn said:
- limit motor max ERPS to 520: this is a limit of FOC. Motor has 8 poles and so 520ERPS = 3900RPMs. This value can be increased a bit later, but need to be tested. I think later we can improve FOC to run motor at like 4600RPMs (higher +600 RPMS than original firmware)

Does that mean persons aiming for slightly higher cadence can set higher motor rpm, instead of combining a 36Vmotor with a 48V controller? Pedal RPM would increase from, say, 80RPM to 94RPM. How about efficiency of the motor after higher RPM is applied? (Of course, the 36V motor running at 48V is probably not very efficient, so the improved FOC may be better)
I don't know if original firmware limits the motor max speed but at least other FOC controllers does. This is a need because at higher speed, the amount of points to draw the shape of the phase voltage are much less. For instance, Kelly controllers has specific controller versions for higher speed motors where PWM frequency is much higher like 30Khz and 100Khz while on TSDZ2, KT motor controllers and many others, tje frequency is 16Khz. At each PWM period, we draw one point o the shape of phase voltage.

With increased PWM, the heat on the mosfets will increase. Also the hardware may have limits but I hope we can increase by like 20%.
 
casainho said:
Can someone tell what happens when the battery voltage drops over max limit? what happens on LCD, does it blinks or stays with battery symbols empty?

What happens when the voltage approaches to the limit, does the motor starts assists less or simple it stops until next power restart of the TSDZ2?

I got the motor code done. Motor seems to run very wheel using FOC, I am being testing on a bike training roller for now.

This are the protections that are implemented:
- limit battery undervoltage: when undervoltage is hit, motor quickly reduces the current usage and this way user will always have assistance until battery is fully discharged
- limit battery max current: the value should be as max 18 amps as in original firmware but I also plan to test 22.5 amps (+25%)
- limit motor max phase current (25 amps for now): this protects mosfets from burning at motor startup and running at low speed and high currents
- limit motor max ERPS to 520: this is a limit of FOC. Motor has 8 poles and so 520ERPS = 3900RPMs. This value can be increased a bit later, but need to be tested. I think later we can improve FOC to run motor at like 4600RPMs (higher +600 RPMS than original firmware)

1. to make motor run, we just call : ebike_app_battery_set_current_max(18); (18 is the current value but can be any other value)
2. to stop the motor: ebike_app_battery_set_current_max(0);

As soon we call ebike_app_battery_set_current_max with a value > 0, motor will accelerate and maintain constant that current value. The torque sensor value will define this value: when user makes a stronger force on the pedals, we will increase the current value!
When the battery drops bellow 32V lcd stays blinking. The maximum corrente is bellow 500mA.

I have bluetooth in my battery 36V and I see the current in my smartphone.

In my case I have in the battery the limit voltage at 29V. When I reach 32V I already have 25% of the battery capacity.
Can I put the underlimit voltage to 29V in the controler?
 
AZUR said:
casainho said:
Can someone tell what happens when the battery voltage drops over max limit? what happens on LCD, does it blinks or stays with battery symbols empty?
When the battery drops bellow 32V lcd stays blinking. The maximum corrente is bellow 500mA.

I have bluetooth in my battery 36V and I see the current in my smartphone.

In my case I have in the battery the limit voltage at 29V. When I reach 32V I already have 25% of the battery capacity.
Can I put the underlimit voltage to 29V in the controler?
Ok thanks for the info. And when that happens, does the motor run or it will simple not run?

You can disable the undervoltage limit (good if you prefer to use that limit on your BMS) or simple configure your own voltage. Here is the configuration part for the battery:

// *************************************************************************** //
// BATTERY
// Choose your battery pack voltage

// the cells number can be a custom value from 7S up to 14S, choose the value of your battery pack
#define BATTERY_LI_ION_CELLS_NUMBER 7 // 7S = 24V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 10 // 10S = 36V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 13 // 13S = 48V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 14 // 14S = 52V battery pack

// This is the current that motor will draw from the battery
// Higher value will give higher torque and the limit of the controller is 16 amps
#define ADC_BATTERY_CURRENT_MAX 224 // (14 ADC bits step per 1 amp) so, 224 for 16 amps

// Considering the follow voltage values for each li-ion battery cell
// State of charge | voltage
#define LI_ION_CELL_VOLTS_100 4.06 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_80 3.93 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_60 3.78 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_40 3.60 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_20 3.38 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_10 3.25 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_0 3.00 // this value is used to help finding the battery SOC and is the minimum value after which the firmware don't ask more current to battery, to run the motor
// *************************************************************************** //
 
casainho said:
AZUR said:
casainho said:
Can someone tell what happens when the battery voltage drops over max limit? what happens on LCD, does it blinks or stays with battery symbols empty?
When the battery drops bellow 32V lcd stays blinking. The maximum corrente is bellow 500mA.

I have bluetooth in my battery 36V and I see the current in my smartphone.

In my case I have in the battery the limit voltage at 29V. When I reach 32V I already have 25% of the battery capacity.
Can I put the underlimit voltage to 29V in the controler?
Ok thanks for the info. And when that happens, does the motor run or it will simple not run?

You can disable the undervoltage limit (good if you prefer to use that limit on your BMS) or simple configure your own voltage. Here is the configuration part for the battery:

// *************************************************************************** //
// BATTERY
// Choose your battery pack voltage

// the cells number can be a custom value from 7S up to 14S, choose the value of your battery pack
#define BATTERY_LI_ION_CELLS_NUMBER 7 // 7S = 24V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 10 // 10S = 36V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 13 // 13S = 48V battery pack
//#define BATTERY_LI_ION_CELLS_NUMBER 14 // 14S = 52V battery pack

// This is the current that motor will draw from the battery
// Higher value will give higher torque and the limit of the controller is 16 amps
#define ADC_BATTERY_CURRENT_MAX 224 // (14 ADC bits step per 1 amp) so, 224 for 16 amps

// Considering the follow voltage values for each li-ion battery cell
// State of charge | voltage
#define LI_ION_CELL_VOLTS_100 4.06 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_80 3.93 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_60 3.78 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_40 3.60 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_20 3.38 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_10 3.25 // this value is used to help finding the battery SOC
#define LI_ION_CELL_VOLTS_0 3.00 // this value is used to help finding the battery SOC and is the minimum value after which the firmware don't ask more current to battery, to run the motor
// *************************************************************************** //
The motor runs with current about 300, 400 mA. It does not stop runing.
But with this current it's very hard to ride the bike. Also in a flat terrain.

It's more dificult then a bike without motor.

I read some bicycles define the assistance levels by whats and not current.

Do you confirm this?

The limit current is 16 or 18A. I saw in my battery current above 17A.
 
AZUR said:
The motor runs with current about 300, 400 mA. It does not stop runing.
But with this current it's very hard to ride the bike. Also in a flat terrain.

It's more dificult then a bike without motor.
Good to know. That very low current should be for use with walk assist mode -- my electric car also does that, so I can move the car slowly from say any possible dangerous position.

18 amps max on my controller, 950W on my charged 48V battery.

I only know popular and cheap controllers like KT and this one, and the original firmware only controls current and not power.
 
I guess there is no setting in the firmware to choose 15s (56v) batteries? Has anyone tried to figure out the max battery voltage input with the 52v controller? If the 48v controller reaches to around 56v I am guessing the 52v controller should allow up to maybe 60v? If possible I would really like to move up to a 15s battery, perhaps it would need to be undercharged a little though. I would rather raise volts rather than amps, the larger batteries seem to do better when they get low on their charge.
 
John and Cecil said:
I guess there is no setting in the firmware to choose 15s (56v) batteries? Has anyone tried to figure out the max battery voltage input with the 52v controller? If the 48v controller reaches to around 56v I am guessing the 52v controller should allow up to maybe 60v? If possible I would really like to move up to a 15s battery, perhaps it would need to be undercharged a little though. I would rather raise volts rather than amps, the larger batteries seem to do better when they get low on their charge.
Voltage
• Controller can run the motor from 20V battery input up to at least 60V (this values were tested)
◇ 20V will work for a 7S battery (min voltage per cell = 2.86V)
◇ 60V will work for a 14S battery
◇ controller capacitors on input voltage line are rated at 63V
 
John and Cecil said:
I guess there is no setting in the firmware to choose 15s (56v) batteries?
O firmware you can choose any value but hardware must handle it.

ADC can measure up to 86V. The mosfets, mosfet drivers and XL7005 seems to handle at least 80V - maybe most of the hardware can handle 20S batteries / 72V.

https://opensourceebikefirmware.bitbucket.io/development_tsdz2/About_Tongsheng_TSDZ2_mid_drive_motors--Motor_controller.html
 
andrea_104kg said:
I do not think so, I did 25km of off-road with strong climbs, the outside of the engine was so hot that after a while you had to turn away your hand. I think it's very hot inside, unfortunately

Tried to climb hills with 171m and 5% incline elevation during 70km trip and apart from strained quadriceps the 36V motor didn't got hot, just slightly warm. Was able to climb with 15-20km/h by gradually changing gears from first to third. The only thing I noticed was smooth grinding noise coming from the motor which gradually got louder during the trip. No difference in noise while testing in the walk assist mode this time.
https://www.komoot.de/plan/tour/d09AzRm9v_63FU=FyoABNzrj9IgAA==/@54.3085120,-0.4010010,8z
 
Thank you casainho. 63v is close, that is almost exactly the max voltage of a 15s battery when fully charged. And if you run a 15s down to 3v a cell it is still 45v. Maybe the capacitors would be ok since the battery would only be up near 63 for a couple of minutes. 63v - 45v seems like a nice range and would still have a lot of power when the battery was near cutoff voltage.
 
I implemented the PAS cadence calculation code. Since is possible to detect the rotation direction, when we rotate pedals backwards, the cadence and torque are reset to zero.

jbalat said:
Remember we said that the power can vary between zero watts and 600+w in one cycle which you can see on the lcd. You mentioned you can smooth out the power delivery by using the max power from the previous pedal cycle which will make the power delivery smoother :)
Also implemented filtering of torque sensor signal since it fluctuates during 1 pedal rotation - this piece of code was done for KT motor controllers and is already tested. The idea is to use the original signal and after first full pedal rotation, use instead the max value measured on previous rotation.

Please note: it will also possible to use as PAS mode (original firmware don't has this feature), were at first pedals rotation the torque signal is used and after only the PAS signal is used (or a mix of both, were the max signal of both torque sensor OR PAS is used). I did that and it was much easier for my kid to ride his bicycle, as he don't has much force to keep press the torque sensor.

And the final calculation was the human power (cadence * filtered torque signal), and that one will be the input for the motor current/torque controller!

The human power signal is not smooth but after being applied to motor current, it will get smooth as that variations are to fast and small for the motor, the motor acts itself as a low pass filter.

I was rotating with my hand, hence the low torque value and cadence.
Red line: original/raw torque signal
Purple: filtered/processed torque signal
Green: cadence in RPM


Purple: filtered/processed torque signal
Green: cadence in RPM
Orange: human power (cadence * filtered torque signal)
 
Back
Top