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

Electric Motors and Controllers
famichiki   100 W

100 W
Posts: 275
Joined: Jul 12 2019 9:00am

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

Post by famichiki » Dec 25 2019 4:06am

I'm checking my torque sensor on the VLCD5 and sending ui16_pedal_torque_x10 to the display as an error code. The display is working fine, but is that the correct value to do the wiki calibration procedure? In the VLCD5 thread it was suggested I should use x10/4.

https://github.com/OpenSource-EBike-fir ... que-sensor

Below are the results from a quick test. :shock:

Code: Select all

0kg    14
10kg   35
20kg   90
If I am reading the torque value correctly, should I contact the supplier for a warranty claim or is it usually possible to correct these extreme readings with calibration? The motor is a few months old and never seemed to work correctly.

chri27.5   10 mW

10 mW
Posts: 34
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Dec 25 2019 8:12am

Finalmente sono riuscito a capire perché ci sono differenze di potenza tra motore, ho tre motori che uso, ma solamente uno eroga potenza da vendere, questa cosa non riuscivo proprio ad accettare, oggi grazie a Mbrusa che ha permesso di leggere il valore del sensore di torque posso affermare che i motori sono tutti uguali ma la differenza la fa la lettura del sensore che poi trasmette i dati alla centralina e di conseguenza eroga potenza.
La potenza che poi riscontriamo quando si utilizza la bici, e ci fa capire le differenze di spinta tra motori.
Vi posto quattro foto,
due dove si legge il valore a pedali orizzontali a vuoto,
e due in piedi sui pedali imprimendo la forza massima.
Ovviamente il sensore che legge 99.3 eroga molta potenza.
@ Casainho,
secondo la tua esperienza
è corretto che con 99.3 il motore raddoppia la potenza?
Grazie
Attachments
S91225-093058.jpg
S91225-093058.jpg (167.41 KiB) Viewed 2379 times
S91225-093112.jpg
S91225-093112.jpg (159.66 KiB) Viewed 2379 times
S91225-093130.jpg
S91225-093130.jpg (188.35 KiB) Viewed 2379 times
S91225-093207.jpg
S91225-093207.jpg (154.46 KiB) Viewed 2379 times

chri27.5   10 mW

10 mW
Posts: 34
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Dec 25 2019 8:18am

Finally I managed to understand why there are differences in power between the engine, I have three engines that I use, but only one delivers power to sell, this thing I just could not accept, today thanks to Mbrusa who allowed to read the sensor value of torque I can say that the motors are all the same but the difference is made by reading the sensor which then transmits the data to the control unit and consequently delivers power.
The power that we then find when using the bike, and makes us understand the differences in thrust between engines.
I'll post four photos,
two where the value is read with horizontal empty pedals,
and two standing on the pedals imparting maximum force.

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 25 2019 9:46am

chri27.5 wrote:
Dec 25 2019 8:18am
read the sensor value of torque I can say that the motors are all the same but the difference is made by reading the sensor which then transmits the data to the control unit and consequently delivers power.
I almost finished the new firmware version where user can read on the 850C display the torque sensor value and then calibrate it.

I am being calibrating my ebikes and using this calibration since a few months ago. I will write a wiki page with my experience, trying to make the calibration process simplified as it involves using a scale that most users may not have at home.

Also users will then be able to evaluate and understand/profile their torque sensors, which is something that no one is doing until now.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

Elinx   1 kW

1 kW
Posts: 348
Joined: Aug 09 2019 6:58am

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

Post by Elinx » Dec 25 2019 11:09am

famichiki wrote:
Dec 25 2019 4:06am
I'm checking my torque sensor on the VLCD5 ....
....
Below are the results from a quick test.

Code: Select all

0kg    14
10kg   35
20kg   90
....
It is not clear if this are readed display values or already calculated values.
The differences with the wiki values are large. (calculated or not)

