Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I would say yes, but I haven't uploaded latest version
Pcstreet
Posts: 27
Joined: Fri Oct 09, 2020 7:32 pm

Re: Prius Gen2 adapter board development thread

Post by Pcstreet »

Thanks for the reply look forward to hearing your progress on charging and maybe YouTube video of it.
Pcstreet
Posts: 27
Joined: Fri Oct 09, 2020 7:32 pm

Re: Prius Gen2 adapter board development thread

Post by Pcstreet »

My gen2 inverter settings running a toyota mgr. I have looked for Damiens settings for the gen2 from the tuning video which he said he was going to post but cannot find them as I was going to post there.
Attachments
GEN2MGRBENCH1.json
(1.25 KiB) Downloaded 129 times
vin
Posts: 54
Joined: Mon Oct 26, 2020 3:05 am
Been thanked: 3 times

Re: Prius Gen2 adapter board development thread

Post by vin »

Throttle pedal can accelerate but not decelerate.

When I press down no my pedal, the motor starts up but stay at a particular speed and will not shutdown until I stop the inverter.

Has anyone come across this?



4.94.R-FOC


Hear are my parameters for my Gen 2 inverter Gen 3 Transaxle.

{
"curkp": 32,
"curki": 20000,
"curkifrqgain": 50,
"fwkp": -100,
"dmargin": -2000,
"syncofs": 10200,
"polepairs": 4,
"respolepairs": 2,
"encmode": 4,
"fmax": 500,
"numimp": 256,
"dirchrpm": 2000,
"dirmode": 4,
"snsm": 16,
"pwmfrq": 2,
"pwmpol": 0,
"deadtime": 63,
"ocurlim": 100,
"il1gain": 3.06,
"il2gain": 3.06,
"udcgain": 6.15,
"udcofs": 0,
"udclim": 540,
"snshs": 0,
"pinswap": 5,
"bmslimhigh": 50,
"bmslimlow": -1,
"udcmin": 0,
"udcmax": 520,
"idcmax": 5000,
"idcmin": -5000,
"tmphsmax": 150,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargemax": 90,
"potmin": 600,
"potmax": 4059,
"pot2min": 0,
"pot2max": 0,
"potmode": 0,
"throtramp": 0.43,
"throtramprpm": 20000,
"throtcur": 1,
"brknompedal": -20,
"regenramp": 1,
"brknom": 20,
"brkmax": -15,
"brkcruise": -15,
"brkrampstr": 10,
"brkout": -50,
"idlespeed": -100,
"idlethrotlim": 50,
"idlemode": 3,
"speedkp": 0.25,
"speedflt": 5,
"cruisemode": 2,
"udcsw": 0,
"udcswbuck": 540,
"tripmode": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
}
Thanks in advance
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

If manualid causes rotation you haven't set up syncofs correctly. Also set deadtime to 0.

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

vin wrote: Thu Nov 12, 2020 9:44 pm Throttle pedal can accelerate but not decelerate.

When I press down no my pedal, the motor starts up but stay at a particular speed and will not shutdown until I stop the inverter.

Has anyone come across this?
Yes I have and as Johu suggested, syncoff is incorrect.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
vin
Posts: 54
Joined: Mon Oct 26, 2020 3:05 am
Been thanked: 3 times

Re: Prius Gen2 adapter board development thread

Post by vin »

ZooKeeper wrote: Fri Nov 13, 2020 1:32 pm
vin wrote: Thu Nov 12, 2020 9:44 pm Throttle pedal can accelerate but not decelerate.

When I press down no my pedal, the motor starts up but stay at a particular speed and will not shutdown until I stop the inverter.

Has anyone come across this?
Yes I have and as Johu suggested, syncoff is incorrect.


Thanks for your suggestions guys, I think I've made some progress, but still having strange problems.

After a certain level of acceleration, the motor looses control and can only be stopped by stopping the inverter. I can now control the motor speed at very low RPM with the throttle pedal however this as at a very low, slight amount of pressure on the throttle.

User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

vin wrote: Tue Nov 17, 2020 5:55 pm Thanks for your suggestions guys, I think I've made some progress, but still having strange problems.

After a certain level of acceleration, the motor looses control and can only be stopped by stopping the inverter. I can now control the motor speed at very low RPM with the throttle pedal however this as at a very low, slight amount of pressure on the throttle.
Yup, syncoff setting is still not correct. I presume you have watched Damien's video on the subject, it REALLY explains the idea well.

Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Have you upgraded to the latest software? We had this problem when testing the motor in reverse. As a test try setting fwkp=0
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
vin
Posts: 54
Joined: Mon Oct 26, 2020 3:05 am
Been thanked: 3 times

Re: Prius Gen2 adapter board development thread

Post by vin »

