New "TSDZ2 Torque Sensor Central Motor"

Sigh. I give up. Not going to read this topic anymore since it's 99% hacking talk that's of no interest to most purchasers of the unit.
 
casainho said:
Rydon said:
Being able to adjust the amount of power at different ranges of torque would be a great feature for the open source firmware project. Weaker riders whether from age or disability can then get the full benefit of the electric assist without strenuous effort and it would work on regular TSDZ2's as well as coaster brake versions.
I really love to see that kind of use of technology!! I am happy to think that my work can help that kind of users needs.

Casainho, That is great news that you are supporting a power multiplier to adjust torque sensitivity configurable on the LCD3. Isn't the sensitivity and power applied at lower torques also a function of max ADC?

I was also wondering if there is a parameter to set the motor stop delay when torque drops to 0. Normal TSDZ2 motors have about a 100-200ms delay but the coaster brake versions have 0 delay. To have the motor continue even a split second on a coaster brake motor which does not have a sprag clutch is frustrating (it feels like the motor surges when applying the brakes) and could be outright dangerous.
 
KD5ZXG said:
I've got eyebicycle's programming guide. ...
It seems pretty thorough, but I disagree with his conclusion
that the number located at (4002) is battery amps in binary
coded decimal. 0x14h may not mean 14A, with a 1:1 ratio.
Over a limited range, it may measure deceptively close...

I can confirm that KD5ZXG appears to be correct that the value in 4002 is hex. I have several low watt motors that came from the factory with 0D in the data slot at 4002. Definitely hex, so these motors had a value of 13 decimal. I am not sure how those values translate into amps.
 
Timelord said:
Sigh. I give up. Not going to read this topic anymore since it's 99% hacking talk that's of no interest to most purchasers of the unit.

We are all on a journey with this motor and topics change all the time, right now this is what everyone is interested in. It doesn’t stop anyone from asking for help or running multiple topics at the same time.

I think the new firmware has given the motor new life. Now that I have calibrated it, it feels much more responsive and actually gives you more power as you spin out instead of dropping off like the original firmware. That is what I wanted so it now feels more like the Bosch motor.

I agree all the tech talk related to the firmware should be on another thread so we can move that here. Sorry about talking ADC’s :( I have added the link to my signature.
https://endless-sphere.com/forums/viewtopic.php?f=30&t=93818&start=150
 
I have a persistent annoying thing with my TSDZ2: a drag when I try to use it without assist. It's there since I bought it, 600 Km before.
It's like I pedal 8-9 turns lightly or normal then comes again a 8-9 turn period when it is very hard to pedal it.
Previous posts are sometimes said they did not have it all, or some other said they did but with the time become good or better.
Do you have any idea, have you noticed the same as well?
 
jbalat said:
I think the new firmware has given the motor new life. Now that I have calibrated it, it feels much more responsive and actually gives you more power as you spin out instead of dropping off like the original firmware. That is what I wanted so it now feels more like the Bosch motor.
I am really happy with your feedback :)
 
jbalat said:
casainho said:
About the max value, seems that for your TSDZ2 you have a delta of 20 units, while for mine I have 32. Can you please confirm again your values????? if you have also near 32 and only the ADC min value change between TSDZ2, that would be better.
Yes I am also using +32
my rest adc is 40 so I'm using 42 min and 74 Max
This feels really good !!!
So, I added auto calibration for toque sensor ADC min value, just like original firmware behaves. For the max value, I used +32 since your motor and my motor seems to have the same +32. Can you please test the new code?? And you can give feedback on this issue, that I will keep open until you give positive feedback: https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/issues/9

