Prius Gen2 adapter board development thread
- 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
Ahhh. That would explain the melted motor. Do you have a dc power supply with a current limit like say 5 or 10 amps?
I'm going to need a hacksaw
- 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
So here is what you want to do.
-disconnect and remove any hv battery cables.
-disconnect motor phases.
-load up the sine firmware and enable manual run.
-plot il1 and il2 on a graph.
-connect a low voltage dc power supply (say 12v) with a current limit (anything from 1 to 10 amps is ideal) between the inverter hv+ terminal and any phase. Basically we want to short circuit the power supply through the current sensor and back up through the intrinsic diode in the top side igbt. Don't worry the current limit keeps us safe.
-set the power supply to 5 amps and look at the il1 and il2 levels on the graph. Does either one move? if not you are on the phase that doesnt have a current sensor so move to another.
-so lets say you have 5amps on the power supply and the graph shows il1 at 2 amps. You now need to adjust the il1gain parameter until you get them reasonably close.
-try at various current settings up to 10amps and get it reasonably close. say within 1 or 2 amps is fine.
-rinse and repeat for il2 and use il2gain parameter.
-save parameters.
-reload foc firmware.
-spin motor and observe lack of melting.
-disconnect and remove any hv battery cables.
-disconnect motor phases.
-load up the sine firmware and enable manual run.
-plot il1 and il2 on a graph.
-connect a low voltage dc power supply (say 12v) with a current limit (anything from 1 to 10 amps is ideal) between the inverter hv+ terminal and any phase. Basically we want to short circuit the power supply through the current sensor and back up through the intrinsic diode in the top side igbt. Don't worry the current limit keeps us safe.
-set the power supply to 5 amps and look at the il1 and il2 levels on the graph. Does either one move? if not you are on the phase that doesnt have a current sensor so move to another.
-so lets say you have 5amps on the power supply and the graph shows il1 at 2 amps. You now need to adjust the il1gain parameter until you get them reasonably close.
-try at various current settings up to 10amps and get it reasonably close. say within 1 or 2 amps is fine.
-rinse and repeat for il2 and use il2gain parameter.
-save parameters.
-reload foc firmware.
-spin motor and observe lack of melting.
I'm going to need a hacksaw
- 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
An alternative if you dont have a suitable power supply.
-load sine firmware.
-run motor in manual mode at a low frequency. say 5hz.
-put a good RMS AC clamp meter on any phase. Observe the AC current value.
-graph il1rms and il2rms on the web interface.
-adjust il1gain and il2gain as above to bring them into line.
-load sine firmware.
-run motor in manual mode at a low frequency. say 5hz.
-put a good RMS AC clamp meter on any phase. Observe the AC current value.
-graph il1rms and il2rms on the web interface.
-adjust il1gain and il2gain as above to bring them into line.
I'm going to need a hacksaw
Re: Prius Gen2 adapter board development thread
did it, video in the next few minutes. power supply shows a current draw on two as predicted.
il1 and il2 graph not logical.
playing with parameters ( experimentally ) like pwm 1-3 and so on gave me somthin on one but not the other
link to tube
edit: 12 volts in was reversed, per damiens post , so the last few minutes of this vid are really not relevent
il1 and il2 graph not logical.
playing with parameters ( experimentally ) like pwm 1-3 and so on gave me somthin on one but not the other
link to tube
edit: 12 volts in was reversed, per damiens post , so the last few minutes of this vid are really not relevent
the priustoric boatcar guy
- 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
Ok don't change any of the pinswap settings. You want to inject current into the phase lead and out of the hv+.
I'm going to need a hacksaw
Re: Prius Gen2 adapter board development thread
yes, doing that. except my polarity was positive to hv positive...will go at it again
will undo any pinswap settings I mucked with.
will undo any pinswap settings I mucked with.
the priustoric boatcar guy
- 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
Yeah you won't get anything that way as the igbt is blocking current flow. if you do it like in my drawing we push current through the parallel diode.
I'm going to need a hacksaw
Re: Prius Gen2 adapter board development thread
now I get 9.7 amps draw on all three phases, and il1 and il2 both show current draw and they graph from the two most towards the front ( the one that did not hum or draw current earlier today)
parameters loaded from file say current swap by the way. looks like I need to perform the calibration.
parameters loaded from file say current swap by the way. looks like I need to perform the calibration.
the priustoric boatcar guy
- 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
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.
I'm going to need a hacksaw
- 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
Thank you for the troubleshooting and setup guidance. I've just ordered a PSU, something I've wanted for a long while testing car ECU's but got by with car batteries. Also dug out a couple alternators from the parts pile to use as test motors before attempting the MGR, and can test without the resolver circuit.
Need to learn. Starting from the basics.
Re: Prius Gen2 adapter board development thread
You Are AWESOME! Thanks for the diagram!!!!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+.
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
"Talent is equally distributed but opportunity is not." - Leila Janah
Re: Prius Gen2 adapter board development thread
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 )
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
- 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
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
- 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
If you don't have a current limiting power supply, here is another alternative.
The power source can be a 12V battery or a 12V power supply.
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.
- 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
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
Re: Prius Gen2 adapter board development thread
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.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.
- 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
Damien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
Re: Prius Gen2 adapter board development thread
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??SciroccoEV wrote: ↑Tue Jul 28, 2020 1:10 pmDamien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
-
- 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
Damien has quite a few projects on hand already... Maybe the community can work together and create a guide without consulting the oracleascii-art wrote: ↑Tue Jul 28, 2020 1:21 pmAhh, 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??SciroccoEV wrote: ↑Tue Jul 28, 2020 1:10 pmDamien already has at least one Gen2 Inverter, what he doesn't have is an identical Gen2 specific control board.
Re: Prius Gen2 adapter board development thread
re-did my calibration at 10amps for better resolutionJack 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.
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
the priustoric boatcar guy
- 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
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
Re: Prius Gen2 adapter board development thread
okay, thanks for being there D will comply
the priustoric boatcar guy
Re: Prius Gen2 adapter board development thread
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
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
Re: Prius Gen2 adapter board development thread
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
"Talent is equally distributed but opportunity is not." - Leila Janah
- 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
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