Page 30 of 37

Re: Prius Gen2 adapter board development thread

Posted: Fri Dec 25, 2020 8:28 pm
by johu
Yes, you got that alright. So PB12 or both ends of R50 should be solidly at 5V.

Re: Prius Gen2 adapter board development thread

Posted: Fri Dec 25, 2020 9:39 pm
by tom3141
johu wrote: Fri Dec 25, 2020 8:28 pm Yes, you got that alright. So PB12 or both ends of R50 should be solidly at 5V.
Sorry, I’m not quite following what you mean by this. Are you suggesting that I check that PB12/R50 is at 5V when I have 12v applied to pin 27?

With it set up as I described in my last post I’m still getting over current errors even though din_ocur never changes from a value of 1 according to the web interface.

Re: Prius Gen2 adapter board development thread

Posted: Sat Dec 26, 2020 3:07 pm
by tom3141
I've checked the voltage at R50 and it is solid at 5.4V. It doesn't change when I get an overcurrent error. This is measured with a multimeter not a scope so I can't check if there are any sudden drops/spikes but I assume that this should drop to 0 if there's an overcurrent error and stay there until reset.

I'm very confused! There's a possibility that I have noise (some of the signal cables are too long and not shielded) or parameters wrong (I have syncofs close but it may not be fine tuned because I kept getting overcurrent errors when tuning this in manual mode too). However it doesn't explain how I can still be getting overcurrent errors with MFIV disconnected.

Any ideas? Any help is much appreciated!

Thanks,

Tom

Re: Prius Gen2 adapter board development thread

Posted: Mon Dec 28, 2020 3:45 pm
by tom3141
I've done some more testing this afternoon.

I decided to eliminate as much of the car's 12v system as possible and go back to how I was running it on the bench so I used a power supply and bypassed the DC-DC and 12v battery. Still have the same problem, as soon as there is any kind of load on the motor I get an overcurrent trip.

I then decided to investigate the MFIV line further. At the prius side it is permanently at 6.75V. The interesting discovery was that if I removed the 12v from pin 27 of the VCU then I get a DESAT error not the OVERCURRENT error that I'm having a problem with.

It seems to me that there must be some other signal/bit of code that is triggering the overcurrent trip. I've looked through the forums and documentation but struggling to find out exactly how the overcurrent works with the FOC/Prius hardware.

Re: Prius Gen2 adapter board development thread

Posted: Mon Dec 28, 2020 4:03 pm
by johu
I'm surprised at even does anything with pin 27 not pulled up.
So the main trigger for all faults is TIM1_BKIN aka PB12. On Prius hardware that is expected high when all is well, which you've verified.
When it goes low, the firmware will sample various inputs and post an according error message. On Prius there is only DESAT but when it finds that pin high at the instant that PB12 is low it will fall back to OVERCURRENT instead.
Hmm. what is the value of hwver?

Re: Prius Gen2 adapter board development thread

Posted: Mon Dec 28, 2020 4:28 pm
by tom3141
With pin 27 not pulled up, it let me start the inverter (I heard the main contactor click) but it then immediately tripped.

hwver is Prius and I’m using 4.96.R-foc firmware

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 29, 2020 3:48 pm
by tom3141
Good news today!

I decided to have a look over the wiring and shorten some of the signal cables that were too long. In the process of doing this I noticed that I had a wire going directly from GINV to pin 32 of the VCU that was not also connected to the car body ground. I tied these two to ground and it has almost completely fixed the issue. I think the wiring diagram on the wiki slightly confused me with this so we should probably clarify this to make it clearer.

I have still had a very occasional overcurrent trip which is odd but it is now driveable. The parameters need some work but it doesn’t feel far off. :-)

Re: Prius Gen2 adapter board development thread

Posted: Tue Dec 29, 2020 4:00 pm
by johu
Oh yes, that would be a problem ;)
Congratulations!

Re: Prius Gen2 adapter board development thread

Posted: Wed Dec 30, 2020 2:56 pm
by ZooKeeper
tom3141 wrote: Tue Dec 29, 2020 3:48 pm I decided to have a look over the wiring and shorten some of the signal cables that were too long. In the process of doing this I noticed that I had a wire going directly from GINV to pin 32 of the VCU that was not also connected to the car body ground. I tied these two to ground and it has almost completely fixed the issue. I think the wiring diagram on the wiki slightly confused me with this so we should probably clarify this to make it clearer.
The diagram was intended for only the inverter and VCU, as vehicle wiring varies GREATLY. If it would help clarify I can make that change however.

Re: Prius Gen2 adapter board development thread

Posted: Wed Dec 30, 2020 4:16 pm
by tom3141
ZooKeeper wrote: Wed Dec 30, 2020 2:56 pm The diagram was intended for only the inverter and VCU, as vehicle wiring varies GREATLY. If it would help clarify I can make that change however.
Yes, the diagram isn’t really wrong, I just hadn’t thought it through properly. I’ve added a sentence to the wiki below the diagram.

