casainho said:
stancecoke, how I see Throttle/PAS/Torque sensor, all of them working as "speed+torque" and for instance: at 50% of "speed+torque", the motor would run at 50% of max current and 50% of max speed.
- throttle: outputs a value from 0 to 100% (reading the ADC signal)
- PAS: outputs a value from 0 to 100% (reading the cadence)
- Torque sensor: outputs a value from 0 to 100% (considering the torque)
I can't follow your argumentation at the moment.
I'll try to explain my understanding of the different ride modes:
1. Throttle mode: Duty cycle is set directly to throttle value (can be combined with PAS detection, just check if pedals are turning for legality in Germany, no processing of cadence-information).
2. Speed Levels: a constant duty cycle is applied per level, if movement of pedals is recognized by the PAS. If you ride from the plain to a hill, you will get slower. With more power from the riders pedaling, current is decreasing. That's the way, very cheap bikes from the discounter have done it in former times.
3. Power Levels ("torque simulation"): motor current is held constant per level by a control loop (with cadence-dependent ramp up). With more power from the riders pedaling, the bike gets faster. Thats the way most conversion-sets and newer discounter bikes (can) do it.
4. Torque-Sensor-Mode: Motor power is proportional to human power. Motor current is controlled to keep Pmotor = k*Phuman, U*I = k*cadence*torque@crank, where k can be the assistLevel. Thats the way most "more expensive" bikes do it.
In my recent code, in Torque-Sensor-Mode I don't control the motor current, I'm just setting the duty cycle to factor*cadence*torque@crank, I'm quite satisfied with this solution for many years now. I don't know if you can feel a difference to current controlled Torque-Sensor mode in real life....
casainho said:
Any ideas how to best promote in Arduino world?? I would go to Arduino forums....
I don't believe, that the arduino community is interested, as the STM8 processors are not supported by arduino. It would be much more interesting, if we would merge to the Lishui controllers as the STM32 processors are supported, see
stm32duino. The arduino-specific UART communication with the well known China-Displays is published already.
Regards
stancecoke