New "TSDZ2 Torque Sensor Central Motor"

Where we live it is quite hilly so 3 Blue Gears replaced with Brass. One Clutch replaced under warranty, now runs intermittently. May be a faulty torque Sensor, controller or loose connection? Maybe these were all made on a Monday morning. I dunno. They haven't been reliable as far as I am concerned & I don't think it is reasonable to expect all 3 riders to be abusing them. I didn't think the conditions were so extreme to require overbuilt units so I am at a loss as to what is going on. I need someone in Washington, State that would be willing to have a look at a customers motor to see if they can diagnose the current quirky sensor problem. May be something simple or may just need to be replaced. I know someone on the board is from Puyallap, Wa. if you receive this message and willing to help, please message me. Thanks.
 
jbalat said:
Hey how hard is it to implement walk mode. I use it a lot going up stairs from the subway in the city.
Do you think the walk assist mode works well on original firmware and LCD? any improvements you would do?
 
Daytriker said:
One Clutch replaced under warranty, now runs intermittently. May be a faulty torque Sensor, controller or loose connection?
With our OpenSource firmware you can see in real time, on LCD3, the torque sensor ADC value to try spot any possible failure.
 
casainho, for those of us over 50 years of age, what exactly is Firmware? How is it different to Software? & for the benefit of my customer, what would they do with it? Thanks
 
Daytriker said:
casainho, for those of us over 50 years of age, what exactly is Firmware? How is it different to Software? & for the benefit of my customer, what would they do with it? Thanks
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares
 
pawepie said:
I recall pointing that out: I will try to add that when I get a chance (hopefully this evening!)! I was unable to flash the v5 firmware (improved original hex) as i want lights and human power functionality back until the open source firmware can support it. I could probably figure out to code/copy the human power bit, but probably not the lights bit.
1. Lights
I need your help to test the lights control implementation, please flash on TSDZ2 the main.hex file from this branch: https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/tree/lights

The firmware receives a flag about lights state from LCD3 and sets or resets the STM8S PE2 pin that should control the lights hardware circuit.

2. Pedal human power
I didn't know that pedal human power was so important!!
I can quickly implement pedal human power if you help with the points I asked you on the issue you did open: https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/issues/6#issuecomment-411926311

I need help to implement the pedal human power your are looking for:

can you please look at torque sensor values and test with a fish scale??
Like you pull the pedal with the fish scale at 1kg steps and share what are the torque sensor values. Pedal must be at horizontal and the fish scale pulling at 90 degrees in direction to the ground.
Can you please help on this?? We want to know a constant value to multiply for each ADC value, to get the applied force, like explained here: https://www.engineeringtoolbox.com/torque-wrench-luggage-scale-d_1909.html
 
Daytriker David in Nashville has been servicing the TSDZ2 for the manufacturer. In March he started his own operation selling and servicing these units and has a wiring kit especially for trikes. His web site is https://www.eco-ebike.com/ You may want to give David a call and explain the problems you've experienced. He may be of help. Maybe he will inspect the unit if it is shipped to him. I assume it is not under warranty. If still under warranty I think he's the guy to fix it.
 
pawepie said:
The efficiency is calculated from the input power to the controller divided by the output power:

Then take the derivative of that, set it equal to zero to find the point of maximum efficiency and display a real-time number corresponding to an indicator of efficiency percentage?
Ok I understand that should be electric power of the motor divided by the output mechanical power on the bicycle wheel.

We already calc the electric power of the motor. We also have motor speed in RPM.
We also have bicycle wheel speed in RPM but we don't have the torque of the bicycle wheel so I think we can't calc the efficiency??
 
Guys my first ride in to work today (17km) with the opensource firmware and ktlcd3. Just my honest first impression !!

1. Torque sensor is less sensitive. I had to press much harder than normal to get the motor to engage. My ADC on menu 3 for the torque sensor is 40. Not sure what this means or whether it needs to be reset.

2. As a result I pumped the power up to 800W but I could still only manage up to 300w on the flat with headwind. Although it was doing over 500w when climbing hills.

3. When I start pedalling from stop I found that nothing happened for a while then the power would cut in abruptly (up to 450W) before dropping back to around 170W during normal cycling. Not very smooth delivery

