tomtom50 said:I'm glad to see some work on the human torque reading. My TSDZ2 flatters me daily, my old bones push 200W so easily...
A decent check could be done with rollers. On zero assist pedal a while at a steady speed and get a good human watts reading. Then in the same gear use throttle only to reach the same speed and read the electrical watts.
Rollers eliminate confounding factors like wind resistance, head or tail wind, or changes in grade like you have on the road. If you run rollers the same speed they draw the same power.
Since the motor and gears are about 80% efficient, 0.8 * electrical watts should be very close to the true mechanical work at the spindle and can be used to calibrate human watts. The displayed zero assist human watts should correspond within 5% or so.
I would do this but I don't know anyone who has a set of rollers.
elem said:[youtube]1oYnNEh2Wc4[/youtube]
always on V 0.16, planned to move to 0.19, human torque sensor on V 0.16 ( hitting 850w human power ...)
buba said:Just thought I would give a quick update.
It may seem I am absent from the community but it is the exact opposite. Have been developing every night the last week and the week before that. Sorry if I have not answered or engaged in anything! Thought that I should spend the little time I have to focus on the development.
I have changed and altered around 3000 lines of code if looking at GitHub data. A lot of changes that will help us expand the functionality and improve the feeling and response of the system. Am continually working on several things at the same time.
* Have implemented a Torque Assist function. This one only relies on the pedal torque applied. Similar to how the original firmware does and other commercial versions. Very responsive.
I got the same values as you, BUT, I have 4 different bicycles with TSDZ2.buba said:It seems I have a non-linear torque sensor after some quick testing. This is why I only have accurate human power readings in the low range and why it quickly levels out around 100-150 watts in my development firmware version. Just got the time to test this. Will later make a graph and try to model the torque sensor with continuous data points from min to max.
I just disassembled a torque sensor and I am pretty sure I see the "49E" hall sensor, you can get on google the datasheet of SS49E, Linear Hall Effect Sensor.casainho said:So, seems there are expressive variations on the TSDZ2 torque sensors :-(
Would be nice if we could look at the torque sensor details (Stancecoke where are you??) and see if we can tweak the bad torque sensors... here is an explanation how TSDZ2 torque sensor works:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/How-TSDZ2-torque-sensor-works
Maybe we can adjust that 2 bolts??
![]()
Rafe said:Many thanks for all your hard work Buba. I have been off the bike for a couple of months and have just flashed with version 19 and really pleased to find I can now push the bike backwards with the system switched on. That was badly needed.
Rafe said:buba said:…
* Have implemented a Torque Assist function. This one only relies on the pedal torque applied. Similar to how the original firmware does and other commercial versions. Very responsive.
…
I am just as pleased you are going to implement torque assist. I've just come back from a test ride on version 19 and all the time I was thinking it is odd not to have the most torque from the motor when you most need it slowly peddling up a steep hill and really pushing hard on the pedals but as the hill levels off and cadence picks up so does the motor assist when it is not really required as much. It's not just version19 of course, it's been like that for sometime.
Just got to sort out the power boost settings now as they have changed since 18
Thanks again for all your hard work.
casainho said:I got the same values as you, BUT, I have 4 different bicycles with TSDZ2.buba said:It seems I have a non-linear torque sensor after some quick testing. This is why I only have accurate human power readings in the low range and why it quickly levels out around 100-150 watts in my development firmware version. Just got the time to test this. Will later make a graph and try to model the torque sensor with continuous data points from min to max.
On my own bicycle, I get the same values as you: it is easy to get around 120W but very hard to go like over 180W.
I went to measure again and I got this - ADC values:
- rest: 62
- 5 kgs: 70 (delta of 8 )
- 10 kgs: 78 (delta of 8 )
- 15 kgs: 79 (delta of 1)
- 20 kgs: 80 (delta of 1)
- 25 kgs: 82 (delta of 2)
So as we can so, my torque sensor can measure well up to 10 kgs but at 15 kgs it is already not measuring.
Now with other bicycle, the one from my girlfriend:
ADC values:
- rest: 45
- 5 kgs: 52 (delta of 7)
- 10 kgs: 59 (delta of 7)
- 15 kgs: 66 (delta of 7)
- 20 kgs: 72 (delta of 6)
- 30 kgs: 85 (delta of 6.5)
- unknown kgs: 103 (max value the torque sensor measures)
(could not measure higher values but with my body of 100 kgs, the sensor seems to max out before I put all my weight but goes up to AC value of 103)
I tested on another bicycle and I saw that at rest ADC was 40 and max value was 72.
So, seems there are expressive variations on the TSDZ2 torque sensors :-(
Would be nice if we could look at the torque sensor details (Stancecoke where are you??) and see if we can tweak the bad torque sensors... here is an explanation how TSDZ2 torque sensor works:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/How-TSDZ2-torque-sensor-works
Maybe we can adjust that 2 bolts??
![]()
casainho said:
I took the risk to disassembly the torque sensor... and I moved the hall sensor to very near of the magnets. In the end, the torque sensor is working and the rest ADC value is now 17 instead of the previous 62!! The max value is almost the same as previous: 82.
Well, it is not working well as I need to make 25 kgs for the torque before the torque sensor starts increasing over 17... seems that in a few hours will need to make extra work to ride my bicycle on the planned trip
So, maybe the hall sensor is saturated because is to near the magnets...
buba said:casainho said:
I took the risk to disassembly the torque sensor... and I moved the hall sensor to very near of the magnets. In the end, the torque sensor is working and the rest ADC value is now 17 instead of the previous 62!! The max value is almost the same as previous: 82.
Well, it is not working well as I need to make 25 kgs for the torque before the torque sensor starts increasing over 17... seems that in a few hours will need to make extra work to ride my bicycle on the planned trip
So, maybe the hall sensor is saturated because is to near the magnets...
So it improved the rest value but there is an offset of 25 kg? Wow! I need to study the entire torque sensor package and understand how it works. Because right now it seems as human power readings will be impossible for all users to have... Did not expect this.
Nice to see someone that went to do what I would like. Thanks for sharing with us your knowledge.fi7ippo said:buba said:casainho said:
I took the risk to disassembly the torque sensor... and I moved the hall sensor to very near of the magnets. In the end, the torque sensor is working and the rest ADC value is now 17 instead of the previous 62!! The max value is almost the same as previous: 82.
Well, it is not working well as I need to make 25 kgs for the torque before the torque sensor starts increasing over 17... seems that in a few hours will need to make extra work to ride my bicycle on the planned trip
So, maybe the hall sensor is saturated because is to near the magnets...
So it improved the rest value but there is an offset of 25 kg? Wow! I need to study the entire torque sensor package and understand how it works. Because right now it seems as human power readings will be impossible for all users to have... Did not expect this.
Hi Buba, I think that Casainho is right, the two bolt are the key, but for adjust the position of hall sensor we have to do a micrometrical movement on sensor. I try to explain me better: before adjust the hall position I was in this situation:
Rest ADC value: 52, Maximun ADC value: 96, so a resolution of 44 ADC steps
After 3 attempts, moving in small steps further and further away from the magnet the new readings are:
Rest ADC value: 35, Maximun ADC value: 96, so a resolution of 61 ADC steps
I think I can still distance the sensor from the magnet until I have a resolution of 70-75 ADC steps, but there is a lot of time for disassemble and reassemble the torque sensor and a resolution of 60 ADC steps could be enough!
Also seems that at the right position of hall sensor (at near 60 ADC steps resolution) we have a linear output to the force applied, but for this I wait the digital dynamometer that I ordered whit a 90kg of capacity and 0,1kg resolution for a detailed report!
Now after a fine calibrating, there is a problem on the pedal sensor torque reading (menu 9 - 3): the parameter reach the maximum value of 255 when the ADC pedal torque sensor reach value of 68, so in this case I can use about half of the sensor capacity...
I think the maximum ADC reading is variable for each torque sensor, but still fixed for each unit, due to the small differences in the windings of the two (transformers) or the magnet near the hall sensor, from unit to unit.
For calibration the torque sensor the rest value is read every time the unit is powered on, right?
So for improve sensor torque experience and resolution it would take a user modifiable parameter regarding the maximum ADC value (the parameter can be easily read from menu 9 - 2 from each user by applying the maximum pressure on the pedals)
Another usefull parameter for fine calibrating the user human power could be an editable parameter that adjust the kg applied for each ADC step (assuming the linear output of sensor)
Thanks guys, your work on this firmware is exceptional!
fi7ippo said:Hi Buba, I think that Casainho is right, the two bolt are the key, but for adjust the position of hall sensor we have to do a micrometrical movement on sensor. I try to explain me better: before adjust the hall position I was in this situation:
Rest ADC value: 52, Maximun ADC value: 96, so a resolution of 44 ADC steps
After 3 attempts, moving in small steps further and further away from the magnet the new readings are:
Rest ADC value: 35, Maximun ADC value: 96, so a resolution of 61 ADC steps
I think I can still distance the sensor from the magnet until I have a resolution of 70-75 ADC steps, but there is a lot of time for disassemble and reassemble the torque sensor and a resolution of 60 ADC steps could be enough!
Also seems that at the right position of hall sensor (at near 60 ADC steps resolution) we have a linear output to the force applied, but for this I wait the digital dynamometer that I ordered whit a 90kg of capacity and 0,1kg resolution for a detailed report!
fi7ippo said:Now after a fine calibrating, there is a problem on the pedal sensor torque reading (menu 9 - 3): the parameter reach the maximum value of 255 when the ADC pedal torque sensor reach value of 68, so in this case I can use about half of the sensor capacity...
fi7ippo said:For calibration the torque sensor the rest value is read every time the unit is powered on, right?
fi7ippo said:So for improve sensor torque experience and resolution it would take a user modifiable parameter regarding the maximum ADC value (the parameter can be easily read from menu 9 - 2 from each user by applying the maximum pressure on the pedals)
Another usefull parameter for fine calibrating the user human power could be an editable parameter that adjust the kg applied for each ADC step (assuming the linear output of sensor)
Thanks guys, your work on this firmware is exceptional!
casainho said:...
... because each ADC unit (10 bits) represents 0.156 amps, the best the system can measure. With the 8 bits variable we can store up to 40 amps...
...
casainho said:![]()
This is the current state of 850C LCD firmware. The graph is missing some data points, I think it is because system is running slow for all the calculations it need to do. I wish I could implement the top white line on the graph, for it be like an envelope.
And I wish human power could be calculated correctly to be shown on the graph...
jbalat said:It is not practical for users to pull apart their torque sensors although for the few that did it has really given us some good data.
Just stating what everyone else is probably thinking by now...
It should be fairly easy to set up a menu item to measure adc values for 5kg, 10kg, say up to 40kg which can be done with a digital luggage scales attached to the peddle. By interpolating between these values then this would ensure that everyone would have calibrated human torque and the best resolution for their sensor even if it is non linear.
thineight said:Agree with jbalat, removing and, specially, reinstalling the torque sensor is a bit tricky and I would avoid it with pleasure. Iterative process to tune the values (correct me if I misunderstood the above messages) makes the operation even more annoying.
I had to disassemble twice due to a factory faulty torque sensor and I think this operation is not common at all for average user.
Software interpolation between read values (linear or parabolic least square?) sounds a better choice to a non-electronic engineer like me..
Question for the gurus: is it possible for each user to read the values at known force (as suggested by jbalat), plot the result and and determine whether a linear or parabolic/bilinear relationship is applicable?
Of course the two relationship must be implemented in the controller and settable from the display in terms of coefficients..
Thanks
I am sure we all want a good torque sensor, that is why most of us prefer TSDZ2 over a Bafang. It is a really fun game, to apply more force with our legs and feel a strong answer from the motor!!
casainho said:I just calibrate my torque sensor and found it can now measure up to 40 kgs, which is 4x more than before and this means I will get 4x more motor power assistance when I stop and after I need a quick and strong response from the motor, like when I am doing mountain biking!!
I am sure we all want a good torque sensor, that is why most of us prefer TSDZ2 over a Bafang. It is a really fun game, to apply more force with our legs and feel a strong answer from the motor!!
I wrote a wiki page with the process I used to calibrate my sensor (note that I did this process twice, on 2 different torque sensors):
How to calibrate the torque sensor --> https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/How-to-calibrate-the-torque-sensor
// ADC torque sensor
#define PEDAL_TORQUE_PER_8_BIT_ADC_STEP_X100 52 // see note below
/*---------------------------------------------------------
NOTE: regarding the torque sensor output values
Torque (force) value found experimentaly.
Measured with a cheap digital hook scale, we found that
each torque sensor unit is equal to 0.52 Nm. Using the
scale it was found that 0.33 kg was measured as 1 torque
sensor unit.
Force (Nm) = 1 Kg * 9.18 * 0.17 (0.17 = arm cranks size)
---------------------------------------------------------*/
There are some small issues that make problematic this firmware, things that I can handle myself but would be a problem for final user. I need to finish a few things before release a version, it is taking more time than what I expected but I didn't stopped yet, I really want it and today I will install this 850C LCD over the KT-LCD3 on my girlfriend bicycle, so I really need it working well.Rydon said:casainho said:![]()
This is the current state of 850C LCD firmware. The graph is missing some data points, I think it is because system is running slow for all the calculations it need to do. I wish I could implement the top white line on the graph, for it be like an envelope.
And I wish human power could be calculated correctly to be shown on the graph...
Looks great. Can I try it out? Do you have a hex file and some instructions?