mbrusa had made an update that doesn't need the calaculation anymore (see vlcd5 thread)

chri27.5   10 mW

10 mW
Posts: 34
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Dec 25 2019 11:23am

casainho wrote:
Dec 25 2019 9:46am
chri27.5 wrote:
Dec 25 2019 8:18am
read the sensor value of torque I can say that the motors are all the same but the difference is made by reading the sensor which then transmits the data to the control unit and consequently delivers power.
I almost finished the new firmware version where user can read on the 850C display the torque sensor value and then calibrate it.

I am being calibrating my ebikes and using this calibration since a few months ago. I will write a wiki page with my experience, trying to make the calibration process simplified as it involves using a scale that most users may not have at home.

Also users will then be able to evaluate and understand/profile their torque sensors, which is something that no one is doing until now.
Hi casainho,
the values ​​shown in the photo on the vlcd5 display measure empty with horizontal pedals 51.8
standing with the maximum force measured 99.3
this engine has an incredible power that I never understood why, I have two other engines but their power and almost 40% less, today I can say that the motivation is due to the sensor readings.
I wanted you to confirm this, the values ​​shown are measured at 10bit,
I read the wiki (how to calibrate the stress sensor) what is the movement that allows you to move the sensor?
The game between tree and compass?
Thank you

chri27.5   10 mW

10 mW
Posts: 34
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Dec 25 2019 11:38am

Elinx wrote:
Dec 25 2019 11:09am
famichiki wrote:
Dec 25 2019 4:06am
I'm checking my torque sensor on the VLCD5 ....
....
Below are the results from a quick test.

Code: Select all

0kg    14
10kg   35
20kg   90
....
It is not clear if this are readed display values or already calculated values.
The differences with the wiki values are large. (calculated or not)

mbrusa had made an update that doesn't need the calaculation anymore (see vlcd5 thread)
Hi Elinx,
Mbrusa with the latest modification released used the same conversion of casainho, just to compare them in the same way.

Elinx   1 kW

1 kW
Posts: 348
Joined: Aug 09 2019 6:58am

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

Post by Elinx » Dec 25 2019 12:14pm

chri27.5 wrote:
Dec 25 2019 11:38am
.....
Mbrusa with the latest modification released used the same conversion of casainho, just to compare them in the same way.
Yes, I know and have already linked to it. :)

famichiki   100 W

100 W
Posts: 275
Joined: Jul 12 2019 9:00am

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

Post by famichiki » Dec 25 2019 7:49pm

Elinx wrote:
Dec 25 2019 11:09am
It is not clear if this are readed display values or already calculated values.
The differences with the wiki values are large. (calculated or not)

mbrusa had made an update that doesn't need the calaculation anymore (see vlcd5 thread)
I'm posting here instead of the VLCD5 thread to hopefully get input from the original developers.

The original version of v0.19 appears to send the value in ui16_pedal_torque_x10 to the display, so if we wanted to compare with the wiki why wouldn't we send the same to the VLCD5? Is the wiki page based on v0.19? I easily did that as an error code.

https://github.com/OpenSource-EBike-fir ... que-sensor

This is the original code, but I'm just sending the same. I don't understand why additional calculations would be needed.

Code: Select all

// ui16_pedal_torque_x10
ui8_tx_buffer[22] = (uint8_t) (ui16_pedal_torque_x10 & 0xff);
ui8_tx_buffer[23] = (uint8_t) (ui16_pedal_torque_x10 >> 8);
Mbrusa appears to be displaying using the speedometer instead.

Under normal circumstances it displays ui16_adc_read_torque_sensor_10b() / 10 but then there is a commented 'test torque' section where it ui8_torque_sensor * 10 or ui8_torque_sensor_filtered * 10.

So which should be be using and how can we be sure these are comparable to what the original v0.19 displays?

Code: Select all

