Page 1 of 2

Inverter Firmware v4.94.R

Posted: Sat Oct 17, 2020 9:46 pm
by johu
Release time :)

https://github.com/jsphuebner/stm32-sin ... ag/v4.94.R
  • 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 - again
  • 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
I have also released a bootloader that processes the pin init table. Updating to this boot loader is only necessary if you have problems like this: viewtopic.php?f=10&t=1086

To interface to the Prius motor temperature sensor, you have to make slight changes to the board: viewtopic.php?f=14&t=1087 . Thanks bexander for this contribution!

I added the "AutoResume" mode because Polo has become overly sensitive to over current or it detects over current when there isn't any. Maybe the shield from the current sensor came off (it was soldered) or I'm having a moisture problem. Anyway, the way it works, as soon as the inverter trip it will wait at least 0.5s and then, once you come OFF the throttle it automatically restarts. Also in this mode the DC switch is no longer opened when tripping.

Use this mode with care and do not use it with FOC code as it cannot start into a spinning motor and the inverter would trip again and again - unhealthy!

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 7:47 am
by ManuFromParis
Great !
have you had time to allow <1 ratio for CAN messages definition as well ?

I'm desperate to use my Tachometer with the Speed value... :D

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 8:59 am
by johu
Argh, no sorry! Next release. Still wondering how to transition so that people don't have to reconfigure all their CAN messages.

EDIT: no wonder god built the world in 7 days, he didn't have to build upon a legacy base.

BTW, to all synchronous FOC fanboys: Fixing the offset problem did not only remove the stuttering near standstill but it also decreased consumption and motor noise! So very much recommend the update.

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 10:25 am
by RetroZero
Thanks Johannes!!!!

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 3:18 pm
by ManuFromParis
johu wrote: Mon Oct 26, 2020 8:59 am Argh, no sorry! Next release.
Still wondering how to transition so that people don't have to reconfigure all their CAN messages.
OK. :cry:

BTW, is there a utility to save/restore the CAN definition to a specific file ?
It might be interesting anyway.

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 4:47 pm
by johu
Well for now you can execute custom command "can print". That gives you the can commands that you can play back later. Line by line, maybe a "script function would be nice.
And there is always the possibility to download the second-to-last flash page which stores the CAN definitions

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 5:44 pm
by jon volk
Is there any way to link it all into the JSON file? That would actually be interesting for me trying to work with some folks remotely on tuning. It would be nice to trade a JSON back and forth and modify the parameters in that for ease of loading.

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 6:26 pm
by johu
Actually http://192.168.4.1/cmd?cmd=json has everything in it, you just can't play it back

EDIT: if you do this often, maybe this is for you: viewtopic.php?f=5&t=937
You just need to set up some server infrastructure.

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 8:08 pm
by ZooKeeper
NICE!

The only odd thing thus far is tmpm = 200* :o

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 9:17 pm
by johu
When setting it to Prius motor temp sensor? If so, I forgot to link to changes in component values: viewtopic.php?f=14&t=1087

Re: Inverter Firmware v4.94.R