I got to work drenched in sweat :(

I hope this is something we can get right otherwise I will be going back to the normal firmware.
 
jbalat said:
Guys my first ride in to work today (17km) with the opensource firmware and ktlcd3. Just my honest first impression !!

1. Torque sensor is less sensitive. I had to press much harder than normal to get the motor to engage. My ADC on menu 3 for the torque sensor is 40. Not sure what this means or whether it needs to be reset.

2. As a result I pumped the power up to 800W but I could still only manage up to 300w on the flat with headwind. Although it was doing over 500w when climbing hills.

3. When I start pedalling from stop I found that nothing happened for a while then the power would cut in abruptly (up to 450W) before dropping back to around 170W during normal cycling. Not very smooth delivery
With brake sensor active (braking), please tell what are the min and max values on see for:
Code:
3: advanced technical data
  2: adc pedal torque sensor
  3: pedal torque sensor (max value should be 255 when you apply the max torque detected by the torque sensor)

Also keep a look to "5: pedal human power" while you pedal and at different assist levels.

For me, when I use assist level 5, I almost don't need to apply force to pedals.
 
Thanks Casainho! Excited for this code upgrade on the Open Source Firmware!

I got the following error trying to flash the hex:

stm8flash -c stlinkv2 -p stm8s105?4 -w main.hex
Determine FLASH area
Due to its file extension (or lack thereof), "main.hex" is considered as INTEL HEX format!
Address bff9 + 16 is out of range at line 1027

I compiled the source code from the branch and flashed the .bin file (success!)

The light value changes from 0.02v to 0.06v when the backlight is off and on, respectively. Not 6v yet though!

Anything else I can try to help?
 
Thanks very much for that info. The kits are still under warranty as they are all less than 12 months old but try & get a response from China. I did manage to get one part replaced under warranty but had to do the labour myself & the kit was shipped back to me from the States, time & labour to be repaired & then paid to ship back just isn't worth it when you can buy a reliable, problem free Bafang, Now Mr. Trump is adding the 25% China tax, it makes these units even less desirable. 2 customers have decided to repair & keep their units or sell them as refurbished. In Canada we are not yet subject to the China tax so that leaves one unit here to either repair & sell or part out.
 
Daytriker said:
Where we live it is quite hilly so 3 Blue Gears replaced with Brass. One Clutch replaced under warranty, now runs intermittently. May be a faulty torque Sensor, controller or loose connection? Maybe these were all made on a Monday morning. I dunno. They haven't been reliable as far as I am concerned & I don't think it is reasonable to expect all 3 riders to be abusing them. I didn't think the conditions were so extreme to require overbuilt units so I am at a loss as to what is going on. I need someone in Washington, State that would be willing to have a look at a customers motor to see if they can diagnose the current quirky sensor problem. May be something simple or may just need to be replaced. I know someone on the board is from Puyallap, Wa. if you receive this message and willing to help, please message me. Thanks.

If they have the VLCD-5 (which I'm assuming for a trike) then you can bring up the torque value in the hidden menu for diagnostic...

I've found out of the problems I get with this are simple little things... Usually an easy fix... I wouldn't rely on TS or any manufacturer for timely parts though, have to have them on hand...

Yeah the blue plastic gear can be an issue, but other than that, from all the units I've seen, only 1 clutch, 1 torque sensor have been broke.

Lots of little issues that a proper instructional manual might eliminate though! Ha...

Anyway, happy to help diagnose of you need, I've been honing the technique over time with these, usually can get to the problem remotely... But sounds like it's all handled now..
 
Waynemarlow said:
Guys, can we use electronics conventions when talking about connectors ....
...differentiate the type of connector by calling it a socket ( female ) or plug ( male, ).

Hmm ?? :? its not always clear which is the plug and which is the socket.. !!
depending on if you are referring to the Connector , or the Conductors ?
for example .. the bullet connectors below, it quite obvious which is plug ( right hand) and which is socket.
But with the DIN type sockets ( similar to out TSDZ@ connectors) in the other image it is not so obvious. On the right, there is a "connector socket" containing the male conductor pins, ...whilst the "connector plug" on the left has sockets with the female conductors. ! :shock:
So how would you call that Wayne ?

images
images
 
Casainho
I don't have brakes on my bike and have not used any extra wires for brake sensor
 
jbalat said:
Casainho
I don't have brakes on my bike and have not used any extra wires for brake sensor
So try with maybe current value setup to 0, so the motor will not run while you test or test even with motor running but be careful with yourself.
 
No I meant I don't have ebrakes that cut the motor

The adc torque is 40 to 60 and normal torque sensor is 0 to 70. Many times power is 0 because I need to press to hard to activate the motor

The highest is about 113 pressing very hard
 
jbalat said:
No I meant I don't have ebrakes that cut the motor

The adc torque is 40 to 60 and normal torque sensor is 0 to 70. Many times power is 0 because I need to press to hard to activate the motor

The highest is about 113 pressing very hard
Ok, so the adc value max is 60 which seems to be a low value...

If you go to file main.h you will see the setup values to consider the 0 and 100% (255) for the adc values:

Code:
#define ADC_TORQUE_SENSOR_MIN_VALUE 52
#define ADC_TORQUE_SENSOR_MAX_VALUE 84

Maybe you can try to change for your adc values but I was expecting no changes over the hardware...........
 
Ok I will try..
Adc minimum is 40 and I only get power above 53
Should the minimum adc be zero ?
Just got home I'm so hot. What a workout !!
 
jbalat said:
Ok I will try..
Adc minimum is 40 and I only get power above 53
Should the minimum adc be zero ?
Just got home I'm so hot. What a workout !!
Try to use like 42 as minimum or other way motor will start without pressing the torque sensor. Please be careful when testing and flash the firmware, try to keep the wheel on the air...
 
pawepie said:
Thanks Casainho! Excited for this code upgrade on the Open Source Firmware!

I got the following error trying to flash the hex:

stm8flash -c stlinkv2 -p stm8s105?4 -w main.hex
Determine FLASH area
Due to its file extension (or lack thereof), "main.hex" is considered as INTEL HEX format!
Address bff9 + 16 is out of range at line 1027

I compiled the source code from the branch and flashed the .bin file (success!)

The light value changes from 0.02v to 0.06v when the backlight is off and on, respectively. Not 6v yet though!

Anything else I can try to help?
Well, I changed now the STM8S pin definition, let's see if it will work (please read the voltage as you did before). Also, try to connect the lights!!

If it will not work, maybe it is not STM8S PE2 pin that control the lights...

ALSO, flash for stm8s105?6 and not for stm8s105?4!!!!!! Try again the previous code/commit here: https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/tree/82262dd7419575e142f95b47ad7c6821485ffa84

And try the new code: https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/tree/lights
 
casainho said:
Try to use like 42 as minimum or other way motor will start without pressing the torque sensor. Please be careful when testing and flash the firmware, try to keep the wheel on the air...

Casainho no this won’t work for everyone.
You need to read the (max for 1 second) torque adc upon startup of the controller and then add +2 to set as the minimum
I bet that’s what most torque sensing bikes do.

With the walk mode the only problem I have is when you go up stairs your finger bounces around and it sometimes turns off so maybe it should wait a little while before it is disabled after you let go.
 
jbalat said:
casainho said:
Try to use like 42 as minimum or other way motor will start without pressing the torque sensor. Please be careful when testing and flash the firmware, try to keep the wheel on the air...
Casainho no this won’t work for everyone.
You need to read the (max for 1 second) torque adc upon startup of the controller and then add +2 to set as the minimum
I bet that’s what most torque sensing bikes do.
I understand and thanks for the idea. In fact, I had that implemented before and then I just removed because it also has some disadvantage and I thought the hardware on TSDZ2 would be equal over all models.

So, the disadvantages:
1. as happens on original firmware, that initial zero calibration gives a problem if user is pressing the pedals while power on the system and the calibration happens (and this can happens frequently!!) and then user can't understand why it needs to make a very strong force on pedals to get assistance, just like the issue you have!!!!

2. with unknown max and min values of ADC, calculate pedals human power will not work unless every user does the calibration manually....

jbalat said:
With the walk mode the only problem I have is when you go up stairs your finger bounces around and it sometimes turns off so maybe it should wait a little while before it is disabled after you let go.
That delay/low pass filter seems a good idea. And did you though of the idea that the button could turn on or off the walk assist mode, what do you think?

Also, what do you think of the current "long press" timming? is that ok or to much?
 
I think most users are aware now not to stand on the pedals when you start up the bike
The human power should be more accurate if the minimum is set properly also you can add a fixed amount to set the maximum too. I don't think you have a choice but to go back now.

Walk mode yes long press down to turn on then press the button again to turn off should work well too
 
Hillhater said:
Hmm ?? :? its not always clear which is the plug and which is the socket.. !!
I hear you. I thought it would be the connector that mattered but it appears to be the pins that take preference. The ones with male pins sticking out appears to be the male connector.
 
Back
Top