Page 1 of 1
Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 11:17 am
by johu
Just drafted a new release.
https://github.com/jsphuebner/stm32-sin ... ag/v4.90.R
- 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 (update web interface to take advantage of it)
- Disallow negative throtcur
To update web interface go to
https://github.com/jsphuebner/esp8266-web-interface
Download files "index.js" and "index.html" and upload them to your ESP8266 using the Update form at the top.
Re: Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 3:04 pm
by ManuFromParis
I was about to post my parameters on the previous 4.87R topic because of the disabled Regen issue, which did not work either on my car, even with the pot2min/max set at 1/10.
I'll try this update tonight and let you know.
Would you have an updated wiki definition for the new parameters brkhistr and brkhistp ?
thanks !
Re: Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 3:38 pm
by jon volk
Is it possible to add a throttle off slew rate? I remember a previous firmware had this hard coded in, but it was removed after complaints off throttle "lag" for lack of a better term. I am doing a bunch of mapping with various parameters over CAN to improve LDU driveability. At lower speed, a rapid off throttle movement can cause some surging. I am not sure if this is only due to my lack of pedal off regen, but it would be nice to be able to map throttle off ramp with pot value and rpm. If not, I can probably bludgeon my way through the firmware and adding some fixed values by looking at the old version.
I know, the masses are never happy

Re: Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 3:50 pm
by ManuFromParis
About the regen parameters, shall I leave pot2min/max with 1/10 ?
Or set them back with the default value, as before : 4095/4095 ?
Re: Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 4:47 pm
by ZooKeeper
Works as expected, no-load, on the Prius Gen2 + MGR

Re: Inverter Firmware v4.90.R
Posted: Tue Sep 08, 2020 8:05 pm
by ManuFromParis
It's working with me now, after Pololbricolo found out that my speedkp was wrong (0), so I corrected it with 0.25
Meaning : maybe it worked with previous version though (with "pot2min": 1, "pot2max": 10, )
Anyway, thanks a lot, I'm going fine tuning now !

Re: Inverter Firmware v4.90.R
Posted: Sun Sep 13, 2020 11:30 pm
by ChazFisher
Thanks, Johannes! Was the spurious currentlimit fault occuring when dcsw was commanding to close the main contactor?
Re: Inverter Firmware v4.90.R
Posted: Mon Sep 14, 2020 5:16 am
by arber333
I have this problem when i start my sine inverter with ACIM motor. First i get "pwmstuck" warning. Then OC if i try to start.
I tried to setup start with "single encoder", "AB encoder" and "resolver" option and its allways the same. OC event. I also tried to start via manual start and i see it shows the "run" indication, but immediately jumps to OC event.
My inverter hardware is setup to resolver signal.
If i use the FOC code programmed chip with the same circuit i can start, then apply some throttle and hear PWM as it loads the motor shaft. It wouldnt spin obviously siince it is ACIM motor and code is for PMSM, but i see some PWM and this is more than with sine code.
I tried to measure both sensor inputs and they are steady at 1.65V. I tried to measure comparator signal and all outputs are high as they should be. It seems that at the moment of starting main shutdown line turns low and so everything shuts down...
Anyone has similar problem? I use 4.90R code now...
Re: Inverter Firmware v4.90.R
Posted: Mon Sep 21, 2020 7:20 am
by arber333
It seems like i solved this problem by increasing oclimit???!!! Huh!
Next question i have is about the new SINE code with resolver.
How do we use "throtmax" and "throtmin" parameters? Is this used like single pedal drive with 0 throttle set in throttle/regen menu or is it applicable only for FOC code?
Re: Inverter Firmware v4.90.R
Posted: Sun Sep 27, 2020 11:32 am
by ManuFromParis
Hello,
I am in the process of setting CAN messages to drive the digital gauges we purchased.
Unfortunately, the speedo is waiting for a value in km/h and the gain value accepts only integer value (it seems) while I shall need to divide the "speed" value by 80 to have a direct km/h conversion, so a 0.0125 "gain" value.
Johannes, would it be possible to enhance this gain function in next release to allow decimal values, lower than 1 ?
That would be great !
Re: Inverter Firmware v4.90.R
Posted: Sun Sep 27, 2020 6:02 pm
by johu
Yes I've run into that issue myself
Re: Inverter Firmware v4.90.R
Posted: Sun Sep 27, 2020 7:07 pm
by ManuFromParis
johu wrote: ↑Sun Sep 27, 2020 6:02 pm
Yes I've run into that issue myself
So it raises the chances to find that enhancement in next release... :p
Thanks !