Posted: Mon Oct 26, 2020 10:11 pm
by ZooKeeper
Yup, I had not implemented hardware changes with the corresponding software update. Now for some quality time with HAKKO ;)

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 9:58 am
by Leo M
Hello everybody! I would like to get the recovery adjustment when the accelerator pedal is reset in the next release. I would like to adjust from 0-50%))) in single-pedal mode. I don't know how well I made the request clear))) is this possible? With respect to Studio Work.

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 10:07 am
by johu
Sorry I don't understand a word. How do you reset a pedal? What do you want to recover from?

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 10:09 am
by Leo M
For a better understanding of my question-- I would like the firmware to have timebrake and timeaksel options

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 10:13 am
by Leo M
Terrible translation! )))) when resetting the pedal-you need to make the recovery equal to 0.

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 10:25 am
by Leo M
My problem:- with a sharp drop of carrion from high speeds, the motor very quickly switches to recovery mode - the rotor has no inertia and stops almost instantly. Reset-hit! Adjust the settings in the interface does not work (((maybe I'm doing something wrong?

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 8:06 pm
by ZooKeeper
Leo M wrote: Fri Oct 30, 2020 10:25 am My problem:- with a sharp drop of carrion from high speeds, the motor very quickly switches to recovery mode - the rotor has no inertia and stops almost instantly.
LOL, translation fun :) Too much regen causing trip-out (I think).
Reset-hit! Adjust the settings in the interface does not work (((maybe I'm doing something wrong?
Reset the VCU and you can drive again, but cannot find the right settings to make the trip-out stop (I think).

Are you using the "FOC" or "SIN" version?

Re: Inverter Firmware v4.94.R

Posted: Fri Oct 30, 2020 9:17 pm
by Leo M
FOC. The problem is not with disconnecting , but with too much recovery when the accelerator pedal is released quickly. The controllers I worked with had the TimeBrake option. You can use this Setting to adjust the recovery ramp-up time when the accelerator pedal value decreases. I don't know how to translate ) my English is very bad ))) :D

Re: Inverter Firmware v4.94.R

Posted: Sat Oct 31, 2020 7:08 am
by bexander
Maybe adjusting the throtramp and specially the regenramp values as per johu:s recommendations may help.
viewtopic.php?f=11&t=912&start=25#p18397

Re: Inverter Firmware v4.94.R

Posted: Sat Oct 31, 2020 12:06 pm
by Leo M
Thanks. I will try.

Re: Inverter Firmware v4.94.R

Posted: Sat Oct 31, 2020 1:52 pm
by Leo M
Please tell me what it means— Overcurrents. ? As I understand it, this is an overcurrent. What parameter is used for adjustment?

Re: Inverter Firmware v4.94.R

Posted: Sat Oct 31, 2020 1:56 pm
by johu
Over current means too much current into your motor. There are usually two limits: ocurlim and protection function of gate driver.
regenramp=0.3 should solve your problem

Re: Inverter Firmware v4.94.R

Posted: Sat Oct 31, 2020 2:01 pm
by Leo M
Thank you very much Johu . Iregenramp=0.3 - tried doesn't help...

Re: Inverter Firmware v4.94.R

Posted: Mon Nov 02, 2020 1:25 am
by ZooKeeper
johu wrote: Mon Oct 26, 2020 9:17 pm When setting it to Prius motor temp sensor? If so, I forgot to link to changes in component values: viewtopic.php?f=14&t=1087
I completed the resistor changes (R16 = 2k2, R21 = 1k1) and tied pins 13 & 14 together and got a more rational mtemp of 101*C. Since higher resistance = lower mtemp, I also played with adding some small resistance on the mtemp (-) circuit and I did not improved the readings further.

As presumed, the mtemp readings are representative at temps near 100*C +/- and that is good :)

Re: Inverter Firmware v4.94.R

Posted: Mon Nov 02, 2020 8:42 am
by bexander
ZooKeeper wrote: Mon Nov 02, 2020 1:25 am
johu wrote: Mon Oct 26, 2020 9:17 pm When setting it to Prius motor temp sensor? If so, I forgot to link to changes in component values: viewtopic.php?f=14&t=1087
I completed the resistor changes (R16 = 2k2, R21 = 1k1) and tied pins 13 & 14 together and got a more rational mtemp of 101*C. Since higher resistance = lower mtemp, I also played with adding some small resistance on the mtemp (-) circuit and I did not improved the readings further.

As presumed, the mtemp readings are representative at temps near 100*C +/- and that is good :)
R21 should be 1k2, not 1k1.
How is your temp sensor connected? Should be connected from either pin 13 or 14 and then to GND.
You should be able to read normal room temperature when motor is at room temperature. 100 degree at room temperature means something is not correct.