Ultrawipf / OpenFFBoard

OpenFFBoard is a universal force feedback interface for DIY simulation devices
https://hackaday.io/project/163904-open-ffboard
MIT License
558 stars 117 forks source link

Speed limit and TMC flux dissipation #100

Closed Ultrawipf closed 1 year ago

Ultrawipf commented 1 year ago

This change finally enables the speed limiter option for the axis and the option to disable SVPWM for the TMC4671 if required.

The speed limiter may not always be fully stable if the difference between the limit and max speed is large for high acceleration motors but can reduce the chance of injury for fast motors.

This PR also implements an experimental mode that can dissipate energy inside the motor as the flux component instead of relying fully on the brake resistor. Note that at this point the brake resistor is still required as the flux dissipation only works while FFB is updating at the moment and overvoltage could still occur when off or FFB is not updating new torque if the brake resistor is missing.

This method actively interferes with the magnetic field in the windings so it is more noticeable than using an external resistor depending on the motor but can take stress off the resistor in case it is undersized.

The hall direction bit is not saved separately anymore but this was never fully implemented and used anyways and could be combined with the general encoder direction bit. Let me know if it impacts you.