Rydon said:
casainho said:
Rydon said:
Being able to adjust the amount of power at different ranges of torque would be a great feature for the open source firmware project. Weaker riders whether from age or disability can then get the full benefit of the electric assist without strenuous effort and it would work on regular TSDZ2's as well as coaster brake versions.
I really love to see that kind of use of technology!! I am happy to think that my work can help that kind of users needs.
Casainho, That is great news that you are supporting a power multiplier to adjust torque sensitivity configurable on the LCD3. Isn't the sensitivity and power applied at lower torques also a function of max ADC?
Yes it is. See my previous full explanation here: https://endless-sphere.com/forums/posting.php?mode=quote&f=28&p=1402705#pr1402646
Also, you can always look at ADC values on LCD3 to make sure it is working for you/your motor. With the data we have now, the new code I just did seems to work well but if you are worried about it, please have a look.

Rydon said:
I was also wondering if there is a parameter to set the motor stop delay when torque drops to 0. Normal TSDZ2 motors have about a 100-200ms delay but the coaster brake versions have 0 delay. To have the motor continue even a split second on a coaster brake motor which does not have a sprag clutch is frustrating (it feels like the motor surges when applying the brakes) and could be outright dangerous.
I didn't measured such values. On our firmware it works well for me and I didn't get other feedabck from others. I guess you need to try by yourself and see if there is need for improvement.
 
Rydon said:
I can confirm that KD5ZXG appears to be correct that the value in 4002 is hex. I have several low watt motors that came from the factory with 0D in the data slot at 4002. Definitely hex, so these motors had a value of 13 decimal. I am not sure how those values translate into amps.

Perhaps 0.4 battery Amps, now on same 0.4 scale as battery Volts?
0x0Dh = 13 , 13 x 0.4A = 5.2A , 5.2A * 48V = 250W

EBS' early measurements hinted toward SQR(2)/2 as the factor.
If interperted to mean 13 Motor amps RMS:
0x0Dh could have meant 330W at 36V, or 440W at 48V.
These oddball ratings do not strike me as likely.

So, if scale factor has changed any way in newer firmware, doesn't
exactly prove the old firmware wasn't 1:1 battery amps in Decimal.
The original conclusion cannot be completely ruled out.

Or, they could be just as confused as we are, putting in whatever
numbers seem to work. Even an oddball quantity of battery power
might be interpreted 250W, if measured where the rubber hits the
road...

Does any law on the books today state exactly where in the system
that should be measured? You would measure a gasbike at the tire,
and not fuel rate from the tank.
 
Torque Sensor improved
I developed an improvement to the torque sensor signal and I would like to explain how it works and compare with original firmware.

On original firmware, sometimes I don't get motor assistance when I press the pedals, I need to press and rotate like 180 degrees the pedals to start getting motor assistance. On our OpenSource firmware, we always get motor assistance as soon as we press the pedals!! If the ebike is moving and I am resting my feet on the pedals, I don't get motor assistance as I expect (BUT torque sensor outputs a positive signal because of weight/force done by my feet but that signal is then filtered because we detect pedal cadence = 0).
On a stop, I also like to rest one foot on the pedals to quick start when I get the green light semaphore. When I get the green light, I release brakes and I will get fast and immediate motor assistance.
 
Why does zero only measure on powerup? Could we re-interpret
zero torque as the most recent low, associated with no cadence,
and that wasn't a momentary glitch?

I agree that torque assist should be available from dead stop.
I'm not sure how much battery current you want to put through
one wind while the field is not turning, maybe no more than 1/3.
And depending how idle current freewheels in the bridge, could
eat battery (or not). If so, lever cutout might be helpful.

The torque sensor appears to be a ring, that senses twist.
Not a pressure pad under the bearing that senses weight,
or weight imbalance.

Else earlier report that coaster brake version could be tricked
to give extra assist (after being twisted backward on startup)
would be impossible.
 
I respectfully disagree with the motor powering up the instant the pedals move. Perhaps this would be useful for racing applications (750w racing motors - lol), however you are just looking for trouble. Sometimes you get your weight on the pedals and then decide at the last instant to not go because a car drives through the red light. When that happens and you only pedal less than 1/10 of a turn your instincts don't think "hit brakes" but the motor thinks "max accelerate". On a motorcycle perhaps having a quick reacting motor makes more sense, however on a low power "assist" bike the motor should be assisting and not dictating where and when you go.

