stancecoke said:
casainho said:
A feature I want is the torque sensor calibration and it needs the setup of more 11 differents values
The torque sensor output can be described with two linear equations,if you ignore the slight difference between left and right pedal you mentioned in
this post. I guess the temperature drift of the system will be greater than the difference between left and right.
So you just need 4 constants to calculate the torque from the adc reading with sufficient accuracy. Excel will tell you the linear approximation coefficients. You can scale them to an eigth bit value if you want to avoid hibyte and lowbyte transmission.
I just took your right pedal example and converted the Kilogramm into Newtonmeter for a 170mm crank length.
Hmm, I got a different of 30kgs between left and right pedal: 100 kgs on right and 70 kgs on left so I think it should not be ignored.
For the users, I think will be easier to input pairs of: weight in kgs, ADC value. User will need a cheap digital fish scale or some know weights of 5 or 10 kgs, maybe up to max of 40kgs or 50kgs total. Maybe will help the user to calculate the ADC steps in each interval so he can understand which points to choose and simple calculator will work. But sure, excel will also work for the ones used to it.
For now it is working like this and took me some time to make it working. Maybe in future it can be improved and/or simplified but first we need to get more feedback. Myself, I will test this on the other bicycles I have.
And by the way, here is my 1000 watts peak of human power
I was testing the pedal human power reading and at startup, when I put my weight on the pedals, I got max value of 1050 watts!! As you can see on the graph (it averages the values on 3.5 seconds window so it does not show that peak of 1050 but shows a little less). The values more constant on the graph were about 100 up to 150 watts while I was riding, only on startups If I put a lot of force I could go to this high values of 1000 watts:
Validation:
- I verified before start this tests that the torque sensor was correctly measuring my weight of 102 kgs
- the formula is:
pedal_torque_x100 = torque_sensor_weight * (uint16_t) TORQUE_SENSOR_WEIGHT_TO_FORCE_X100;
pedal_torque_x100 = 102 kgs * 167
pedal_torque_x100 = 17034
pedal_power_x10 = pedal_torque_x100 * pas_cadence_rpm) / 96
pedal_power_x10 = (17034 * 60) / 96
pedal_power_x10 = 10646
pedal_power = 1064 watts!!
Hmmm, but there is one important note here!! the 1050 watts are instantaneous values and not the average of my human power... as we know, we should get a kind of sinewave shape on the pedal torque...
Force (Nm) = weight Kg * 9.81 * 0.17 (0.17 = arm cranks size)
---------------------------------------------------------*/
#define TORQUE_SENSOR_WEIGHT_TO_FORCE_X100 167
// (2 * pi) / (60 * 10) = 0.010466667
// 1 / 0.010466667 = 96