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

Electric Motors and Controllers
casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 08 2020 6:42am

Elinx wrote:
Jan 08 2020 6:30am
casainho wrote:
Jan 08 2020 5:47am
.....
I am being testing to control the motor current instead of the battery current. I like the result. ...
In that case it is maybe interesting for you that ackmaniac this conversion to motorcurrent already did too for the default display version based on v.019.
I saw it but that is done in a simple way, instead of using as input human pedal power, it is using only the pedal torque.

I would like to it in a way it is easier to user to understand. And I don´t agree with using as input the pedal torque only, I think it should be the pedal power.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
stancecoke   100 kW

100 kW
Posts: 1165
Joined: Aug 02 2017 2:56pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by stancecoke » Jan 08 2020 7:22am

casainho wrote:
Jan 08 2020 5:47am
So master is now updated.
Thank you! :thumb:
casainho wrote:
Jan 08 2020 5:47am
I have a question to you, since you are experienced with the torque sensors, etc.
...
I don't know, if I understand your questions in the right way.

First you have to be careful with the physical quantities.

energy = work = force * distance. The physical unit is (N*m) = (J). As you see from the units, a torque is already an energy.

power = energy / timeinterval. The physical unit is (N*m/s) = (J/s) = (W).

For our electric motor:

electrical power = U_batt*I_batt = mechanical power + losses (heat :shock: )

mechanical power = 2*PI*torque_motor*erps/(no. of polepairs)

torque_motor = km * I_motor (1), where km is a motor constant, see e.g. here.

We define for the motor power:

P_mech_motor = Assistlevel*P_human

2*PI*torque_motor*erps/(no. of polepairs) = Assistlevel*2*Pi*torque_human*cadence

with (1) you get:

2*PI*km * I_motor*erps/(no. of polepairs) = Assistlevel*2*Pi*torque_human*cadence

I think this is the relation you were looking for?!

Some more math:

For the TSDZ2 the gear ratio cadence/erps is always constant. Other way round, you can write

cadence = constant_ratio*erps. (2)

with (2) follows:
2*PI*I_motor*km*erps/(no. of polepairs) = Assistlevel*2*PI*torque_human*constant_ratio*erps

If you bundle all constants in one:
I_motor*erps = constant * Assistlevel*torque_human*erps

as you see, erps can be cancelled out of the equation:

I_motor = constant * Assistlevel * torque_human

I hope this helps ?! :D

regards
stancecoke

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Jan 08 2020 9:32am

Rydon wrote:
Jan 02 2020 10:29pm
izeman wrote:
Jan 02 2020 9:32am
What setup do you guys recommend for UPDATING both, the display and the controller?
Following the WIKI, it's recommended to cut off the connector of the 850C, and hardwire it to an extension wire that fits to the TSDZ2's original plug hardness? So you need an extension wire and cut that to the correct length, so one end is soldered to the display and the other end (female connector) fit's to the TSDZ2's male connector.
And then you need a second extension wire cut in two pieces. One piece to update the display (eg via bootloader mode) and the other one to update the controller (via STLink).
So far correct? Or is there a better way?
Best to use the green higo female connector on the 850C as is. It is the same connector on the SW102. If you have an 8 pin male higo connector on your controller, you can get a harness that adapts the TSDZ2 8 pin male to either of those displays from Electrify Bike Co. It essentially adapts the TSDZ2 to Bafang style displays, throttles and brake cutoffs.
Thanks, but unfortunately I have the no-brakes 6-pin version of the motor. So I have to find a solution for that. There are two possibilities as i see it:

I got the XH18 display with my motor, which of course has the correct 6 pin connector for the motor controller. I can connect this to the motor, cut off the display and cut off the connector of the 850C and solder them together. But then I can update it anymore with the recommended TSDZ2 extension wire, as I did right know.

So I need to use the 850C connector as is, connect the extension wire to it, and wire that to the controller wire with the cut off XH18 wire?!?

Any other and better ideas?

dameri   100 W

100 W
Posts: 146
Joined: Sep 20 2018 10:57am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by dameri » Jan 08 2020 9:59am

I installed 850C_v0.6.2 and v0.51.0. Torque sensor calibration didn't work for me. My ADC values are very low compared casainhos values. My 0 kg ADC value is 146 and casainho has 292, my 78 kg (my weight) ADC value is 281, casainho has on 54 kg 378 ADC. Perhaps it requires a torque sensor adusting. However, even without the torque sensor calibration, the program works just fine. I'm going to do the torque sensor adjusting on next engine maintenance and try again torque sensor calibration after that.

