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 »

Jack Bauer wrote: Mon Jul 27, 2020 1:46 pm Ok don't change any of the pinswap settings. You want to inject current into the phase lead and out of the hv+.
You Are AWESOME! Thanks for the diagram!!!!

But this revealed more bad news for me :( No current measure by the inverter on ANY leg, although the PSU and meter do.

Edit: you have to be in "Run", but the current is all over the map with 4A injected, the readings swing from -1A to +7.5A :(
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 »

I have depleted my high voltage battery, and upon replacing it began getting desat errors and was unable to spin the motor.
So I have replaced it with two 12 volt batteries . that is more forgiving and allows me to spin the motor in manual mode.

but I have an unexpected side effect, the wifi interface locks up frequently.

so I have to give the motor a nudge to begin spinning, but the results are duplicate-able.
is there something to scope or plot for precision calibration of sync offset?
I followed the youtube foc tuning marathon, I know it by heart now, and the end seems to be inconclusive.

my syncoffset is 22200. anywhere else as far as I can tell and the throttle just gives me nothing or hum.
reverse will work, and throttle is either run or not but nothing in between( and yes plotting throttle is good, I get between 0 and 4096)
also top rpm is thankfully slow, but also does not change when I set freq anywhere between 21 and 100.

il2 when plotted against il1 is much smaller and square on top.( makes me think a phase is absent...yet reverse works )
the priustoric boatcar guy
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Folks, in order for FOC to work it MUST know the phase currents with reasonable accuracy (about +/-1 amp) otherwise it won't matter what you do it just won't work.
I'm going to need a hacksaw
User avatar
bexander
Posts: 835
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Prius Gen2 adapter board development thread

Post by bexander »

If you don't have a current limiting power supply, here is another alternative.
PSU_alternative.jpg
The best result will likely be achived with the current as high as possible. Most multimeters can measure up to 10A so a 100W lightbulb will get you close. If you don't have 100W bulb you can parallel several smaller until you measure a good current (above 5A).

The power source can be a 12V battery or a 12V power supply.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Yeah that will work well. You only need 2 setpoints just to make sure the calibration is reasonable.
I'm going to need a hacksaw
ascii-art
Posts: 9
Joined: Mon Jul 20, 2020 4:38 pm
Location: Sweden

Re: Prius Gen2 adapter board development thread

Post by ascii-art »

Jack Bauer wrote: Mon Jul 27, 2020 2:47 pm Excellent. Dont forget to save parameters. Now when you command a certain id you will get that current or close enough. The parameter file I shared was from a gen 3 inverter so that does indeed need a pin swap. I don't have a gen 2 controller otherwise I'd make a video showing how to do all this stuff.
Would it help you if I donate a gen 2 Prius inverter to you? I have one that's mostly complete and would be happy to leave it in your capable hands.
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: Prius Gen2 adapter board development thread

Post by SciroccoEV »

ascii-art wrote: Tue Jul 28, 2020 1:03 pm Would it help you if I donate a gen 2 Prius inverter to you? I have one that's mostly complete and would be happy to leave it in your capable hands.
Damien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
ascii-art
Posts: 9
Joined: Mon Jul 20, 2020 4:38 pm
Location: Sweden

Re: Prius Gen2 adapter board development thread

Post by ascii-art »

SciroccoEV wrote: Tue Jul 28, 2020 1:10 pm
ascii-art wrote: Tue Jul 28, 2020 1:03 pm Would it help you if I donate a gen 2 Prius inverter to you? I have one that's mostly complete and would be happy to leave it in your capable hands.
Damien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
Ahh, I see. That might make it even easier. I'm thinking of buying a second control pcb eventually anyways, because I'd like to run both MG1 and MG2. So, I could order one from Johannes sooner rather than later and kindly ask him to ship it to Mr. Jack Bauer for experimentation first. Would that be helpful or just add unwanted complications??
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

ascii-art wrote: Tue Jul 28, 2020 1:21 pm
SciroccoEV wrote: Tue Jul 28, 2020 1:10 pm
ascii-art wrote: Tue Jul 28, 2020 1:03 pm Would it help you if I donate a gen 2 Prius inverter to you? I have one that's mostly complete and would be happy to leave it in your capable hands.
Damien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
Ahh, I see. That might make it even easier. I'm thinking of buying a second control pcb eventually anyways, because I'd like to run both MG1 and MG2. So, I could order one from Johannes sooner rather than later and kindly ask him to ship it to Mr. Jack Bauer for experimentation first. Would that be helpful or just add unwanted complications??
Damien has quite a few projects on hand already... Maybe the community can work together and create a guide without consulting the oracle ;)
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 »

Jack Bauer wrote: Tue Jul 28, 2020 6:39 am Folks, in order for FOC to work it MUST know the phase currents with reasonable accuracy (about +/-1 amp) otherwise it won't matter what you do it just won't work.
re-did my calibration at 10amps for better resolution
struggling with syncoffset. when the il1 and il2 current graphs look pretty( symmetrical), then the throttle looses the ability to turn off the motor.
these photos are il1 and il2 and the first photo is id an iq

also reverse is slow or non existent.
is anybody adjusting the " boost" parameter?...oh nevermind...it seems to be one of those parameters that has been removed
Attachments
GOPR0147.JPG
GOPR0146.JPG
the priustoric boatcar guy
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

So during tuning you must be in manual mode and entering values on the web interface not using throttle control.
I'm going to need a hacksaw
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 »

okay, thanks for being there D will comply
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 »

so, is the goal the get the motor to spin at the lowest id and iq current entered manually or is the goal to get the syncoffset for the least jerky motor movement? you mentioned the pinswap firmware..did we decide it was okay, or do I need to experiment with hardware phases?

I seem to have a false peak at both syncoffset in the 60k range and again at the 22k range, and i cant help but fiddle with pwm swap and noticed no real difference in how the motor behaves. and I can hear the throttle changing the performance when in the 60k range and in fact the motor will swap directions randomly as I fiddle with throttle.

can anyone suggest a method to ( read, scope, measure or calibrate )? syncoffset or any other phase related measurement
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 »

I almost hate to ask this, but should il1&2 be negative since we are pushing electrons backwards as opposed to the "normal" direction? Or does the "system" think of regen as "+ and battery depletion as "-"... OR, is this simply a question of accurate magnitude ????
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Ok. This ain't working. How about we do a google hangout or similar and I'll talk you all through it.
I'm going to need a hacksaw
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
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 in. will make myself avail when you tell me.
FYI Im eastern time zone USA

I will need to learn how to do google hangout but I think no problem
may I propose tomorrow?
the priustoric boatcar guy
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Sounds good.
I'm going to need a hacksaw
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 »

Isaac96 wrote: Tue Jul 28, 2020 7:51 pm il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.

If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Prius Gen2 adapter board development thread

Post by Kevin Sharpe »

imwoody36 wrote: Tue Jul 28, 2020 8:06 pm im in. will make myself avail when you tell me.
ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm I too would be in for a Google meet as I am always open to Educational opportunities.
Can you guys update this thread and the wiki once you get your issues resolved? It's important that we understand why you're having such problems so that we can help avoid them in the future.

Many thanks.
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm
Isaac96 wrote: Tue Jul 28, 2020 7:51 pm il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.

If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Right, sorry, I misunderstood the question. FOC might care, the slip control doesn't.
Have you tried making il1gain and il2gain negative?

(also you quoted me... how dare you ;))

