📢 SimpleFOClibrary v2.3.1 release

Pleased to announce the release 2.3.1 of SimpleFOC!

:loudspeaker: SimpleFOClibrary v2.3.1

  • Support for Arduino UNO R4 Minima (Renesas R7FA4M1 MCU - note UNO R4 WiFi is not yet supported)
  • Support setting PWM polarity on ESP32 (thanks to @mcells)
  • Expose I2C errors in MagneticSensorI2C (thanks to @padok)
  • Improved default trig functions (sine, cosine) - faster, smaller
  • Overridable trig functions - plug in your own optimized versions
  • Bugfix: microseconds overflow in velocity mode #287
  • Bugfix: KV initialization (5fc3128)
  • And more bugfixes - see the complete list of 2.3.1 fixes here
  • Change: simplify initFOC() API (d57d32d. 5231e5e, 10c5b87)
  • Change: check for linked driver in currentsense and exit gracefully (5ef4d9d)
  • Compatibility with newest versions of Arduino framework for STM32, Renesas, ESP32, Atmel SAM, Atmel AVR, nRF52 and RP2040

Please let us know if you find any problems in the usual ways, here on the forum or via GitHub.

10 Likes

Lots of good stuff!

But I think the kv sqrt2 multiply should be done in the bemf calculation on line 398. It’s confusing when you print out the kv and find the value has been changed from what you specified in the constructor, or change it on the fly when tuning and don’t know to do the multiply yourself. There’s already a division by the _RPM_TO_RADS constant there, so multiplying by another constant won’t have any performance penalty.

1 Like

@runger:

Thank you all for the hard work, this is awesome!

Cheers,
Valentine

1 Like

What a coincidence, I’m in the process of creating an nRF52 development board, for a separate project, if there are any takers, I’m curios to hear your input. Anyone else tried nRF52?

Cheers,
Valentine

1 Like

I’ve run SimpleFOC recently on the Arduino Nano BLE, which is a Nordic based board. Unfortunately the PlatformIO support for the nRF52 seems to be out of commission at the moment, which took me a while to figure out. But on ArduinoIDE it worked in the end.

1 Like