I think (not very sure) battery goes down faster. I have driven only two rides and weather was very windy.

Many thanks for developing :bigthumb:

User avatar
Bourtin   1 µW

1 µW
Posts: 3
Joined: Nov 19 2019 12:07pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by Bourtin » Jan 08 2020 4:18pm

I installed versions 850C_v0.6.2 and v0.51.0, I did a little test without calibrating the torque sensor, very nice the little power trickle with assistance level 1, very flexible at all levels.
I then calibrated the torque sensor which looks fairly linear. The values are very different from those of Casainho, 140 to 0 kg, 265 to 65 kg.
I measured the weights with a scale inserted between my foot and the pedal, variations of + - 10 or 15 ADC on several measures, the 0 kg varies from 137 to 140.
on the other hand
The walking assistant does not cut, forced to use the cut by the brake.
If I back up with the bike, the engine starts, the pedals turn when I back up and also with the walking aid, this can be the cause?
The same impression as Dameri that the battery discharges quickly, not yet sure at only 10 kms of test.
Capture du 2020-01-08 21-37-20.png
Capture du 2020-01-08 21-37-20.png (21.86 KiB) Viewed 1499 times
Thanks for all this works.
Surly Ogre Tsdz2 48v.

thineight   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by thineight » Jan 08 2020 5:32pm

casainho wrote:
Jan 07 2020 6:32pm
I am still learning and testing. I hope others can share results so we all can learn.
Ok, couple of users here reported their values after the calibration.. and after some km.
http://www.jobike.it/forum/topic.asp?TO ... ichpage=58
It's noticeable a trend for the minimum to increase over time.
One user is trying also with loctite to hold the sensor after the calibration.
Making the calibration stable looks an important goal to achieve now.
MTB KTM Ultra 29" - City bike DAYTONA 28"

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 08 2020 5:39pm

thineight wrote:
Jan 08 2020 5:32pm
casainho wrote:
Jan 07 2020 6:32pm
I am still learning and testing. I hope others can share results so we all can learn.
Ok, couple of users here reported their values after the calibration.. and after some km.
http://www.jobike.it/forum/topic.asp?TO ... ichpage=58
It's noticeable a trend for the minimum to increase over time.
One user is trying also with loctite to hold the sensor after the calibration.
Making the calibration stable looks an important goal to achieve now.
I mean share the calibration graph and the experience with the full calibration linearization.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

thineight   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by thineight » Jan 08 2020 6:01pm

casainho wrote:
Jan 08 2020 5:39pm
I mean share the calibration graph and the experience with the full calibration linearization.
Ah, no one there is using the 850c display yet, so no experience with the linearization.
Some are using the original displays (marcoq) and some others the lcd3.
But the problem of the drift is physical and affects all the releases.. after the hardware calibration the minimum increases over time.
V.19 and v.20 users will lose some range of the "good linear part" of the sensor curve , whereas your linearization will lose accuracy over time because the chart populated with initial ADC_value Vs force will change.
Maybe the rest values become stationary after a while, therefore the calibration can be repeated at a later stage and maintain stability... That's why my original question to you.
MTB KTM Ultra 29" - City bike DAYTONA 28"

mctubster   100 W

100 W
Posts: 227
Joined: Feb 26 2018 6:21am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by mctubster » Jan 08 2020 7:39pm

xlxc34 wrote:
Jan 07 2020 3:53am
Hi,

I have a very tempermental TSDZ2 which sometimes seems to turn on and run no problem, and other times I get no response unless I REALLY crank down on the pedals, in which case I might get a few 10s of Watts. I thought this might be a dodgy torque sensor, so I bought a new one and it seems to work just fine (checking the raw values on the 9 -> 2 menu it responds really well to changes in torque and has a baseline value of 35). However, I still have this problem where one in maybe every 2 or 3 times I use the bike I get no response, and turning it on and off again doesn't help. Any help with this will be VERY, VERY much appreciated as I am growing tired of starting off my 13 mile ride home with a bike that's 10kg heavier and has a load more resistance on a random basis!

Thanks!
I suspect you are sometimes resting your feet on the pedals while turning on the motor. This stops the torque sensor from calibrating correctly and will give less assistance.

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 08 2020 9:24pm

