Skip to content

Releases: jsphuebner/stm32-sine

Small Fixes

07 Jan 17:31
Compare
Choose a tag to compare
  • Removed Prius MG1 detection, wasn't reliable
  • Added support for CAN scaling < 1. But now you cannot scale up more than 32!
  • FOC: running offset calibration continuously while idle -> smoother low speed operation
  • Custom charge PWM handling for Prius hardware (alpha, needs testing)
  • Bugfix in temp calc module when reaching lower limit of lookup table use minimum
  • Force precharge off in bootloader, also fixes Tesla misdetection

Prius charging

19 Nov 12:29
Compare
Choose a tag to compare
  • Added chargepwmin parameter for synchronous converters like Prius
  • Re-introduced offset calibration at standstill
  • Starting PWM before closing contactor (only Prius Gen2
  • Detecting MG1 MCU of dual motor Prius Gen3 board
  • Fixed sine manual mode
  • "json hidden" command prints all parameters including hidden ones

Many little things

17 Oct 21:35
Compare
Choose a tag to compare
  • Preparation for boot loader pin initialization
  • Added Toyota motor temperature sensor
  • Added tripmode "AutoResume" that will restart inverter 0.5 seconds after it tripped - do not use with FOC code!
  • Ramping up heat dissipation current to avoid controller overshoot
  • Improved initial current sensor offset calibration
  • Fixed spurious current offset warnings
  • Allowing 0 potmin/max again, ADC reading cannot drop below 0
  • Removed high rpm regen limit - it was a work around against high rpm trips which can be fixed with 0.3 regenramp
  • Changed injected sequence to sample first resolver channel twice instead of dummy pin - better noise behaviour
  • Do not update velocity info in single channel mode when difference in pulse length is > factor 2
  • Implement chargemax again
  • Fixed cruise control issue when off pedal regen is turned off
  • Fixed division by 0 error

v4.90.R

08 Sep 11:15
Compare
Choose a tag to compare
  • Tesla M3 mod board support
  • Fixed Leaf heat sink sensor unselectable
  • AC current limit code can be disabled by setting current limit to 0
  • Eliminate spurious over current warning
  • Fixed disabled regen when pot2 is not connected
  • Pull up emcystop on Prius hardware
  • Vary sign of field weakening controller gain with direction
  • Add parameter index to json output
  • Disallow negative throtcur

Convinience release

15 Jul 15:33
Compare
Choose a tag to compare
  • Removed parameters that don't need changing (and cause problems when changed)
  • Added "AlwaysForward" direction mode that defaults to forward unless reverse pin is high
  • Allow swapping PWM outputs 2 and 3
  • Allow dirchrpm up to 20000
  • Use latest libopencm3
  • Add special heat sink temperature code for Prius Gen2 power stage
  • Removed PWMSTUCK fault, it was too irritating

Tesla Temperature fixes, FOC improvements

19 May 19:08
Compare
Choose a tag to compare
  • Added support for driving "useless" current into the motor in order to heat up cabin in standstill
  • Added various temperature sensors
  • Hopefully fixed Tesla muxed temp sensor issues for good
  • Trying to mitigate false positive on LORESAMP
  • Fixed pin mapping issues, prevented start on Tesla boards
  • Simpler and apparently more effective speed/frequency calculation in resolver mode (same routine as AB encoder)
  • Seperate max regen setting for cruise control
  • Keep PWM enabled when there is id OR iq current request (smoother coast down)
  • CAN fixe for more than 3 received message IDs
  • Fixed possible over current trip on FOC startup
  • Added motor temperature derating
  • Added derating parameters for heatsink and motor
  • Do not read BMS input on Tesla hardware
  • Deleting timer capture buffer on standstill (single channel mode, caused startup trips)
  • Moved charge code to pwmgeneration module and using PI controller
  • The latter did achieve power factor up to 0.93 in boost charging mode
  • Recalibrate current sensor offset on every standstill
  • Added initial support for Prius board

Rev Limiter Fix, More filtering

22 Feb 16:00
Compare
Choose a tag to compare
  • Changes apply to sine and FOC version
  • Moved deraters behind throttle ramp so they take immediate action, not via ramp
  • Added filtering to rev limiting derater, otherwise it oscillated so much that over current trips would happen
  • FOC: Added filters before adaptive integral gain calculation and field weakening controller

FOC Improvements

06 Feb 11:26
Compare
Choose a tag to compare
  • Removed bus voltage based field weakening controller
  • Added frequency dependency of curki
  • Added throtmin parameter to be able to limit regen externally

Well working FOC

31 Jan 16:52
Compare
Choose a tag to compare

Finally I found the culprit of the misbehaving current regulators: they need very high integral gain!
This version removes all the kludges added to circumvent this fact and it sets the default of curki to 20000. If you're upgrading from an earlier version make sure to set curki to 20000.

Field Weakening, Cruise Control, Manual Mode

30 Jan 16:26
Compare
Choose a tag to compare
  • Added FOC manual mode: manually set id and iq. Use with extreme care, not motor speed limit!
  • Throttle ramp is now also applied to cruise control
  • Third id controller increases field weakening current if torque target isn't met