Hopefully once someone has this system working we as a community can draft some documentation?

-Isaac
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 »

update, ac clamp ammeter on the U, V, And W wires to the motor during operation show 17 amps on two of them and almost zero on the U phase pin 31 of the board.

I would have expected much fewer amps based on how the equipment is sounding, and also all of them to be the same.

scoping the signal on pins 29,30 and 31 shows no pwm signal on pin 31 like the others.
however there is a signal going to the uln2003 driver IC and nothing coming out , even when that channel is unloaded.
looks like ive got a bad driver IC.
the priustoric boatcar guy
ascii-art
Posts: 9
Joined: Mon Jul 20, 2020 4:38 pm
Location: Sweden

Re: Prius Gen2 adapter board development thread

Post by ascii-art »

imwoody36 wrote: Tue Jul 28, 2020 8:06 pm im in. will make myself avail when you tell me.
ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm I too would be in for a Google meet as I am always open to Educational opportunities.
I'd greatly appreciate it as well. Thanks for the offer!
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 »

amazon says my replacement driver IC will be here the 30th.
Im working simultaneously on a nissan leaf EV boat, Ill get the test jig connected this morning.

two new vids coming now. https://youtu.be/SEfrh-gR1xg

this is the only one I will put here about nissan. apologies for not on topic
the priustoric boatcar guy
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

the uln2003 is not a push pull driver so you would need to connect a small load like a resistor to see its output change
I'm going to need a hacksaw
Post Reply