Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
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 »

Based off my success @12v, I decided to ramp it up to 48vdc and did not get what I expected, not at all.

As before, with 1>3 and 3>1 physically, the motor will spin very smoothly with the throttle in REVERSE. As imwoody36 found, once rotation is initiated, it will not stop until you disable the direction, but there is some throttle control and DC amps following with throttle input & RPM.

Additionally, any attempt at forward rotation either results in an immediate 20A fuse blow, or very jerky motion with fuse failure shortly after.

Physical pins aligned 1-1, 2-2, 3-3 (as before, un-swapped as it were), results in immediate plasma-like effects from the fusing, regardless of direction.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

tried them, thanks.
my throttle graphs fine from 0 to 4096.
my motor will spin in any combination of pinswap now that I physically swapped sin and cos,
( deleted a paragraph...remember I have two identical boards? I am getting different results with them, found the " new" board also had cold solder on the STM and I was not getting " forward" when graphed)
old board seems to work on all inputs( throttle, forward, reverse, resolver angle,) and seems to give different results when syncoffset messed with.

it will begin to spin well at 5000, but reverse is jerky and then , no operation unless im in manual mode now.
zoo, I noticed you have the resolver set to LEAF, try this instead, works better for me

I can go forward and reverse, and I can start movement with the throttle, but it wont stop unless I switch to neutral

...woody
Attachments
woody aug10 MGR.json
(1.29 KiB) Downloaded 81 times
the priustoric boatcar guy
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 »

We both have resolver set to "4", I can only get output with snsm = Leaf, all the others result in nothing.

As you did, I pinswapped SIN & COS, but had to wire swap 1 & 3 "back" to 1-1, 2-2, 3-3 or I got jiggling with either direction selected.

I noticed that when in "Rev", after some throttle input, idle resulted in high dc current (7A) and slow turning, just off idle = low dc current (1A) and barely turning, while higher off idle = even higher dc current 25A+) and jiggling. If I could get potnom +/- 0.5% of zero, the motor would stop turning and current went to 0, it it were more negative or positive, the motor would continue turning. Three times I got it to stop by slowly backing off the throttle from +5% down to +0.5% or so.
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: 5911
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 180 times
Been thanked: 1109 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Unfortunately with FOC there is no obvious "working" and "not working". You think you have it cracked and then when you switch to run mode or reverse direction everything is back to start. It's a bit ISO layer like. First get the physical CORRECT (not maybe correct), then do the FOC tuning, then do other setup.
So:
pinswap: according to the naming of the various signals no pinswap should be necessary. Unfortunately I'm not home to try myself but these are the steps to get it right:
  • Disconnect motor
  • Use the sine software and put it in manual run with fslip and ampnom=0
  • Use some current source (battery with resistor or lab power supply). Try to get into the inverter before the current sensor and connect the positive terminal there. Connect the negative terminal to the phase output. So now you're sending a positive current through the sensor. Accordingly il1 or il2, respectively, should be positive. If not you'd need a negative ilXgain to make it positive
  • Now apply a 50/50 dutycycle by setting fslipspnt=ampnom=1
  • Disconnect V and W PWM lines
  • Use an appropriate resistor (one that allows a few amps of current at your bus voltage) and connect it between the now active U output and B-. This should yield a positive current on il1
  • Repeat with V phase, it should yield positive current on il2.
  • Report results here so we can determine if pinswap is needed
  • Next up: resolver. Seems you all got that right. It should yield angle running from 0 to 360 when turning the motor shaft clockwise by hand.
  • Now you are ready to go back to FOC software, set appropriate pinswap and do the syncofs tuning
If you skip steps it will get you later.

EDIT: indeed there is no Prius motor temp sensor programmed yet. Select something for snsm that yields a low value of tmpm.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

Im on it, in the next hour(s)
quick question, please confirm what output lugs are V, U, and W
Attachments
800px-Prius_Gen2_inverter_internals.jpg
the priustoric boatcar guy
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 »

johu wrote: Tue Aug 11, 2020 8:12 am
  • Use some current source (battery with resistor or lab power supply). Try to get into the inverter before the current sensor and connect the positive terminal there. Connect the negative terminal to the phase output. So now you're sending a positive current through the sensor. Accordingly il1 or il2, respectively, should be positive. If not you'd need a negative ilXgain to make it positive
  • Now apply a 50/50 dutycycle by setting fslipspnt=ampnom=1
  • Disconnect V and W PWM lines
  • Use an appropriate resistor (one that allows a few amps of current at your bus voltage) and connect it between the now active U output and B-. This should yield a positive current on il1
