casainho
10 GW
- Joined
- Feb 14, 2011
- Messages
- 6,058
Ok and that should be optional. My S06x controllers do work without the external sensor.stancecoke said:This may work with a direct drive, but with a geared motor with a freewheel, you get no speedsignal if motor is not running while your bike is rolling. Serveral geared motors have an "extern" speedsensor internally already (white wire of the hall-sensor connector)casainho said:I see it uses speed from the external sensor and I wonder if it can be avoided for the correct motor function, as you know the motor works on original firmware without that speed sensor.
Ok, I will reuse your code. But you are not implementing "torque+speed" control and I think we should go with that because is like the original firmware does and seems the best method if we look at the discussion thread about the torque control methods.stancecoke said:I just updated the TORQUESENSOR_EXPERIMENTING branch with the 50 Hz control loop and 10 Hz communicaton loop. It works so far, Current and Speed is displayed correctly, Speed- and Current- Limitations work with P-control. This could be improved with a PI-control.
I think I will take a break at this point until somebody implements the display communication....
Just understood looking at your code that torque sensor is like PAS+throttle