johu wrote: Tue Nov 17, 2020 7:32 pm Have you upgraded to the latest software? We had this problem when testing the motor in reverse. As a test try setting fwkp=0
Thanks Johu

Just to say, With regards to the setting of Syncofs, I did not realise that there could be multiple troughs, and was fooled into thinking I had the right one. I'm making some progress.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Looks much better :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

vin wrote: Wed Nov 18, 2020 3:51 pm Just to say, With regards to the setting of Syncofs, I did not realise that there could be multiple troughs, and was fooled into thinking I had the right one. I'm making some progress.
That is a VERY good point and you are right! I thought 22k was "it", until I re-ran everything and ended up at about 1/2 of that, 10975.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
vin
Posts: 54
Joined: Mon Oct 26, 2020 3:05 am
Been thanked: 3 times

Re: Prius Gen2 adapter board development thread

Post by vin »

Inverter Shuts Down When Under Load.

Has anyone come across this?

When apply throttle without a load, the motor spins up and can get up to 6000+ RPM. However if I apply load to the motor very gently, I get movement, however if I apply the slightest jerk of energy to the throttle, the inverter goes into Opmode OFF.

Any help would be appreciated.

My parameters are as follows.

curkp": 32,
"curki": 20000,
"curkifrqgain": 50,
"fwkp": -100,
"dmargin": -2000,
"syncofs": 55000,
"polepairs": 4,
"respolepairs": 2,
"encmode": 4,
"fmax": 500,
"numimp": 256,
"dirchrpm": 2000,
"dirmode": 1,
"snsm": 13,
"pwmfrq": 2,
"pwmpol": 0,
"deadtime": 0,
"ocurlim": 100,
"il1gain": 3.06,
"il2gain": 3.06,
"udcgain": 6.15,
"udcofs": 327,
"udclim": 540,
"snshs": 0,
"pinswap": 5,
"bmslimhigh": 50,
"bmslimlow": -1,
"udcmin": 0,
"udcmax": 520,
"idcmax": 5000,
"idcmin": -5000,
"tmphsmax": 150,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargemax": 90,
"potmin": 1200,
"potmax": 2600,
"pot2min": 0,
"pot2max": 0,
"potmode": 0,
"throtramp": 40,
"throtramprpm": 20000,
"throtcur": 1,
"brknompedal": 0,
"regenramp": 0.28,
"brknom": 20,
"brkmax": -15,
"brkcruise": -15,
"brkrampstr": 10,
"brkout": -50,
"idlespeed": -100,
"idlethrotlim": 80,
"idlemode": 3,
"speedkp": 1,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 0,
"udcswbuck": 540,
"tripmode": 3,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

My last saved are below as a reference, Prius Gen2 + Lexus MGR. I will try and highlight what I think might be any important differences.

"curkp": 32,
"curki": 20000,
"curkifrqgain": 50,
"fwkp": -100,
"dmargin": -2000,
"syncofs": 9700,
"polepairs": 4,
"respolepairs": 2,
"encmode": 4,
"fmax": 400,
"numimp": 16,
"dirchrpm": 50,
"dirmode": 1,
"snsm": 14,
"pwmfrq": 1,
"pwmpol": 0,
"deadtime": 0,
"ocurlim": 50,
"il1gain": 3.15,
"il2gain": 3.15,
"udcgain": 3.75,
"udcofs": 327,
"udclim": 250,
"snshs": 0,
"pinswap": 5,
"bmslimhigh": 50,
"bmslimlow": -10,
"udcmin": 6,
"udcmax": 320,
"idcmax": 10,
"idcmin": -40,
"tmphsmax": 120,
"tmpmmax": 100,
"throtmax": 100,
"throtmin": -5,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargemax": 90,
"potmin": 775,
"potmax": 3900,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 0,
"throtramp": 0.84,
"throtramprpm": 6500,
"throtcur": 1,
"brknompedal": -50,
"regenramp": 0.53,
"brknom": 0,
"brkmax": -5,
"brkcruise": -30,
"brkrampstr": 20,
"brkhistr": 1000,
"brkhistp": 1000,
"brkout": -10,
"idlespeed": 0,
"idlethrotlim": 0,
"idlemode": 3,
"speedkp": 0.25,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 8,
"udcswbuck": 8,
"tripmode": 2,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

I have a very similar problem to vin. I have now got an MGR mounted in my car and driving the wheels. If I’m gentle with the throttle with the wheels off the ground I can spin up to 6000rpm. However, I can’t move the car at all, I just get some jerky movement and then an overcurrent trip. Watching the current plots suggests that none of the current values are exceeding 25A when the trip occurs, although there is a fair bit of noise on the graph. The DC current is only an amp or two.

