stancecoke said:
andrea_104kg said:
Your value for TQ calib is still way to high. In the repo it is set to 80!
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/blob/a370abc9e0f2c1ab7552eafefeacfe8db04c547d/config.h#L48
Torque is read into an array at each PAS pulse:
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/blob/a370abc9e0f2c1ab7552eafefeacfe8db04c547d/ACAcommons.c#L259
The ADC value is mapped by the variables
Code:
uint16_t ui16_X4_min_range = 500;
uint16_t ui16_X4_max_range = 900;
They are hardcoded in the ACAcontrollerState.c, you can't set them in the Java Tool.
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/commit/7480ba0cc40cc6bfb8e83f330472ddc9e8992be8
The torque is averaged over one crank revolution:
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/blob/a370abc9e0f2c1ab7552eafefeacfe8db04c547d/ACAcommons.c#L205
the current target is calculated from average torque and the cadence:
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/blob/a370abc9e0f2c1ab7552eafefeacfe8db04c547d/ACAsetPoint.c#L238
andrea_104kg said:
76 sounds strange, please read the wiki carefully!
For a 6FET and 12FET controller the value has to be something around 100, for the 18FET about 50.
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/wiki/04-The-Java-Tool
Thanks for the reply.
I also tried with a value of tq = 70 but nothing changes. 1000 is the default value that the java tool puts me when I select the torque sensor and I wanted to try that too but nothing ...
I thank you for the further clarifications but for me they are like Arabic or Egyptian hieroglyphs ... I am a poor accountant who barely knows the law of ohm and not even well ... :-(
I can only groped to use logic ... my ECU is a standard 6 fet ECU (pswpower kt 36 / 48svpr) it seems really strange to me that no one has detected an error in the code using this ECU ... even the torque sensor is one "standard" t9 therefore well known. I would like to understand (according to logic, not according to programming) how the pas is used in this firmware, if it is only a "switch" that gives consent to pin x4 where the torque is then detected or if it does something else. If it were just a "switch" that says "When the pas turns, you read the gate x4 and according to its voltage you give power to the motor (and according to the cadence it modulates the power of x4)" only with the pas attached the motor will not it should boot like it does to me.
Evidently the pas is not just a switch but also gives power to the engine, and I find this really strange.
One thing I'm not sure about is if my pas is 18 magnets or 36, but I've tried both values and it doesn't change anything. :-(
I left the value 76 in "battery current cal a" because in one of the "settings" there was that value, I had read that it must be 100 for a 6 fet, I will try to change it, but I'm afraid it has nothing to do with it do with starting at most with only pas :-(
So not knowing the programming I can only start from the assumption that the firmware works on my control unit and with my torque sensor.
So the only value I haven't tried to change is 76 (and tq to 80) .
But if the assumption is not true I can spend years doing tests, it will never work ... :-(