casainho said:
plpetrov said:
However I did not get negative values.
Yes, negative torque sensor value is a value lower than the rest value. The values you reported are good to understand however, can you please try to block the wheel and brake as you expect and see the amount of ADC value goes lower / negative?
Because on firmware is this:
#define COASTER_BRAKE_TORQUE_THRESHOLD 40
I think I know a way to almost immediately disable the motor as soon the negative threshold value is hit... Just tell me what is that value...
Sorry for the delayed answer. I was doing a small project with the kids at home.
Condition ACD torque sensor value Threshold configuration
Left Pedal Right Pedal delta summed
Stand still 0 kg 134 140
Motor running - A.L. 1 118 127 29 #define COASTER_BRAKE_TORQUE_THRESHOLD 40
Motor off 1 kg 128 137 9 #define COASTER_BRAKE_TORQUE_THRESHOLD 13
(In edit mode the table looks fine, but displayed in the forum is not aligned). In case you can not see it I have to put is as a photo or send it by email.)
These are the values I have measured. They differ a bit from the config, maybe because of the delay they are send to the display.
For threshold 40 on my bike I see the sum for the left and right pedal is 29. Thats a bit excessive.
Trying with Assist level 0. Braking force of 1 kg per pedal. On my bike on the left pedal I get delta 6 and on the right 3 with a sum of 9. Approximated to the existing configuration value of 40, for me desired value should be only 30 % of it or about 13.
#define COASTER_BRAKE_TORQUE_THRESHOLD 13
About the motor stop, we may try two options:
1. Exactly the same motor braking function that we use for the hand brake.
2. In case 1 is not good for the motor which I really doubt, fade out of motor power for a predefined period of time may be implemented.