Page 29 of 37

Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 10, 2020 5:45 am
by RetroZero
I would say yes, but I haven't uploaded latest version

Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 10, 2020 10:08 am
by Pcstreet
Thanks for the reply look forward to hearing your progress on charging and maybe YouTube video of it.

Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 10, 2020 1:30 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Thu Nov 12, 2020 9:44 pm
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

Re: Prius Gen2 adapter board development thread

Posted: Thu Nov 12, 2020 10:24 pm
by johu
If manualid causes rotation you haven't set up syncofs correctly. Also set deadtime to 0.


Re: Prius Gen2 adapter board development thread

Posted: Fri Nov 13, 2020 1:32 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 17, 2020 5:55 pm
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.


Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 17, 2020 6:30 pm
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.


Re: Prius Gen2 adapter board development thread

Posted: Tue Nov 17, 2020 7:32 pm
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

Re: Prius Gen2 adapter board development thread

Posted: Wed Nov 18, 2020 3:51 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Wed Nov 18, 2020 4:01 pm
by johu
Looks much better :)

Re: Prius Gen2 adapter board development thread

Posted: Wed Nov 18, 2020 8:36 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Mon Dec 14, 2020 12:28 pm
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

Re: Prius Gen2 adapter board development thread

Posted: Mon Dec 14, 2020 11:37 pm
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

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 5:03 pm
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?

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 6:09 pm
by ZooKeeper
Maybe "throtcur" is too high? I interpreted throtcur=1 as "1% = 1A", so 33% = 33A, but that might not be accurate.

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 6:24 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 9:46 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 9:50 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 9:54 pm
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?

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 22, 2020 9:55 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Thu Dec 24, 2020 9:59 am
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

Re: Prius Gen2 adapter board development thread

Posted: Thu Dec 24, 2020 11:09 am
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.

Re: Prius Gen2 adapter board development thread

Posted: Thu Dec 24, 2020 9:34 pm
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.

Re: Prius Gen2 adapter board development thread

Posted: Fri Dec 25, 2020 7:28 pm
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.