Having the pedals rotate a reasonable amount is a safety feature, removing that creates a danger and eventually someone will get hurt. At least that is the way I see it.
 
You seem to object to an unrelated cadence runaway mode.
Should be no cadence assist unless spokes are already moving,
and live cadence sensed from pedals. I'm not saying anyone
pays attention to spokes, maybe they should. None of these
checks rule-out torque based assistance from a dead stop.

Weight on pedals is neither torque nor cadence. Way TSDZ2
torque sensor is made, wouldn't even see that. Torque based
runaway would be a crawl, related to miscalibration of zero.
Mechanical negative feedback prevents full-scale runaway.
Non-coaster sprag also slips. Crawlaway cannot feed itself.

Do we need to bleed the zero calibration over time, and
keep watching for a new non-glitch low? Just incase zero
drifts to where it thinks we have some small torque when
we do not? Crawling into an intersection not good either...

I also see no reason small torques within a margin of error
can't just be ignored when there is no cadence. Any real
torque signal at zero cadence is likely to be quite large
and unmistakable.

Less certain how to smoothly hand-off assistance from
torque to cadence. Is cadence assist even desireable,
or just for situations where a throttle isn't legal?

Want to put your sitting weight on one pedal without
this being misread as go? A job for brake lever cutout.
 
John and Cecil said:
Having the pedals rotate a reasonable amount is a safety feature, removing that creates a danger and eventually someone will get hurt. At least that is the way I see it.
I think I will be able to put a config option on config.h file for motor assist start without or with pedals cadence. That way anyone is free to go with one way or the other.
 
Speady said:
Timelord said:
Sigh. I give up. Not going to read this topic anymore since it's 99% hacking talk that's of no interest to most purchasers of the unit.
Me too.
Why can't this portugues guy stick to his own thread. Lack of attention?
You can maybe go away and let the people ( casainho and jbalat) do there wonderfull job.
Thanks
 
I also get bored with the techno talk but think it needs to happen and we should encourage it. These people are spending a great deal of their personal time and money into improving the product. Eventually they will get things optimized and either sell us upgraded units or make it easy enough for us dummies to implement our upgrades.

I am however struck by the way everyone expects something a little different from these motors. That's where our input can be valuable if we can follow along through the process.

As far as myself,.. I favor any changes that result in a natural and transparent feel to cycling. I don't want it to feel like artificial or make me learn how to ride differently. Most importantly I still want a good workout without feeling like Im pedaling air.

Actually the original firmware has a pretty good feel for me with just the right boost at 36 volts. My only gripe is that I don't get a clean interruption of power when I reduce pedal pressure for a shift. It seems to ramp down slowly if the pedals are turning. If I stop the pedals it cuts power quickly but not if I continue pedaling but with no pressure. When climbing I want to time my shift with a short decrease in pedal pressure to avoid loss of momentum. Its a small gripe but its the only motor action that is not in sync with my riding style.
 
KD5ZXG said:
I'm not sure how much battery current you want to put through
one wind while the field is not turning, maybe no more than 1/3.
I think you are talking about motor phase current?? If so, yes, I am controlling the max battery current and max motor phase current and the values are defined on main.h -- if you can, please review my implementation and see if it need to be improved:
Code:
#define ADC_BATTERY_CURRENT_MAX 29 // 18 amps (0.625 amps each unit)
#define ADC_MOTOR_PHASE_CURRENT_MAX 48 // 30 amps (0.625 amps each unit)

And this is a tecnhical discussion, maybe you can switch to this thread: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor
 
hobbyvac said:
These people are spending a great deal of their personal time and money into improving the product. Eventually they will get things optimized and either sell us upgraded units or make it easy enough for us dummies to implement our upgrades.
We are developing a LOT of OpenSource knowledge and technology around TSDZ2, and we are doing it together!