// alternative data
ui8_oem_wheel_diameter = ui8_rx_buffer[3]; // min valid value 21" oem display setting!
ui16_alternative_display_factor = OEM_WHEEL_FACTOR * ui8_oem_wheel_diameter; // for Km/h oem display setting!

ui16_alternative_display_array[0] =  (uint16_t) ui16_alternative_display_factor / configuration_variables.ui8_motor_temperature;
ui16_alternative_display_array[1] =  (uint16_t) ui16_alternative_display_factor / (ui16_battery_SOC_percentage_x10 / 10);
ui16_alternative_display_array[2] =  (uint16_t) ui16_alternative_display_factor / (ui16_battery_voltage_x10 / 10);
ui16_alternative_display_array[3] =  (uint16_t) ui16_alternative_display_factor / (ui16_adc_read_torque_sensor_10b() / 10);

// test torque
//ui16_alternative_display_array[0] =  (uint16_t) ui16_alternative_display_factor / configuration_variables.ui8_assist_level_factor_x10;
//ui16_alternative_display_array[1] =  (uint16_t) ui16_alternative_display_factor / ui8_torque_sensor * 10;
//ui16_alternative_display_array[0] =  (uint16_t) ui16_alternative_display_factor / ui8_torque_sensor_filtered * 10;
//ui16_alternative_display_array[0] =  (uint16_t) ui16_alternative_display_factor / ui8_pas_cadence_rpm;

// test power
//ui16_alternative_display_array[0] =  (uint16_t) ui16_alternative_display_factor / (ui16_battery_power_x10 / 100);
//ui16_alternative_display_array[1] =  (uint16_t) ui16_alternative_display_factor / (ui16_battery_SOC_percentage_x10 / 10);
//ui16_alternative_display_array[2] =  (uint16_t) ui16_alternative_display_factor / (ui16_battery_voltage_x10 / 10);
//ui16_alternative_display_array[2] =  (uint16_t) ui16_alternative_display_factor / (ui8_battery_current_x10 / 10);

ui8_tx_buffer[6] = (uint8_t) (ui16_alternative_display_array[ui8_alternative_display_index] & 0xFF);
ui8_tx_buffer[7] = (uint8_t) (ui16_alternative_display_array[ui8_alternative_display_index] >> 8);
Edit: Just installed Mbrusa's firmware and got these readings.

Code: Select all

0kg    18
10kg   23
20kg   27

thineight   100 W

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

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

Post by thineight » Dec 26 2019 10:05am

Hi casainho, what is the conversion factor between the v.19 torque reading shown on the wiki about sensor calibration (desirable rest value around 30-35) and the values shown in the charts shown few days ago (rest value about 280)?
It is just x10 or is there any 8/10 bit ratio?
Many thanks.
MTB KTM Ultra 29" - City bike DAYTONA 28"

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 27 2019 4:45am

Although I am careful, this time my motor controller did burn in a very ugly way while I was developing...

Image

This is way I want to keep my focus because I can´t do more so I do not answer to the many questions unless they bring value for my current development. I simple can´t do support and keep developing and improving.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 27 2019 1:10pm

Here is the new firmware version with torque sensor full calibration (for 850C display only and TSDZ2 motor controller -- sorry, we have currently an issue with SW102 firmware).

Download here both firmware: https://github.com/OpenSource-EBike-fir ... 50C_v0.6.0

On next days I will update the wiki page with instructions but for now here is a short resume:

Using calibration is option, it can be disabled and the system will works as previously.

To calibrate:
- go to Technical configuration menu to see torque sensor ADC value in real time
- use weights, your own known weight, weight from other members of your family or friends (mainly others with different value), put them on each pedal only (the pedal must be parallel to the ground)
- take note of each weight value and ADC value
- choose 8 points, first one with 0 weight value and last one with your weight
- use a calc sheet on as seen on the next image. Draw a graph and choose the other 6 points near the knee zone as seen on the graph and not on flat zones. You can extrapolate some points if you don´t have the weights, follow the curve on the graph but try to validate with real measurements:

Image

- go to Torque sensor configuration menu and input the data of each point: weight and ADC value

How to use:
- everyime you startup the system, the pedals need to be vertical pointing to ground. You can select on Configurations to be left or right pedal to point to ground at startup, based on your preferences. This is needed to the system can know in which pedal are you doing the force with your legs, since the weight is measured differently on each pedal due to the torque sensor.

Boot screen showing TSDZ2 and 850C display firmware versions:
Image

Torque sensor calibration table:
Image

Seeing and validating the pedal side as also the weight measured on the pedals:
Image
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

redwater   10 mW

10 mW
Posts: 30
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Dec 27 2019 3:02pm

Hi,
I updated motor firmware, and display.
On my display is not showing motor-firmware version, is "waiting for TSDZ2" and after that shows main screen, without 0.50.0.

I cant test ride now, because is snow, and below 0 degrees C. Odometer again reseting after poweroff.

Best regards.

michih.   100 mW

100 mW
Posts: 42
Joined: Nov 11 2018 8:33am

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

Post by michih. » Dec 27 2019 4:02pm

I tried to calibrate the torque sensor. 160 was the value. But I don't get the value under 60. Even when I have completely removed the sensor.


Mfg Michael

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 27 2019 4:49pm

redwater wrote:
Dec 27 2019 3:02pm
Hi,
I updated motor firmware, and display.
On my display is not showing motor-firmware version, is "waiting for TSDZ2" and after that shows main screen, without 0.50.0.

I cant test ride now, because is snow, and below 0 degrees C. Odometer again reseting after poweroff.

Best regards.
You need to keep on/off button pressed to see the motor firmware version. But there is no need to do this step.

The new feature on this version is the torque sensor full calibration and that you can do inside house. Only after it is calibrated and you did the validation, then you should a test ride.

Yes, there are the previous features missing because by mistake, I did develop this new feature on top of an old version of the firmware... Next I will recover all the previous features.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

michih.   100 mW

100 mW
Posts: 42
Joined: Nov 11 2018 8:33am

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

Post by michih. » Dec 27 2019 4:54pm

casainho wrote:
Dec 27 2019 1:10pm
Here is the new firmware version with torque sensor full calibration (for 850C display only and TSDZ2 motor controller -- sorry, we have currently an issue with SW102 firmware).

Download here both firmware: https://github.com/OpenSource-EBike-fir ... 50C_v0.6.0

On next days I will update the wiki page with instructions but for now here is a short resume:

Using calibration is option, it can be disabled and the system will works as previously.

To calibrate:
- go to Technical configuration menu to see torque sensor ADC value in real time
- use weights, your own known weight, weight from other members of your family or friends (mainly others with different value), put them on each pedal only (the pedal must be parallel to the ground)
- take note of each weight value and ADC value
- choose 8 points, first one with 0 weight value and last one with your weight
- use a calc sheet on as seen on the next image. Draw a graph and choose the other 6 points near the knee zone as seen on the graph and not on flat zones. You can extrapolate some points if you don´t have the weights, follow the curve on the graph but try to validate with real measurements:

Image

- go to Torque sensor configuration menu and input the data of each point: weight and ADC value

How to use:
- everyime you startup the system, the pedals need to be vertical pointing to ground. You can select on Configurations to be left or right pedal to point to ground at startup, based on your preferences. This is needed to the system can know in which pedal are you doing the force with your legs, since the weight is measured differently on each pedal due to the torque sensor.

Boot screen showing TSDZ2 and 850C display firmware versions:
Image

Torque sensor calibration table:
Image

Seeing and validating the pedal side as also the weight measured on the pedals:
Image

Is the 0.50 comparable to the 0.20?

Mfg Michael

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 27 2019 5:33pm

michih. wrote:
Dec 27 2019 4:54pm
Is the 0.50 comparable to the 0.20?
Very different each one.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