thineight wrote:
Jan 08 2020 6:01pm
Maybe the rest values become stationary after a while, therefore the calibration can be repeated at a later stage and maintain stability... That's why my original question to you.
I see. My values are stable, at least since I did developed this code.

Well, at least all values should change a little over time so the previous ones can be quick adjusted on the display.
Last edited by casainho on Jan 08 2020 9:31pm, edited 1 time in total.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 08 2020 9:27pm

mctubster wrote:
Jan 08 2020 7:39pm
I suspect you are sometimes resting your feet on the pedals while turning on the motor. This stops the torque sensor from calibrating correctly and will give less assistance.
Latest firmware warns user to keep pedals free until the calibration finish, that is one of the reasons to use the latest version.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

famichiki   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by famichiki » Jan 08 2020 10:39pm

For those running Power Assist Mode on v0.20, do you feel it favours cadence over torque input? I don't get much assist when more pedal effort is required, such as climbing a hill with dropping cadence or maintaining a high speed. On flat ground up to a certain effort it seems fine.

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 09 2020 4:12am

dameri wrote:
Jan 08 2020 9:59am
I installed 850C_v0.6.2 and v0.51.0. Torque sensor calibration didn't work for me. My ADC values are very low compared casainhos values. My 0 kg ADC value is 146 and casainho has 292, my 78 kg (my weight) ADC value is 281, casainho has on 54 kg 378 ADC. Perhaps it requires a torque sensor adusting. However, even without the torque sensor calibration, the program works just fine. I'm going to do the torque sensor adjusting on next engine maintenance and try again torque sensor calibration after that.

I think (not very sure) battery goes down faster. I have driven only two rides and weather was very windy.
Please follow the calibration wiki page, there is not problem at all with different values of torque sensor compared to mine -- the issue is that!! all of them output different values.

You just need to have different weights like 5, 10, 15, 20 kgs + using your own weight and then, put the values on the display.

About the battery, I didn´t changed anything about it and I was carefully measuring the timings after this change.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

maximusdm   10 W

10 W
Posts: 90
Joined: Sep 08 2018 12:51pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by maximusdm » Jan 09 2020 4:31am

Hello,

I need some ideas from people who installed/worked on the torque sensor. SO far I got the service manual from casainho and I have some clues.
I will try to create a tutorial after I have a way of putting it back.

How did you removed the torque sensor from the frame? I mean the actual torque sensor that is pressed inside the frame. What are the options other that bashing it with a big hammer?

Also how did you press it in while not loosing the small springs?

Thanks!

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 09 2020 4:38am

stancecoke wrote:
Jan 08 2020 7:22am
I don't know, if I understand your questions in the right way.

First you have to be careful with the physical quantities.

energy = work = force * distance. The physical unit is (N*m) = (J). As you see from the units, a torque is already an energy.

power = energy / timeinterval. The physical unit is (N*m/s) = (J/s) = (W).

For our electric motor:

electrical power = U_batt*I_batt = mechanical power + losses (heat :shock: )

mechanical power = 2*PI*torque_motor*erps/(no. of polepairs)

torque_motor = km * I_motor (1), where km is a motor constant, see e.g. here.

We define for the motor power:

P_mech_motor = Assistlevel*P_human

2*PI*torque_motor*erps/(no. of polepairs) = Assistlevel*2*Pi*torque_human*cadence

with (1) you get:

2*PI*km * I_motor*erps/(no. of polepairs) = Assistlevel*2*Pi*torque_human*cadence

I think this is the relation you were looking for?!

Some more math:

For the TSDZ2 the gear ratio cadence/erps is always constant. Other way round, you can write

cadence = constant_ratio*erps. (2)

with (2) follows:
2*PI*I_motor*km*erps/(no. of polepairs) = Assistlevel*2*PI*torque_human*constant_ratio*erps

If you bundle all constants in one:
I_motor*erps = constant * Assistlevel*torque_human*erps

as you see, erps can be cancelled out of the equation:

I_motor = constant * Assistlevel * torque_human

I hope this helps ?! :D

regards
stancecoke
Seems you did understand :-)

On current code, we are controlling this: electrical power = U_batt*I_batt.

The idea is that P_human = electrical power, so, we control the I_batt. Important to say that I_motor is also controlled to stay always at 30 amps.