PERFECT, those details are key, I had asked about current sign, but did not see an answer and I missed the "disconnect other PWM part". That helps explain my wildly variable readings when I tried this before :)
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
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 »

imwoody36 wrote: Tue Aug 11, 2020 12:26 pm Im on it, in the next hour(s)
quick question, please confirm what output lugs are V, U, and W
From what Konstantine posted of MIKMUR's drawings, MG2 current sensors are on V & W w/ IC250 = v, IC350 = W, if that helps.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

anybody remember that command to type to make the webinterface display the present settings ?
the priustoric boatcar guy
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

"Try to get into the inverter before the current sensor and connect the positive terminal there."
I dont understand, am I doing this with High voltage (48vdc)pack supply applied?
and is the positive lab supply going to the positive pack voltage in?
the priustoric boatcar guy
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

I experimented and no current , so I connected lab positive to hv supply negative, with no hv pack applied and get positive current on one and then the other Il1 and il2
here is the video



to be clear. the fslipspnt and ampnom are both at 1
wires to inverter input V and W are disconnected .
lab supply pos is connected to hv supply input neg at the inverter and I am using lab supply neg to connect to the U and V inverter outputs

the idea is the lab supply is current limited instead of using a resistor.

the last few moments of the video are what I hope Johannes is looking to confirm.

I hope I have followed the instructions correctly
the priustoric boatcar guy
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Thanks for the video 👌👍. You're on a roll..
User avatar
johu
Site Admin
Posts: 5911
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 180 times
Been thanked: 1109 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Ok thanks for that. Brilliant idea to just connect positive to inverter negative, so current can travel via the anti-parallel diode.
So what you've established is that il1 senses the "V" phase (and not "U" as I expected) and the gain is positive. And il2 senses what? U or W? According MIKMUR it would be W. So il1=V, il2=W. But we want il1=U and il2=V. So now the correct pinswap would be swapping pwm1 and 3 so now il2 would sense U. And then pinswap il1 and il2. Now il2 senses W and il1 senses U.

All in all set pinswap to 4+1. You can't do that in the web interface so instead type "set pinswap 5" into the custom command. Now FOC should work once syncofs is tuned.
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 »

That works!

See attached photo for a Gen2 Prius inverter wiring to an MGR. Basically, the rear inverter phase goes to the forward motor phase and vice-versa.
Attachments
Gen2 Prius Inverter to MGR Wiring
Gen2 Prius Inverter to MGR Wiring
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

Ive got movement at syncoffset at 2000.
zoo suggested I up my pack voltage for testing..so im using 220v... that depleted after several tries to 160v.

foc tuning unreliable, but trying offsets without manual mode turned on resulted in throttle control in forward but jerky in reverse
Attachments
DSC_0196.JPG
the priustoric boatcar guy
User avatar
johu
Site Admin
Posts: 5911
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 180 times
Been thanked: 1109 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

imwoody36 wrote: Wed Aug 12, 2020 9:13 pm Ive got movement at syncoffset at 2000.
zoo suggested I up my pack voltage for testing..so im using 220v... that depleted after several tries to 160v.

foc tuning unreliable, but trying offsets without manual mode turned on resulted in throttle control in forward but jerky in reverse
so pinswap now 5?
I notice real long phase and resolver cables. Are the latter really well shielded?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

ZooKeeper wrote: Wed Aug 12, 2020 8:14 pm That works!

See attached photo for a Gen2 Prius inverter wiring to an MGR. Basically, the rear inverter phase goes to the forward motor phase and vice-versa.
Thanks Zookeeper, got my new adapter board and trying to test what you and imwoody have done thus far..with help from the forum top dogs, it's moving along 'nicely'... R&D😉.
Trying to understand pinswap.
Basically, A, B,, C marked on your MG2 outputs = W, V, U phases in original Prius Inverter documents?
Current sensor Il1 is connected to V phase
Current sensor Il2 is connected to W phase

Adapter board setup requires U, V, W phase setup. And current monitoring on U and V.

So pinswap 5 makes the adapter board logic operate the W, V, U setup with current sensors on the first 2 phases?

