casainho said: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.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.
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...
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.
I am really happy with your feedbackjbalat 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.
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/9jbalat said:Yes I am also using +32casainho 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.
my rest adc is 40 so I'm using 42 min and 74 Max
This feels really good !!!
Yes it is. See my previous full explanation here: https://endless-sphere.com/forums/posting.php?mode=quote&f=28&p=1402705#pr1402646Rydon said: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?casainho said: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.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 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 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.
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.
Me too.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.
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.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.
You can maybe go away and let the people ( casainho and jbalat) do there wonderfull job.Speady said:Me too.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.
Why can't this portugues guy stick to his own thread. Lack of attention?
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: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.
#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)
We are developing a LOT of OpenSource knowledge and technology around TSDZ2, and we are doing it together!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.
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.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.
Not sure about this. My son has weak legs. The paraplegics may have weak arms muscles compared to regular legs muscles.KD5ZXG said:Any real torque signal at zero cadence is likely to be quite large and unmistakable.
I just added it. On config.h file we can use 0 or 1 to disable or enable this option. The default is enable:casainho said: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.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.
#define MOTOR_ASSISTANCE_CAN_START_WITHOUT_PEDAL_ROTATION 1
casainho said:We are developing a LOT of OpenSource knowledge and technology around TSDZ2, and we are doing it together!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.
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.
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.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 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:
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
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.