michih.   100 mW

100 mW
Posts: 42
Joined: Nov 11 2018 8:33am

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

Post by michih. » Dec 27 2019 5:52pm

casainho wrote:
Dec 27 2019 5:33pm
michih. wrote:
Dec 27 2019 4:54pm
Is the 0.50 comparable to the 0.20?
Very different each one.
Based on the 0.19?

Mfg Michael

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 27 2019 10:14pm

michih. wrote:
Dec 27 2019 5:52pm
casainho wrote:
Dec 27 2019 5:33pm
michih. wrote:
Dec 27 2019 4:54pm
Is the 0.50 comparable to the 0.20?
Very different each one.
Based on the 0.19?

Mfg Michael
Yes.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 28 2019 5:38am

I prepared a google file and I am sharing it so it is easier for everyone make the graphs. You will only need to edit own measured values on the tables:

Image

Here is the link to google file: https://docs.google.com/spreadsheets/d/ ... sp=sharing

I had to calibrate again my torque sensor because I found the values were wrong... seems that after I burned the motor controller and changed it, the torque sensor values were different!! Or maybe it was any other maintenance I did recently that for some reason changed the torque sensor values...

casainho wrote:
Dec 27 2019 1:10pm
Here is the new firmware version with torque sensor full calibration (for 850C display only and TSDZ2 motor controller -- sorry, we have currently an issue with SW102 firmware).

Download here both firmware: https://github.com/OpenSource-EBike-fir ... 50C_v0.6.0

On next days I will update the wiki page with instructions but for now here is a short resume:

Using calibration is option, it can be disabled and the system will works as previously.

To calibrate:
- go to Technical configuration menu to see torque sensor ADC value in real time
- use weights, your own known weight, weight from other members of your family or friends (mainly others with different value), put them on each pedal only (the pedal must be parallel to the ground)
- take note of each weight value and ADC value
- choose 8 points, first one with 0 weight value and last one with your weight
- use a calc sheet on as seen on the next image. Draw a graph and choose the other 6 points near the knee zone as seen on the graph and not on flat zones. You can extrapolate some points if you don´t have the weights, follow the curve on the graph but try to validate with real measurements:

Image

- go to Torque sensor configuration menu and input the data of each point: weight and ADC value

How to use:
- everyime you startup the system, the pedals need to be vertical pointing to ground. You can select on Configurations to be left or right pedal to point to ground at startup, based on your preferences. This is needed to the system can know in which pedal are you doing the force with your legs, since the weight is measured differently on each pedal due to the torque sensor.

Boot screen showing TSDZ2 and 850C display firmware versions:
Image

Torque sensor calibration table:
Image

Seeing and validating the pedal side as also the weight measured on the pedals:
Image
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 29 2019 2:38pm

I updated the firmware to my wife bicycle and then I calibrated the torque sensor. This is an old motor compared to the motor of my bicycle, where I already changed the torque sensor, the motor controller, etc for ones I bought recently.

So, as I already measured, the torque sensor of my wife TSDZ2 is way better than my torque sensor, here the comparison:

My TSDZ2 torque sensor:
Image

My wife TSDZ2 torque sensor:
Image

My notes:
1. One torque sensor is kind of linear only up to 15 kgs while other up to 45 kgs. The rate/sensitivity are the same for both on this "linear" zone but clearly mine lacks resolution because this zone is very short. I can do peaks of 40 or 60 kgs on my pedals without taking my but from the saddle.

2. One torque sensor seems to measure the similar values for both left and right pedals while the other does not (the left pedal has lower sensitivity).

3. The one that is worst on 1. is also worst on 2. So, clearly there are torque sensors that are worst than the others.

I will put all this information on the wiki, when I will write the page about torque sensor full calibration.

casainho wrote:
Dec 28 2019 5:38am
I prepared a google file and I am sharing it so it is easier for everyone make the graphs. You will only need to edit own measured values on the tables:

Image

Here is the link to google file: https://docs.google.com/spreadsheets/d/ ... sp=sharing

I had to calibrate again my torque sensor because I found the values were wrong... seems that after I burned the motor controller and changed it, the torque sensor values were different!! Or maybe it was any other maintenance I did recently that for some reason changed the torque sensor values...

casainho wrote:
Dec 27 2019 1:10pm
Here is the new firmware version with torque sensor full calibration (for 850C display only and TSDZ2 motor controller -- sorry, we have currently an issue with SW102 firmware).

Download here both firmware: https://github.com/OpenSource-EBike-fir ... 50C_v0.6.0

On next days I will update the wiki page with instructions but for now here is a short resume:

Using calibration is option, it can be disabled and the system will works as previously.

To calibrate:
- go to Technical configuration menu to see torque sensor ADC value in real time
- use weights, your own known weight, weight from other members of your family or friends (mainly others with different value), put them on each pedal only (the pedal must be parallel to the ground)
- take note of each weight value and ADC value
- choose 8 points, first one with 0 weight value and last one with your weight
- use a calc sheet on as seen on the next image. Draw a graph and choose the other 6 points near the knee zone as seen on the graph and not on flat zones. You can extrapolate some points if you don´t have the weights, follow the curve on the graph but try to validate with real measurements:

Image

- go to Torque sensor configuration menu and input the data of each point: weight and ADC value

How to use:
- everyime you startup the system, the pedals need to be vertical pointing to ground. You can select on Configurations to be left or right pedal to point to ground at startup, based on your preferences. This is needed to the system can know in which pedal are you doing the force with your legs, since the weight is measured differently on each pedal due to the torque sensor.

Boot screen showing TSDZ2 and 850C display firmware versions:
Image

Torque sensor calibration table:
Image

Seeing and validating the pedal side as also the weight measured on the pedals:
Image
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

thineight   100 W

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

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

Post by thineight » Dec 30 2019 5:32am

casainho wrote:
Dec 29 2019 2:38pm

My notes:
1. One torque sensor is kind of linear only up to 15 kgs while other up to 45 kgs. The rate/sensitivity are the same for both on this "linear" zone but clearly mine lacks resolution because this zone is very short. I can do peaks of 40 or 60 kgs on my pedals without taking my but from the saddle.
Casainho, do you think that the response of your torque sensor can improve similarly to your wife's one if you do the hardware calibration mentioned in the wiki?
I have in mind that the calibration will extend the good linear range of the sensors, correct?
MTB KTM Ultra 29" - City bike DAYTONA 28"

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 30 2019 5:38am

thineight wrote:
Dec 30 2019 5:32am
casainho wrote:
Dec 29 2019 2:38pm

My notes:
1. One torque sensor is kind of linear only up to 15 kgs while other up to 45 kgs. The rate/sensitivity are the same for both on this "linear" zone but clearly mine lacks resolution because this zone is very short. I can do peaks of 40 or 60 kgs on my pedals without taking my but from the saddle.
Casainho, do you think that the response of your torque sensor can improve similarly to your wife's one if you do the hardware calibration mentioned in the wiki?
I have in mind that the calibration will extend the good linear range of the sensors, correct?
Maybe.

Last time I did it, over the time the sensor drifted to this bad values.

I wish more users test this and share the graphs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

redwater   10 mW

10 mW
Posts: 30
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Dec 30 2019 1:36pm

I dont know is that issue, but when I try to pull bike backward then motor braking. In 0.19.0 there was no effect like now in 0.50.0.

casainho   10 GW

10 GW
Posts: 4696
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Dec 30 2019 2:11pm

redwater wrote:
Dec 30 2019 1:36pm
I dont know is that issue, but when I try to pull bike backward then motor braking. In 0.19.0 there was no effect like now in 0.50.0.
Yes, I noted that. Also once you pedal and motor runs, that does not happen anymore.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

Post Reply