I think that's what Johu was saying previously, but I am translating to my 'non electronics brain'..
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Folks, you simply CANNOT pick and choose what parts of the foc tuning procedure "seem" to work. It just does not work that way. Period. Now, in light of the confusion over this topic both Johannes and I are making a video where we will show the COMPLETE procedure of setting up a Gen 2 inverter and tuning a motor. This video will be long, it will be boring but it WILL show the full procedure from start to finish. If you want to help us make this happen then hop on Patreon even for a month.
I'm going to need a hacksaw
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Sorry you have to go to those lengths. I'm taking things slow and understanding each step.
Still making sure I have Correct setup.
I have confirmed the 2 current sensors read positive values.
Now trying to understand pinswap function..
We are setting the correct sequence of U, V, W phase switching in accordance with the 2 current sensors, right?
User avatar
TheSilverBuick
Posts: 187
Joined: Mon Jun 08, 2020 5:01 pm
Location: Nevada, United States
Has thanked: 3 times
Been thanked: 1 time

Re: Prius Gen2 adapter board development thread

Post by TheSilverBuick »

I'm prepared to be bored! It's interesting the parallels I see wiring and tuning these with the aftermarket fuel injection world I'm very familiar with.

Dumb guy questions on noise. For long power cable runs, does twisting the wires together help or hurt the noise situation? I know it's common for signal wires, but those usually aren't AC (at least in the automotive world I'm familiar with). Clearly a grounded wire mesh is the preferred option, but does grounding metal wire conduit give the same noise shielding? Does wire size have a role in how sensitive the line is to receiving/producing noise?
Need to learn. Starting from the basics.
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

For the record, I have prepaid and as yet have not privately emailed johu for tech support.
I will now simultaneously pm him to cash in my coupon and publicly announce I am a supporter with cash.

I respect Damien very much and will also now support him with the suggested patreon

from my perspective and in desperation I experiment, after trying to FOC tune a board that :
1) had manufacturing issues that we resolved
2) had 4 wiring diagram errors that johu realized after zoo and I and perhaps other lurkers ran up against
3) had a firmware issue with pinswaps we had no possible way to identify.

I have been there and done that with regard to manufacturing and selling a circuit board and you will notice I have not chastised johu for anything
because I would not want to eat crow.
I will look forward to the tuning procedure video and I offer to help.
----------------------------------------------------------------------------------------

in other news, my 9 foot long resolver wires are shielded with the shield connected to ground.
my motor phase wires are braided copper and not shielded.
I have now placed the lid on the inverter for RF shielding, ( I noticed when Zoo and I were talking on the phone I could hear interference on the cell call when he was near his inverter).

has anybody attempted a foil shield on motor wires? and were there positive results? ( or am I shopping for shielded wire?)
the priustoric boatcar guy
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I'm a patreon supporter too, and was hoping to get this up and running without needing J and D (too much), as they are very busy.
I'm back to basics, uploaded sine.bin file and will attempt manual mode in delta light bulb config.
How do you undo a pinswap command?

I entered the pinswap 5 after configuring the current sensors.
Removed pwm MVU and MWU from adapter board connector, but can't get pwm signal in manual mode.
Hence, connected back up (after changing pins according to new schema at the beginning) and would like to undo pinswap and confirm pwm in manual mode..
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

Im almost positive just selecting none or whatever pinswap you want in the drop down menu overwrites the pinswap 5 command

do you have a scope? are you missing PWM signal from the board? mine needed to be reflowed.
the priustoric boatcar guy
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I don't have a scope.
About that drop down menu. What am I looking for? There's no pinswap menu for me.

Edit : that would be encode?

Edit : encmode?
I have SINGLE, AB, ABZ, SPI, Resolver, SinCos in drop down menu.
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

oh, your using sine, not FOC. not relevant . what is your motor and are you using a resolver or an encoder for shaft position?
the priustoric boatcar guy
RetroZero
Posts: 765
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 364 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I'm using MG2 as motor. With standard encoder. I had it running in manual mode with 'old board', but cannot duplicate that since modifying the phase pins and uploading sine. bin file.
I am connecting 12volt supply to original Hv inverter inputs (not bypassing boost converter)
Have delta light bulb setup in place.
Have WARN pwmstuck fault permanently...
Have Derate Current limit fault when I press start, and main contacter opens and precharge closes 🤔
Post Reply