When in the end you have: I_motor = constant * Assistlevel * torque_human

I am looking to control in other way, I do not want to control I_motor because as you explain very well with the math, when the cadence/erps increase, the I_motor decreases as also our torque_human.

What I am looking to do is to capture the our human Power (and not energy as I did say before, thanks for clarification) because it increases when the cadence increases, unlike our human torque.

On the motor side, the issue is the same, I want to be able to maintain or increase the motor torque when the cadence increases but as you explained, the motor torque/I_motor decreases with the cadence/erps.

Maybe we need to control 2 variables at the same time??

I_battery = I_motor * Duty_cycle
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
stancecoke   100 kW

100 kW
Posts: 1165
Joined: Aug 02 2017 2:56pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by stancecoke » Jan 09 2020 5:20am

casainho wrote:
Jan 09 2020 4:38am
I want to be able to maintain or increase the motor torque when the cadence increases
OK, with this the "Assistlevel" in the formula P_mech_motor = Assistlevel*P_human will no longer be a constant. The ratio P_motor/P_human will be a function of the cadence.

Of course you can program it this way.

I_motor = constant * Assistlevel * torque_human * (1+ cadence/constant_divider)

Example: if you set the Assistlevel (chosen assist level in the display) to 100% of human power and the constant_devider to 90, you will get 200% assistance at the cadence of 90.

Bosch defines the motor power as a function of speed and the user can build his own personal assistance characteristic.

Image

https://www.pedelec-biker.de/2015/09/bo ... rmodi.html

regards
stancecoke

dameri   100 W

100 W
Posts: 146
Joined: Sep 20 2018 10:57am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by dameri » Jan 09 2020 6:34am

casainho wrote:
Jan 09 2020 4:12am
dameri wrote:
Jan 08 2020 9:59am
I installed 850C_v0.6.2 and v0.51.0. Torque sensor calibration didn't work for me. My ADC values are very low compared casainhos values. My 0 kg ADC value is 146 and casainho has 292, my 78 kg (my weight) ADC value is 281, casainho has on 54 kg 378 ADC. Perhaps it requires a torque sensor adusting. However, even without the torque sensor calibration, the program works just fine. I'm going to do the torque sensor adjusting on next engine maintenance and try again torque sensor calibration after that.

I think (not very sure) battery goes down faster. I have driven only two rides and weather was very windy.
Please follow the calibration wiki page, there is not problem at all with different values of torque sensor compared to mine -- the issue is that!! all of them output different values.

You just need to have different weights like 5, 10, 15, 20 kgs + using your own weight and then, put the values on the display.

About the battery, I didn´t changed anything about it and I was carefully measuring the timings after this change.
So, I don't know what I've doing wrong. Assist was very poor with torgue sensor enabled. I just followed wiki instructions. I'll try again at weekend.
Here is my values, 25 kg and 46 kg are estimate, others real weights.
TorqueTable.jpg
TorqueTable.jpg (64.93 KiB) Viewed 1383 times

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 09 2020 6:46am

So, I think you need to focus on the values around the knee of the graph, maybe trying to measure 5 values near around, because that zone will have a big impact on the values calculated. Also I think is important for you try to imagine a soft round curve passing on/near all the points and so you can estimate some of that values.

As we can see, your torque sensor is like mine, good sensitivity only from 0 up to 20 kgs.
dameri wrote:
Jan 09 2020 6:34am
So, I don't know what I've doing wrong. Assist was very poor with torgue sensor enabled. I just followed wiki instructions. I'll try again at weekend.
Here is my values, 25 kg and 46 kg are estimate, others real weights.
Image
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   10 GW

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by casainho » Jan 09 2020 6:58am

stancecoke wrote:
Jan 09 2020 5:20am
casainho wrote:
Jan 09 2020 4:38am
I want to be able to maintain or increase the motor torque when the cadence increases
OK, with this the "Assistlevel" in the formula P_mech_motor = Assistlevel*P_human will be no longer a constant. The ratio P_motor/P_human will be a function of the cadence.

Of course you can program it this way.

I_motor = constant * Assistlevel * torque_human * (1+ cadence/constant_divider)

Example: if you set the Assistlevel (chosen assist level in the display) to 100% of human power and the constant_devider to 90, you will get 200% assistance at the cadence of 90.