I did get some overcurrent trips when trying to set syncofs in manual mode too so I’m not 100% confident that I have this right although it appears to be very similar to what others have found on the MGR (~11000).

With the FOC software, how does the overcurrent trip work? What value sets the current limit?

I noticed the ocurlim parameter is hidden, I presume this is because it isn’t used?
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

Maybe "throtcur" is too high? I interpreted throtcur=1 as "1% = 1A", so 33% = 33A, but that might not be accurate.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

ZooKeeper wrote: Tue Dec 22, 2020 6:09 pm Maybe "throtcur" is too high? I interpreted throtcur=1 as "1% = 1A", so 33% = 33A, but that might not be accurate.
I tried altering that. It actually felt a bit better when I increased it but I still had the same overcurrent problem.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

tom3141 wrote: Tue Dec 22, 2020 5:03 pm With the FOC software, how does the overcurrent trip work? What value sets the current limit?

I noticed the ocurlim parameter is hidden, I presume this is because it isn’t used?
Indeed on the Prius boards there is no over current comparator like on other boards. It relies solely on the over current detection inside the Prius inverter. So if you are presented with over current it actually means the Prius inverter signalled that. OR: there is noise MFIV. You can disconnect MFIV and tie the according pin to 12V. It's not gonna do any harm, the inverter will simply ignore the PWM on overcurrent.

If that helps you could increase C1 to 10nF or even 100nF.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

johu wrote: Tue Dec 22, 2020 9:46 pm
Indeed on the Prius boards there is no over current comparator like on other boards. It relies solely on the over current detection inside the Prius inverter. So if you are presented with over current it actually means the Prius inverter signalled that. OR: there is noise MFIV. You can disconnect MFIV and tie the according pin to 12V. It's not gonna do any harm, the inverter will simply ignore the PWM on overcurrent.

If that helps you could increase C1 to 10nF or even 100nF.
Thanks, that’s really helpful! I will give that a try.
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

Just to clarify, you mean to put 12v onto pin 27 of the openinverter VCU so that the pin is permanently high? I guess the Prius inverter pulls that low when there is a fault?
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

tom3141 wrote: Tue Dec 22, 2020 9:54 pm Just to clarify, you mean to put 12v onto pin 27 of the openinverter VCU so that the pin is permanently high? I guess the Prius inverter pulls that low when there is a fault?
Yes exactly. Disconnect the Prius pin.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
vin
Posts: 54
Joined: Mon Oct 26, 2020 3:05 am
Been thanked: 3 times

Re: Prius Gen2 adapter board development thread

Post by vin »

tom3141 wrote: Tue Dec 22, 2020 5:03 pm I have a very similar problem to vin. I have now got an MGR mounted in my car and driving the wheels. If I’m gentle with the throttle with the wheels off the ground I can spin up to 6000rpm. However, I can’t move the car at all, I just get some jerky movement and then an overcurrent trip. Watching the current plots suggests that none of the current values are exceeding 25A when the trip occurs, although there is a fair bit of noise on the graph. The DC current is only an amp or two.

I did get some overcurrent trips when trying to set syncofs in manual mode too so I’m not 100% confident that I have this right although it appears to be very similar to what others have found on the MGR (~11000).

With the FOC software, how does the overcurrent trip work? What value sets the current limit?

I noticed the ocurlim parameter is hidden, I presume this is because it isn’t used?

Hi Tom, I changed my throtramp to be 0.5 and it makes a difference. Not sure whether this would be a permanent solution, as it significantly drops the acceleration from a start of point, however it gives you movement with load. I haven’t tried Johannes’ recommendation as yet because as you rightly said, amperage doesn’t even hit 25A
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

I have just tried Johannes suggestion so that I now have pin 27 (MFIV) connected permanently to 12v. I’m still having exactly the same issue. Overcurrent error with any load. I’ve tried lowering the throtramp and regenramp right down but it doesn’t help.

If an overcurrent error can only come from the Prius, I’m confused as to how I’m still getting an error!

I’ve watched the din_ocur value and it doesn’t change from 1 when it trips.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

Tom, unless I misunderstood what was written, the VCU pin 27 gets pulled high and DISconnect it from the Prius Inverter pin 27. You may have done exactly that.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: Prius Gen2 adapter board development thread

Post by tom3141 »

ZooKeeper wrote: Thu Dec 24, 2020 9:34 pm Tom, unless I misunderstood what was written, the VCU pin 27 gets pulled high and DISconnect it from the Prius Inverter pin 27. You may have done exactly that.
I have completely disconnected the wire between the Prius inverter and VCU pin 27. I have connected pin 27 on the VCU permanently to 12v. The Prius MFIV output is not connected to anything.

As far as I understand from what Johannes said, the MFIV output is the only thing that should cause an overcurrent fault on the VCU.
Post Reply