Releases: jsphuebner/stm32-sine
v5.35.R
- Speed dependent regen pedal travel, use maxregentravelhz
- Bugfix i3 hardware
- Support pin swap (only PWM channels) in sine firmware also
- Improved sampling of analog values (use second ADC)
- Added limiter cruise mode
- Fix terminal problems causing lockup or even watchdog reset
- On Prius inverters ignore break signal when ocurlim==-1
- More reliable pressed throttle detection
- Smoother over temperature derating
- Limit potmax to 3500 to prevent using over range pedal connection
- Add uptime counter, can be used as CAN alive counter
- In SINE firmware filter idc for smoother battery current derating
Safety Release
This release strives to improve safety. It will make some things slightly harder, read on
- Potential bug fix in scheduler
- Throttle/torque limit for cruise control
- Cruise control mode "button" removed because it cannot be cancelled if brake pedal switch fails
- Brake pedal check at startup if cruise control is used
- Cruise control only works when forward direction is selected, i.e. din_forward is high (use SwitchReversed if for your setup reverse is actually forward)
- When sending cruise rpm preset via CAN din_cruise must also be activated
- Explicitly Force 0 throttle when switching to neutral
- Safety critical control parameters now have a fixed mapping in one message with sequence and optional CRC check and can no longer be freely mapped. Your custom mapping will be deleted when running this software
- In FOC ramp down field weakening when rpm limit is surpassed by 10%
- Traction control added
- Fixed in CAN SDO json printing
- New way of mapping values to CAN via SDO
- Legacy terminal commands (list, atr, help, all) removed
- Dodgy speed frequency output removed (until someone complains)
- Display rotor direction and selected direction separately
- Allow switching from neutral into rotor direction
Many small fixes
When upgrading to this version your canspeed will be off by one, as the new speed 125k has been added. You need to manually set it to the desired speed again.
As always there is the possibility of overspeeding the motor especially when it's unloaded. Set fwcurmax=0 for unloaded tests.
- Removed ManualMode in FOC, now always adding manualid and manualiq to controller calculated values
- Added manualstart parameter, has the same effect as pulling start pin high
- Don't apply backwards regen if motor is already turning backwards
- Make sine output filter "filterConst" a configurable value "sinefilter"
- Improve ilMax calculation
- Add an option to scale voltage and slip simultaneously with throttle
- CAN mapping is now more flexible:
- gain factor is now in floating point format, no more awkward multiplication by 32 for RX items
- More than 8 items can be mapped to one message
- An optional offset can be added between -128 to 127
- Make maximum modulation index variable to allow over modulation
- Bugfix: tmpm and tmphs were unfiltered
- Added separate proportional gain parameter for id-controller
- Scale creep torque with inverse brake pressure (if brake pedal configured)
- Corrected ids of id/iq to make it mappable to CAN
The actual ultimate field weakening release
While the least release was meant to finally fix high speed related errors this one actually does, tested on many cars.
Details:
- Removed curkifrqgain, it seems no longer needed and creates confusion
- Added binstream command (binary streaming of real time data)
- PWM overflow fix in FOC implementation
- Limit iq at the same rate that ifw is ramped up
- Limit id MTPA at the half the rate that ifw is ramped up
- Replaced field weakening controller with simple IIR filter which is smoother
- Do not disable PWM when stationary with Prius inverter
The ultimate field weakening release
Long time, no release!
This release adds some bells and whistles but most of all it seems to fix all unwanted regen, unwanted acceleration and trip outs when operating at high motor speeds. Highly recommended for all sync motor/FOC users.
Many things have been added:
- Hill hold functionality
- Bidirectional throttle support, throttle sets torque and direction (e.g. for boats)
- Throttle speed mode, throttle sets speed rather than torque (also for boats)
- Regen parameters received hopefully more intuitive names
- Pull down PWM pins already in bootloader when active high PWM selected
- Never run idle speed controller in off mode, caused some issue, don't remember which one
- Less ADC averaging in FOC mode for better transient response
- MTPA motor variables are now parameters
- Field weakening is now based on around limiting PWM amplitude
- Torque command is limited in field weakening mode
- Improved PI controller anti-windup
Unwanted Regen Fix
- Using filtered frequency to calculate syncadv
- Fixed bug with regen ramp
- Also downramping throttle with throtramp
- no longer limit d-controller output to half amplitude. Can cause unwanted regen
- Removed unused hardware variants
Bugfix of 5.11.R - change log repeated
- Fixed integer overflow in temperature sensing
- Added Epcos temp sensor
- Fixed filter rounding error in SetTorquePercent
- Fixed misinterpretation of pot2 configuration (would result in no regen)
- Limiting q and d controller outputs to sane values to avoid stuttering and over current trips
- First save CAN map then parameters to be compatible with 2k flash pages
- Dynamically switch over to BMW i3 SPI comms when so configured
- Boot loader pin commands changed to new semantics
- Fix FOC current offset calibration
- Adding support for outlander front motor temp sensor
- Using float math for slow functions (should make no functional difference, just easier to maintain)
- Bugfix temperature derating
- Clearing precharge output after some delay of closing DC switch
- Added Jon Volk mods for ACIM
- Removed M3 detection for now, detected Prius MG1 MCU as Tesla
- Support precharge during bootloader
- Remove heatcurrent code
- Do not disable PWM in neutral gear (would cause over current when enabling again)
- Added ffwstart parameter which defines where field weakening controller starts to ramp up
Many FOC improvements (and sine, too!)
- Limiting q and d controller outputs to sane values to avoid stuttering and over current trips
- First save CAN map then parameters to be compatible with 2k flash pages
- Dynamically switch over to BMW i3 SPI comms when so configured
- Boot loader pin commands changed to new semantics
- Fix FOC current offset calibration
- Adding support for outlander front motor temp sensor
- Using float math for slow functions (should make no functional difference, just easier to maintain)
- Bugfix temperature derating
- Clearing precharge output after some delay of closing DC switch
- Added Jon Volk mods for ACIM
- Removed M3 detection for now, detected Prius MG1 MCU as Tesla
- Support precharge during bootloader
- Remove heatcurrent code
- Do not disable PWM in neutral gear (would cause over current when enabling again)
- Added ffwstart parameter which defines where field weakening controller starts to ramp up
Big FOC fix
- Fixed anti-windup issue, this could cause very strong unwanted regen in the upper speed range - SAFETY CRITICAL!
- Improved idc filtering for smoother DC current limiting
- add a parameter 'sincosofs' - this is the midpoint reading of a sin/cos encoder output, removing the requirement for a precise 1.65V midpoint and resistor divider if using, for example, a sin/cos chip that doesn't work on 3.3V VCC (MLX91204 requires 5V)
- Obey DC voltage limit in boost mode
- Disallowed saving parameters in run mode
- Added support for BMW i3 gate driver board SPI ADC
- Changed ADC sample time to 7.5 clocks
- Taking 8 samples from last PWM period instead of 3
- Rotor movement compensation becomes active above 10 Hz
- Auto-detect flash size and write parameters to according address
v5.00.R
- Allow running booster from user PWM channel at 8k8 Hz
- Allow setting nodeid for SDO messages and also for terminal
- Allow only enabling terminal with certain node id (meant for dual motor boards)
- Corrected FOC idc calculation to allow meaningful DC current limits