I hope sellers like eyebyesickle can sell the improved version of TSDZ2, so everyone can access to the best possible of the technology/ebikes!!
I already said to eyebyesickle that I do not want any money part of the sales - but I am happy to get donated TSDZ2/parts so it help me to continue developing (thanks to the users that already did donate TSDz2 parts to me!!).

Also, TongSheng engineers can take advantage of all this OpenSource knowledge and technology to improve their next version of products, so I really hope all this benefits everyone.

My ultimate goal is to protect the environment and I believe EBikes do and will play an important role for that.


hobbyvac said:
My only gripe is that I don't get a clean interruption of power when I reduce pedal pressure for a shift. It seems to ramp down slowly if the pedals are turning. If I stop the pedals it cuts power quickly but not if I continue pedaling but with no pressure.
I good example of knowledge that we don't have about TSDZ2 and that TongSheng will never give us. We all benefit if we focus together on it.

I have my guess of what happens and I would like if others could also look at this and give their opinion. Here goes:
1. torque sensor circuit has a hardware low pass filter, this means the signal is slow to change, it can't change quick
2. looking at pedal PAS signal/cadence, we can detect relatively quick stop of pedals

So, reducing/increasing torque on pedals is kind of slow for the system to detect. When you stop pedaling, the motor assistance stops quickly because the firmware detects pedal cadence = 0 and filters out/force to zero the torque sensor signal.

On this video, I recorded the real time torque sensor signal, it change slow on the hardware (we can't change it on firmware... - but I guess we can on hardware, like changing a resistor or so (NO, this is way to tecnhical ;) )
[youtube]1xiMbCerRKw[/youtube]
 
KD5ZXG said:
Any real torque signal at zero cadence is likely to be quite large and unmistakable.
Not sure about this. My son has weak legs. The paraplegics may have weak arms muscles compared to regular legs muscles.

Yes, we are expanding the application of TSDZ2!! And why not????

A paraplegic using TSDZ2 on an hand bicycle, installed by user Rydon:
[youtube]A-dzHZldX4M[/youtube]
 
casainho said:
John and Cecil said:
Having the pedals rotate a reasonable amount is a safety feature, removing that creates a danger and eventually someone will get hurt. At least that is the way I see it.
I think I will be able to put a config option on config.h file for motor assist start without or with pedals cadence. That way anyone is free to go with one way or the other.
I just added it. On config.h file we can use 0 or 1 to disable or enable this option. The default is enable:

Code:
#define MOTOR_ASSISTANCE_CAN_START_WITHOUT_PEDAL_ROTATION 1
 
I dunno. Around 3:30 redshirt trike blows past like he's standing still.
Firmware may not be cheating hard enough. More cheat, more win...
 
Yeah what you guys are doing is great, and I want to offer it to the public when the time is right... the only real issue I see is that it's hard to flash the KT LCD3... This is partly why I was asking about the protocol trying to edit another display. If we had a modified display that we could just plug in to flash, or better yet, Bluetooth update remotely/at will... this project would been opened up to a whole lot more people... The requirements to get this going for the KT LCD3 make the process rather troublesome and advanced for most people. It would need to be a very complete/acceptable version before someone prepped some units for people. It's alot of work, really. I'm all for it, just thinking about availability and ease of access and distribution... and if this modified code was wrote to a more accessible display, it would be waaaaaaay more easily accessible to people, and at an earlier stage. Anyway, that's just me rambling ... ;)

Carry on.

Wait, actually, there have been a couple shots taken here and some bigoted remarks... Super petty and ridiculous... Especially when people are donating their time for the greater good of anyone using a similar system... The only people who need to go on are the ones talking talking petty BS about other people. I have much harsher things to say but I'll leave it at that for now before this really takes a bad turn.

This thread was long and messy before and it's not getting any shorter anyway... I'm sure there will be a more complete, friendly, users / troubleshooting /wiki / guide etc for the TSDZ2 before long - for those who need it. This thread is a beast and there is no taming it at this point anyway IMO