Bosch defines the motor power as a function of speed and the user can build his own personal assistance characteristic.
Hmmm, I think I will stick to something more simple for now.

I think I would like to try have as input the pedal human power and control the I_motor, keeping I_battery free to go up to the max current possible of 16 amps.

And I understand that the power relation as you say "The ratio P_motor/P_human will be a function of the cadence", cadence/erps.
I wounder what will be the felling, if it will be easy to understand when we should shift the gears to avoid wasting of power, etc.

All of this because I tried control of I_motor instead of I_battery and I liked the result, but I would like to better understand all of this.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the 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. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

dameri   100 W

100 W
Posts: 146
Joined: Sep 20 2018 10:57am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by dameri » Jan 09 2020 7:09am

casainho wrote:
Jan 09 2020 6:46am
So, I think you need to focus on the values around the knee of the graph, maybe trying to measure 5 values near around, because that zone will have a big impact on the values calculated. Also I think is important for you try to imagine a soft round curve passing on/near all the points and so you can estimate some of that values.

As we can see, your torque sensor is like mine, good sensitivity only from 0 up to 20 kgs.
dameri wrote:
Jan 09 2020 6:34am
So, I don't know what I've doing wrong. Assist was very poor with torgue sensor enabled. I just followed wiki instructions. I'll try again at weekend.
Here is my values, 25 kg and 46 kg are estimate, others real weights.
Image
Ok, thanks. I do changes at weekend.

User avatar
stancecoke   100 kW

100 kW
Posts: 1165
Joined: Aug 02 2017 2:56pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by stancecoke » Jan 09 2020 9:29am

casainho wrote:
Jan 09 2020 6:58am
but I would like to better understand all of this.
perhaps the grin simulator helps you to understand the physical background:
https://www.ebikes.ca/tools/simulator.html

Image

regards
stancecoke

thineight   100 W

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

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by thineight » Jan 10 2020 6:48pm

Haven't read any post from Buba in a while... Are you mate still there?
MTB KTM Ultra 29" - City bike DAYTONA 28"

diagonti   100 µW

100 µW
Posts: 7
Joined: Jan 01 2020 2:17am

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

Post by diagonti » Jan 10 2020 11:53pm

diagonti wrote:
Jan 03 2020 9:28pm
casainho wrote:
Jan 03 2020 6:26am
For testing, I think you can disconnect the wire that power up the motor controller from the display, then, connect directly that wire to the battery voltage. That way the system will work but you will need to cut off the battery power to turn off the system.
Good thought - I disconnected the orange (LCD) and red (motor) leads from each other, and joined the red (motor) end to the brown (LCD)/blue (motor) cable join. I left the now free orange (LCD) lead disconnected.

I still need to hold the power button down (so it does not progress to the next screen - at least I now know this is by design) but the negotiation of firmware versions happens much quicker (presumably because the motor controller is already running and waiting for a signal).

The motor however gives a small kick - this did not happen before. Is the bootup sequence reaching a slightly further state?

FWIW, I have also tested continuity between the cable joints and the 8-pin HIGO-B8 socket, so I am confident the joins are good and that the cable insulation color scheme is as expected.

Thanks again for your help!
Just a quick update - I replaced the display and it appears to be working fine. Now I need to go hook up the brake and speed sensors.

Are the magnetic brake sensors for hydraulic brakes just one big closed circuit that opens when a lever is pulled (wired in series)? Or are they an open circuit that is closed by either lever (wired in parallel)?

thineight   100 W

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

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

Post by thineight » Jan 11 2020 4:46am

diagonti wrote:
Jan 10 2020 11:53pm
Are the magnetic brake sensors for hydraulic brakes just one big closed circuit that opens when a lever is pulled (wired in series)? Or are they an open circuit that is closed by either lever (wired in parallel)?
Brake sensors circuit is open by default (no brake sensors or no lever pressed). It closes if ONE lever is pressed.
See the schematic on the wiki where you can see also the splitter for brake sensors.
MTB KTM Ultra 29" - City bike DAYTONA 28"

User avatar
jbalat   10 kW

10 kW
Posts: 573
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware (Casainho code only) for TongSheng TSDZ2 mid drive motor

Post by jbalat » Jan 12 2020 4:02am

Hey guys been a while but just wanted to Share some findings regarding peddle cadence using the 36v motor with 10s and 14s battery in 36v and 36v experimental mode.
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

Post Reply