Inverter Firmware v4.85.R

Post Reply
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Inverter Firmware v4.85.R

Post by johu »

Here comes a big release, check it out:
  • 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
So definitely upgrade if you are on Tesla hardware, use FOC or use charge mode.

Binaries here: https://github.com/jsphuebner/stm32-sin ... ag/v4.85.R
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 728
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 328 times
Been thanked: 44 times
Contact:

Re: Inverter Firmware v4.85.R

Post by RetroZero »

Thanks Johu, don't know how you do it. 🙏
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v4.85.R

Post by yaroslav »

Thank you very much for your work
Martin1775
Posts: 43
Joined: Fri Nov 01, 2019 9:39 pm
Location: Ochtrup Germany

Re: Inverter Firmware v4.85.R

Post by Martin1775 »

Thank you very much Johannes,

the programming is beyond my means.

I had some problems with the new version. With the wifi interface it stops at the update that was very slow, so I had to use the programmer. Then it worked and showed the new parameters.

I've tried the Prius pinswap but it doesn't work for me with the straight connection. In manual mode it jumps as before with the interchanged current measurement inputs for l2 and l3. In normal mode the motor moves a few degrees and take current and that's it.

For the temp sensors it would be nice if I could use all sensors for inverter and motor, the MGR uses a 47k NTC in the motor.

Martin
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Inverter Firmware v4.85.R

Post by johu »

Thanks zippy500 for his "release donation" :)
Martin1775 wrote: Fri May 22, 2020 7:05 pm I had some problems with the new version. With the wifi interface it stops at the update that was very slow, so I had to use the programmer. Then it worked and showed the new parameters.
The firmware cannot affect the update process, so this must be down to something else.
Martin1775 wrote: Fri May 22, 2020 7:05 pm I've tried the Prius pinswap but it doesn't work for me with the straight connection. In manual mode it jumps as before with the interchanged current measurement inputs for l2 and l3. In normal mode the motor moves a few degrees and take current and that's it.
Yes always hard to figure out. Try to make a detailed drawing that shows the 3 PWM channels and the current sensor connected to each channel. Then make sure pwm1 is the channel sensed by il1, pwm2 sensed by il2 (possibly after pinswap).

Also the resolver has a number of permutations. The one supported by pinswap (sin/cos) but also the polarity (sin-, sin+ and cos-, cos+). Luckily I reused the original Leaf harness which has all that sorted, so I'm not very experienced in trying.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: Inverter Firmware v4.85.R

Post by SciroccoEV »

johu wrote: Sat May 23, 2020 10:49 am Try to make a detailed drawing that shows the 3 PWM channels and the current sensor connected to each channel. Then make sure pwm1 is the channel sensed by il1, pwm2 sensed by il2 (possibly after pinswap).
Just kind of musing to myself. Could you add a test sequence that would pair up the sensors with their phases.
If I remember rightly, some of this is to to with swapping phases to change motor rotation, perhaps a "motor rotation for forward" parameter option would be simpler.
Also the resolver has a number of permutations. The one supported by pinswap (sin/cos) but also the polarity (sin-, sin+ and cos-, cos+). Luckily I reused the original Leaf harness which has all that sorted, so I'm not very experienced in trying.
Resolver secondary coil phasing could also be swapped in software too couldn't it?
Martin1775
Posts: 43
Joined: Fri Nov 01, 2019 9:39 pm
Location: Ochtrup Germany

Re: Inverter Firmware v4.85.R

Post by Martin1775 »

Thanks Johannes,

today update was fine with wifi, I dont know what was wrong.

For the Prius/Yaris inverter with the Prius Gen 3 Inverter Logic Board from Damien, I used Damien's modified Firmware version from yesterday viewtopic.php?f=14&t=488&start=60#p11328 and it works with the board how he designed it.

The Prius Inverter measures the current on L1 and L3 so there L2 has to change with L3.

I thought I use the Lexus MGR connected as the MG2/MGR in the original Toyota/Lexus circuit diagram to the inverter, but afterwards I've seen that the Prius inverter have a different sequence than the Lexus inverter for the pins. I've set syncofs to 22100 so there is a phase shift, because it's around 120 degrees. What needs to be considered, the MG1 have a different wiring than the MG2/MGR.
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Inverter Firmware v4.85.R

Post by joromy »

johu wrote: Sat May 23, 2020 10:49 am
Yes always hard to figure out. Try to make a detailed drawing that shows the 3 PWM channels and the current sensor connected to each channel. Then make sure pwm1 is the channel sensed by il1, pwm2 sensed by il2 (possibly after pinswap).
Does it really matter what phase you put the current sensors on? (for ACIM motor)

I am making a new board, and it would be easier to put it on phase 1 and 3, but I will change it if there should be some problems with that.
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Inverter Firmware v4.85.R

Post by johu »

For sine software it does not matter at all.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Inverter Firmware v4.85.R

Post by damian.lo »

Hi,

I have in my conversion 2 independent CAN buses:
CAN#1: BMS - charger - DCDC
CAN#2: BMW - inverter board

For now I don't want to mix them to be sure, that I will be more sure to not block any traffic to safety equipment (maybe I'm wrong - what all You think?)
Because of this I have to put some arduino canbus shield to speak for example with instrument cluster and etc.
Johannes, is it possible to implement in next firmware some more CANbus data, like:
- fixed rpm at idle when DCSW is closed
- some data like You did in Your project stm32-car
https://github.com/jsphuebner/stm32-car
I tried to fight with this project, but since it's my first contact with Code::Blocks, result is evident :)
Or maybe You can little expand this project - comments for dummies?

Regards,
d.lo
Fierobsessed
Posts: 5
Joined: Wed Jul 24, 2019 8:42 pm
Location: Las Vegas, Nevada, USA
Contact:

Re: Inverter Firmware v4.85.R

Post by Fierobsessed »

Second on the comments for dummies thing. I've been writing a lot of code for my can interface device on the Arduino IDE, but I look at the code for the inverter and it just flies right over my head. Personally, I comment nearly every line (except for the obvious) on what I'm working on so I know why I did what I did, but looking at someone else's without heavy commenting is tough. But I'm still relatively fresh on this and haven't done C++ yet
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Inverter Firmware v4.85.R

Post by johu »

I am very very sparse with comments as a comment is already a redundancy. It expresses something that the line of code expresses as well. So I would much rather change the code to be more descriptive than adding comments.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Inverter Firmware v4.85.R

Post by konstantin8818 »

Interesting yet scary thing I've encountered today: if parameter "throtramp" contain a fractional number, there is an issue when vehicle accelerates on its own, but at the time throttle input is at 0% and pot value is lower then potmin parameter. If throtramp is integer, everything is OK.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Inverter Firmware v4.85.R

Post by johu »

Oh that sounds scary indeed. Will check it out
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Inverter Firmware v4.85.R

Post by konstantin8818 »

johu wrote: Mon Jun 29, 2020 8:08 pm Oh that sounds scary indeed. Will check it out
So I've tried to recreate this bug today, but it didn't showed up. May be this was a combination of parameters, and maybe it's because all my signal and HV wires are not screened and crossing. It might be just radio interference.

Update.
It showed up. It is not depending on fractional digits. This is what parameters look like when it appeared:
Screenshot_20200630-155031_Chrome.jpg
Screenshot_20200630-154511_Chrome.jpg
Screenshot_20200630-154519_Chrome.jpg
Screenshot_20200630-154539_Chrome.jpg
So pot value is below potmin. But at same time throttle input is 100 percent.
Screenshot_20200630-154726_Chrome.jpg
Only disabling the board resets this bug.
Post Reply