casainho said:
hobbyvac said:
These people are spending a great deal of their personal time and money into improving the product. Eventually they will get things optimized and either sell us upgraded units or make it easy enough for us dummies to implement our upgrades.
We are developing a LOT of OpenSource knowledge and technology around TSDZ2, and we are doing it together!

I hope sellers like eyebyesickle can sell the improved version of TSDZ2, so everyone can access to the best possible of the technology/ebikes!!
I already said to eyebyesickle that I do not want any money part of the sales - but I am happy to get donated TSDZ2/parts so it help me to continue developing (thanks to the users that already did donate TSDz2 parts to me!!).

Also, TongSheng engineers can take advantage of all this OpenSource knowledge and technology to improve their next version of products, so I really hope all this benefits everyone.

My ultimate goal is to protect the environment and I believe EBikes do and will play an important role for that.


hobbyvac said:
My only gripe is that I don't get a clean interruption of power when I reduce pedal pressure for a shift. It seems to ramp down slowly if the pedals are turning. If I stop the pedals it cuts power quickly but not if I continue pedaling but with no pressure.
I good example of knowledge that we don't have about TSDZ2 and that TongSheng will never give us. We all benefit if we focus together on it.

I have my guess of what happens and I would like if others could also look at this and give their opinion. Here goes:
1. torque sensor circuit has a hardware low pass filter, this means the signal is slow to change, it can't change quick
2. looking at pedal PAS signal/cadence, we can detect relatively quick stop of pedals

So, reducing/increasing torque on pedals is kind of slow for the system to detect. When you stop pedaling, the motor assistance stops quickly because the firmware detects pedal cadence = 0 and filters out/force to zero the torque sensor signal.

On this video, I recorded the real time torque sensor signal, it change slow on the hardware (we can't change it on firmware... - but I guess we can on hardware, like changing a resistor or so (NO, this is way to tecnhical ;) )
[youtube]1xiMbCerRKw[/youtube]
 
casainho said:
Yes, we are expanding the application of TSDZ2!! And why not????
A paraplegic using TSDZ2 on an hand bicycle, installed by user Rydon:

Jeff is actually classified as a quadriplegic. The location of his spinal cord injury from a mountain bike accident left him with 50% biceps and 35% triceps and no use of his hands. He is a real trooper. With the TSDZ2 motor, he cycles over 100 miles a week. Sometimes 50 miles on a single ride. There are a lot of people like Jeff whose quality of life can be dramatically improved with a TSDZ2 on a hand-cycle but it will require the open firmware project to make it work the way they need it.

The Xshifter he is demoing in the video is an awesome product. It has Bluetooth buttons for regular bikes instead of voice. You can dial it in for any derailleur or IGH and adjust it for each gear/cog which it then remembers. With this, it can compensate for bad mid-drive chainlines, worn/bent derailleurs, etc.
 
KD5ZXG said:
Perhaps 0.4 battery Amps, now on same 0.4 scale as battery Volts?
0x0Dh = 13 , 13 x 0.4A = 5.2A , 5.2A * 48V = 250W

I think you may have nailed it once again. The motors with 0x0Dh were 48v 250W. So I think the .4 scale could be right. 250 watts is the highest wattage TongSheng will sell the coaster brake motor. They sold it at 500 watts in the past but I guess changed their mind. They are very cautious.

Edit: Oops, the motor was 48v 350 watts.

KD5ZXG said:
Does any law on the books today state exactly where in the system
that should be measured? You would measure a gasbike at the tire,
and not fuel rate from the tank.

Hahaha!! Well put. The EU law actually limits watts to what can be sustained by the motor so they allow motors to go higher for short durations. In fact, we have measured Bosch and Yamaha motors in excess of 750 watts even though they are rated 250-350 watts. The US laws are more ambiguous but at least Bafang interprets it the same way as they allow the 750 watt BBS02 to go to 1300 watts and the 1000 watt BBSHD to go to 1600 watts. I assume they rate them lower because if you actually ride them wot they will overheat and cannot sustain it.
 
Back
Top