Re: Prius Gen2 adapter board development thread

Posted: Wed Jan 06, 2021 11:05 am
by vin
johu wrote: Mon Dec 28, 2020 4:03 pm I'm surprised at even does anything with pin 27 not pulled up.
So the main trigger for all faults is TIM1_BKIN aka PB12. On Prius hardware that is expected high when all is well, which you've verified.
When it goes low, the firmware will sample various inputs and post an according error message. On Prius there is only DESAT but when it finds that pin high at the instant that PB12 is low it will fall back to OVERCURRENT instead.
Hmm. what is the value of hwver?
Hi John

So I've managed to pull up pin 27 which has definitely helped. However I've using the REVERSE direction on VCU due to the orientation of my motor in the car. It appears to be giving me a very harsh jerk if i decelerate to sharply as if the regen is too sharp however I have regen set to 0. Should forward and reverse operate the same? How can I get to motor to cruse to a more gentle stop rather than such a sharp stop?

Re: Prius Gen2 adapter board development thread

Posted: Wed Jan 06, 2021 11:15 pm
by pablo
hello :D , dunce here. i have no idea what im doing wrong , i cant even get the vcu to power up and blink the little lights, i did the inverter side pin 25 to 12v. i followed the forum v1.2 wiring diagram i listened to the damien and hubner foc tunning video i read the Info Prius Package.pdf . i have the fillament lamp in series. i sacrificed the family goat. I NEEEEEEEEEEEEED HELP -_- sry im a dummy. also, no smoke no burning. inverter buzzez when i switch the 12v to ON but the VCU is inactive. ive read the old wiki, ive spent about 3 month trying to cath up in the discussion thread so i beg, can someone please teach me like im a 5 year old who just knows v=ir. i dont know too many abbreviations i get that ENCa is the cosine signal for the resolver or something but thats after i get it to turn on. and connect to wifi. :( ill make a video of how i installed it for others to learn from what ive read so far. and show my confusion

Re: Prius Gen2 adapter board development thread

Posted: Thu Jan 07, 2021 6:47 am
by johu
To get help show us exactly what you wired up, best with labeled wires like "12V" and "GND"

Re: Prius Gen2 adapter board development thread

Posted: Thu Jan 07, 2021 7:39 pm
by ZooKeeper
pablo wrote: Wed Jan 06, 2021 11:15 pm ....no smoke no burning. inverter buzzez when i switch the 12v to ON
That is very good!
ive read the old wiki, ive spent about 3 month trying to cath up in the discussion thread so i beg, can someone please teach me like im a 5 year old who just knows v=ir. i dont know too many abbreviations i get that ENCa is the cosine signal for the resolver or something but thats after i get it to turn on. and connect to wifi. :( ill make a video of how i installed it for others to learn from what ive read so far. and show my confusion
Do you have the Prius Gen2 VCU from the Openinverter webshop? If so, just supply +12v & ground (VCU pins 20 & 19 respectively) and see if you get a flashing light on the physical board. Flashing = good :D

I attached a photo of where you *should* see the LED flashing merrily.

Re: Prius Gen2 adapter board development thread

Posted: Tue Jan 26, 2021 9:19 am
by steveknox
Hi, can anyone please tell me what the part number is for the right-angled connector for the olimex wifi module?

Re: Prius Gen2 adapter board development thread

Posted: Tue Jan 26, 2021 9:49 am
by steveknox

Re: Prius Gen2 adapter board development thread

Posted: Thu Feb 11, 2021 5:53 pm
by LRBen
We have a tuned motor! I've been at this for a couple hours every weekend recently having not touched it since about August, working through the FOC tuning video. The main problem I had was the resolver polarity. Got that right on the third combination out of four and it all went smoothly from there.

My Syncoff was 65000 on an Outlander motor. At 0 I was already in that dip, so it took a bit of going back and forth to figure out which side of the dip I was in. Wasn't too far off though. Throttle response is pretty nice now. I did try to upload the parameters to the database but I only downloaded a snapshot file. So I'll get a proper file tomorrow to upload. Hopefully it should help other people catch up quicker.

Thank you Damien and Johannes for the FOC tuning video! Would never have gotten this far without that.



The parameters from the snapshot file for those who might find it useful:
{
"curkp": 64,
"curki": 20000,
"curkifrqgain": 50,
"fwkp": -100,
"dmargin": -2000,
"syncofs": 65000,
"polepairs": 5,
"respolepairs": 5,
"encmode": 4,
"fmax": 200,
"numimp": 60,
"dirchrpm": 100,
"dirmode": 1,
"snsm": 12,
"pwmfrq": 2,
"pwmpol": 0,
"deadtime": 0,
"ocurlim": 3000,
"il1gain": 3.18,
"il2gain": 3.18,
"udcgain": 3.75,
"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": 0,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargepwmin": 0,
"chargepwmax": 90,
"potmin": 1400,
"potmax": 4095,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 0,
"throtramp": 0.37,
"throtramprpm": 3500,
"throtcur": 1,
"brknompedal": 0,
"regenramp": 100,
"brknom": 30,
"brkmax": -30,
"brkcruise": -30,
"brkrampstr": 10,
"brkout": -50,
"idlespeed": 2000,
"idlethrotlim": 0,
"idlemode": 3,
"speedkp": 0.25,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 0,
"udcswbuck": 540,
"tripmode": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
}

Re: Prius Gen2 adapter board development thread

Posted: Thu Feb 11, 2021 7:46 pm
by johu
Very cool! So like on the Leaf motor they have made an effort to align the resolver with the magnets so you barely need any offset (65000 is like -2.5° offset)
If you download the latest index.html and index.js you can submit to the database right from the web interface.

Re: Prius Gen2 adapter board development thread

Posted: Thu Feb 11, 2021 9:55 pm
by LRBen
Just refreshed myself with the parameter database video. I'll update those files tomorrow and give it a go.

Re: Prius Gen2 adapter board development thread

Posted: Fri Feb 12, 2021 3:16 pm
by LRBen
Parameters added. Hopefully should be of some use to others.

Re: Prius Gen2 adapter board development thread

Posted: Thu Feb 25, 2021 4:29 pm
by steveknox
Hi, can anyone confirm the part numbers for the two molex connectors?

Re: Prius Gen2 adapter board development thread

Posted: Tue Mar 09, 2021 7:21 pm
by Bram
Hi Guys, Its been a while, but I need your help.
I've mounted my outlander motor to the gearbox and fitted it into my car (VW Polo mk1)
last days I'm testing the motor and inverter, watched hours on video's and found my (i believe) the correct "syncofs".
but now mounted, with wheels off the ground, the motor rarely start out of itself, it always needs a tiny push on the wheel before spinning.
while spinning I can make him spin slowly and super fast with out weird noise, very smooth. (with manualid 0.1 - manaualiq 5.0)

but it doesn't start itself (in manual nor closed loop) , I hear the inverter make noise, but wheels doesn't spin.
while making the noise I don't see a battery drain (0 amp) either.
What do i need to do?

below my parameters
{
"curkp": 64,
"curki": 20000,
"curkifrqgain": 50,
"fwkp": -100,
"dmargin": -2000,
"syncofs": 61600,
"polepairs": 5,
"respolepairs": 5,
"encmode": 4,
"fmax": 200,
"numimp": 60,
"dirchrpm": 100,
"dirmode": 0,
"snsm": 12,
"pwmfrq": 1,
"pwmpol": 0,
"deadtime": 0,
"ocurlim": 200,
"il1gain": 3.15,
"il2gain": 3.15,
"udcgain": 3.75,
"udcofs": 325,
"udclim": 540,
"snshs": 0,
"pinswap": 5,
"bmslimhigh": 50,
"bmslimlow": -1,
"udcmin": 6,
"udcmax": 220,
"idcmax": 150,
"idcmin": -50,
"tmphsmax": 85,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargemax": 90,
"potmin": 0,
"potmax": 4095,
"pot2min": 4095,
"pot2max": 4095,
"potmode": 0,
"throtramp": 0.28,
"throtramprpm": 3500,
"throtcur": 1,
"brknompedal": -50,
"regenramp": 100,
"brknom": 30,
"brkmax": -30,
"brkcruise": -30,
"brkrampstr": 10,
"brkhistr": 1000,
"brkhistp": 1000,
"brkout": -50,
"idlespeed": 0,
"idlethrotlim": 50,
"idlemode": 0,
"speedkp": 0.25,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 0,
"udcswbuck": 0,
"tripmode": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"manualiq": 0,
"manualid": 0
}

Re: Prius Gen2 adapter board development thread

Posted: Tue Mar 09, 2021 7:24 pm
by Bram
forgot to mention, I'm running 4.87.R-foc

Re: Prius Gen2 adapter board development thread

Posted: Tue Mar 09, 2021 7:43 pm
by johu
Try increasing "throtcur". Maximum current will be throtcur*100. So currently you only allow 100A but even with that the car should move. Hmm. Well try it. potmin and potmax look suspiciously like defaults, have you calibrated throttle?

Re: Prius Gen2 adapter board development thread

Posted: Tue Mar 09, 2021 7:52 pm
by Bram
Thanks, will give a try with a higher "throtcur" like a 2 or even 5?
Do i need to increase the "idcmax" accordingly ? from a 150 to an 300A?
About the throttle, i still use a pot