Prius Gen 3 Inverter Logic Board Support Thread
- TheSilverBuick
- Posts: 187
- Joined: Mon Jun 08, 2020 5:01 pm
- Location: Nevada, United States
- Has thanked: 3 times
- Been thanked: 2 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Beautiful.
Need to learn. Starting from the basics.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?
-
- Posts: 116
- Joined: Sat Apr 18, 2020 4:23 am
- Location: Kentucky, USA
- Been thanked: 1 time
Re: Prius Gen 3 Inverter Logic Board Support Thread
having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward
- Jack Bauer
- Posts: 3642
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 284 times
- Contact:
Re: Prius Gen 3 Inverter Logic Board Support Thread
I don't know how else to say this and it is the reason Johannes and I are making a video but a YOU CANNOT JUST PICK AND CHOOSE WHICH BITS OF THE TUNING PROCEDURE WORK! It is a procedure that must be followed. Step by step. Once it is done then forward and reverse work just fine. I have proven this myself. If you mess about with settings on the fly you are just wasting your time. Its an unforgiving process that wants to trick you into believing you are done. You're not unless what is described below has been followed to the letter! I demonstrated this to a class of ten people last weekend. Exactly the same crap as you are all seeing. Then go and follow the procedure in a slow and methodical manner and guess what? It works.
https://openinverter.org/wiki/Using_FOC_Software
https://openinverter.org/wiki/Using_FOC_Software
https://openinverter.org/wiki/Using_FOC_Software
https://openinverter.org/wiki/Using_FOC_Software
https://openinverter.org/wiki/Using_FOC_Software
https://openinverter.org/wiki/Using_FOC_Software
I'm going to need a hacksaw
- Kevin Sharpe
- Posts: 1345
- Joined: Fri Dec 14, 2018 9:24 pm
- Location: Ireland and US
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
konstantin8818 wrote: ↑Fri Aug 14, 2020 5:06 pm So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?
Following on from Damiens post can I suggest you video the tuning process you are following? It was clear from last weekends workshop that you must be thorough and maybe something in the procedure is open to misinterpretationDylan Witt wrote: ↑Sat Aug 15, 2020 11:13 am having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward

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.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
I'm following procedure carefully, but:
I don't know what is max_motor_current, and what will happen if I exceed max_motor_current/2
Also, how incorrect value of polepairs and respolepairs will affect tuning process.
That is all, actually.
I don't know what is max_motor_current, and what will happen if I exceed max_motor_current/2
Also, how incorrect value of polepairs and respolepairs will affect tuning process.
That is all, actually.
-
- Posts: 116
- Joined: Sat Apr 18, 2020 4:23 am
- Location: Kentucky, USA
- Been thanked: 1 time
Re: Prius Gen 3 Inverter Logic Board Support Thread
so i have removed the transmission from the mazda, powering the inverter with only 80 volts, and i will be resetting all parameters, then going though the tuning process slowly. i also have wired my throttle pedal wrong again, signal and ground wires are switched. going to be tuning it today and recording the entire process, might be a long video so it will take some time to uploadKevin Sharpe wrote: ↑Sat Aug 15, 2020 2:01 pmkonstantin8818 wrote: ↑Fri Aug 14, 2020 5:06 pm So, it runs smooth but only in reverse.Only in MGR reverse. If only schaft starts spin forward, and accelerator is released, motor starts to jump uncontrolled. It happens only if I release accelerator. What could it be?Following on from Damiens post can I suggest you video the tuning process you are following? It was clear from last weekends workshop that you must be thorough and maybe something in the procedure is open to misinterpretationDylan Witt wrote: ↑Sat Aug 15, 2020 11:13 am having the same problems im having, i still dont know what is causing the problem. goes good reverse but shakes the entire car going forward![]()
- Jack Bauer
- Posts: 3642
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 284 times
- Contact:
Re: Prius Gen 3 Inverter Logic Board Support Thread
Yeah so here's the thing : If you mess up on the motor poles or resolver poles then it won't work. I'll cover this in the video.
I'm going to need a hacksaw
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Ok, lets pretend ,I believed Martin1775 blindly and set polepais to 2 and respolepairs to 1, and connected U,V,W of inverter straight to U,V,W of MGR.
I've used Damien's custom Prius GEN3 FOC software, and pwmswap was already set to "PWMoutput13"
When I reached syncofs from 0 to 22000 even manualid of 300 Amps couldn't move rotor, all it did only jitter a little, at 21850 it only did whining noise, and didn't move at all, from gas pedal however in forward it run away....
Here are parameters I read:
id and iq while running smooth from accelerator pedal in reverse: il1 and il2 while running smooth from accelerator pedal in reverse: il1 and il2 when running smooth in reverse, when running smooth forward at high speed and in run away when accelerator is released: No matter the direction, position caprure seems good in both directions: and video of process. Sorry for my English
hard to think at two languages at once
So problem #1 is to find out correct value of respolepairs and polepairs... and max_motor_current
I've used Damien's custom Prius GEN3 FOC software, and pwmswap was already set to "PWMoutput13"
When I reached syncofs from 0 to 22000 even manualid of 300 Amps couldn't move rotor, all it did only jitter a little, at 21850 it only did whining noise, and didn't move at all, from gas pedal however in forward it run away....
Here are parameters I read:
id and iq while running smooth from accelerator pedal in reverse: il1 and il2 while running smooth from accelerator pedal in reverse: il1 and il2 when running smooth in reverse, when running smooth forward at high speed and in run away when accelerator is released: No matter the direction, position caprure seems good in both directions: and video of process. Sorry for my English

So problem #1 is to find out correct value of respolepairs and polepairs... and max_motor_current
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
I managed to spin it smoothly with this set of parameteres. FW: 4.87R FOC.
Also motor pole pair is 4.
I have checked/measured the resolver pole pairs for the MGR and to my understanding, 2 is the correct value. Also motor pole pair is 4.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Did not helped unfortunately


- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Maybe try the 4.87 firmware?konstantin8818 wrote: ↑Sun Aug 16, 2020 2:53 pmDid not helped unfortunatelyIt was a moment at syncofs = 21950 manualid was 300A, and it did not moved but oil iside MGR started to evaporate
... still runs away in forward direction... OK, waiting for video manual...
How have you connected the resolver and phase order?
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
I've checked with 4.87R already, nothing changed.
resolver connection MRFG-GND, MSNG-SIN A, MCNG-COS A, MRF-EXC A, MSN-ENC A, MCS-ENC B
Phases are connected straight 1,2,3 to 1,2,3.
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Ok, that sounds right. You might try to set pinswap for sin/cos (set pinswap 10 in 4.87) as I had to do. Else it was just jittering and no rotation. Should equal shifting them physicaly but have not tested that yet.
When I did the syncofs test my motor started spinning at manualid = 20, if it was offset (0 or 32768 was the ones for me). Using a 36V 44A power supply to power the inverter HV side.
In manual mode when I spin the driveshaft flanges in forward direction the angle plot rises, if that makes any sens?
Have you selected a direction when doing syncofs test?
Pictures of my phase order.
When I did the syncofs test my motor started spinning at manualid = 20, if it was offset (0 or 32768 was the ones for me). Using a 36V 44A power supply to power the inverter HV side.
In manual mode when I spin the driveshaft flanges in forward direction the angle plot rises, if that makes any sens?
Have you selected a direction when doing syncofs test?
Pictures of my phase order.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Your inverter looks different from mine. At which phases are your current sensors?
In mine they are 1 and 3, and if I chose any pwmswap except pf PWMoutput23, as soon as I enter any manualid, MGR starts to jump SO HARD, inverter shuts down by itself.
And srangely on 4.87 with phase connection as you showed and PWMoutput23 it doesn't rotate at all, no matter the inputs

- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
I use a Yaris inverter. The current sensors are on 1 and 3.
To be clear, I use pinswap 10 which is 2+8 where 2 = Swap Resolver sin/cos and 8 = Swap PWM output 2/3.
Pinswap 8 is, as to my understanding, a must if not using Damiens special software for inverters with current sensor on 1&3.
To use both 2 and 8 you need to send command (set pinswap 10). It can not be set using the selection menu.
Strange however that you get no motion with 4.87? No errors present? Direction selection confirmed?
To be clear, I use pinswap 10 which is 2+8 where 2 = Swap Resolver sin/cos and 8 = Swap PWM output 2/3.
Pinswap 8 is, as to my understanding, a must if not using Damiens special software for inverters with current sensor on 1&3.
To use both 2 and 8 you need to send command (set pinswap 10). It can not be set using the selection menu.
Strange however that you get no motion with 4.87? No errors present? Direction selection confirmed?
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Now that sounds like good idea. Thank you! Will try to check it tomorrow.
-
- Posts: 116
- Joined: Sat Apr 18, 2020 4:23 am
- Location: Kentucky, USA
- Been thanked: 1 time
Re: Prius Gen 3 Inverter Logic Board Support Thread
im sure his is a yaris inverter, here is a gen three prius inverter, sorry this is all i could find on my inverter, but this is a 2013 gen three inverter time 0.15 in video..
-
- Posts: 43
- Joined: Fri Nov 01, 2019 9:39 pm
- Location: Ochtrup Germany
Re: Prius Gen 3 Inverter Logic Board Support Thread
Sorry to hear that you get confused by the syncofs 22000, Konstantin.
At the beginning from my tests I although have the 22000 for syncofs.
If you check the motor connection you will find that the original kabel is not straight 1,2,3 to 1,2,3 so there is a phaseshift. I changed the kabel by pullig out the contacs and reconfigure them. For this reason I have referred to U, V, W for the designations, as 1,2,3 were not always assigned to a specific or the same phase.
Up to now I've only tested with the spezial software version Damian made for the pinswap.
At the beginning from my tests I although have the 22000 for syncofs.
If you check the motor connection you will find that the original kabel is not straight 1,2,3 to 1,2,3 so there is a phaseshift. I changed the kabel by pullig out the contacs and reconfigure them. For this reason I have referred to U, V, W for the designations, as 1,2,3 were not always assigned to a specific or the same phase.
Up to now I've only tested with the spezial software version Damian made for the pinswap.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
No confusion with syncofs. In the process of tuning I came from 0 to 22000 naturally. At this syncofs mgr stopped and didn't spin no matter the value of manualid. I've checked this with all physical pin swap and with all software pwmswap. Now I've installed 4.87r firmware and going to check pwmswap 10.Martin1775 wrote: ↑Sun Aug 16, 2020 8:51 pm Sorry to hear that you get confused by the syncofs 22000, Konstantin.
At the beginning from my tests I although have the 22000 for syncofs.
Up to now I've only tested with the spezial software version Damian made for the pinswap.
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Ok. Firmware 4.87R-FOC. Set pinswap 10.
Started tuning and from the very begining syncofs = 0 it doesnt spin no matter the manualid. With manualid =0.1 manualiq=5 it spins CW, but it is reverse for MGR. So I've set syncofs = 32768.
Now from gas pedal it spins forward no problem. I've spun it up to 8000rpm smooth and easy. In reverse it now runs away, BUT only if speed exceeds 600rpm
and jittering itself goes from 1500rpm to 600rpm and not going lower then 600rpm
Started tuning and from the very begining syncofs = 0 it doesnt spin no matter the manualid. With manualid =0.1 manualiq=5 it spins CW, but it is reverse for MGR. So I've set syncofs = 32768.
Now from gas pedal it spins forward no problem. I've spun it up to 8000rpm smooth and easy. In reverse it now runs away, BUT only if speed exceeds 600rpm

- Jack Bauer
- Posts: 3642
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 284 times
- Contact:
Re: Prius Gen 3 Inverter Logic Board Support Thread
Excellent work. Now, let's put our thinking hats on. We can rule out any problems with the inverter , motor ,firmware connections etc. So what does that leave? Why would Johannes be happy in one direction but upset in the other? What changes in terms of signals when we reverse motor direction?
Hint : it helps to RESOLVE problems ....
Hint : it helps to RESOLVE problems ....
I'm going to need a hacksaw
- konstantin8818
- Posts: 290
- Joined: Sun Jan 19, 2020 2:33 pm
- Location: Minsk, Belarus
- Has thanked: 2 times
- Been thanked: 8 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
I love charadesJack Bauer wrote: ↑Mon Aug 17, 2020 12:39 pmWhat changes in terms of signals when we reverse motor direction?
Hint : it helps to RESOLVE problems ....

I think about resolver and motor pole pairs. One revolution of output shaft in mgr must cause 6.8 revolutions of motor rotor. I've started invertor, started revolutions plot and rotate output shaft. With respolepairs =2 it showed up to 21 revolutions. With respolepairs =6 it showed 7 revolutions per one output shaft revolution. So I believe 6 is the correct count of resolver pole pairs. And rotor started to spin only when I've set polepairs=12. With the same effect as before unfortunately...

FOC is hell of a complicated control system. It rely on accurate data. Now when I sure about correct resolver pole pairs, I'm not sure about motor pole pairs. Is it mandatory that motor pole pairs must be twice as resolver pole pairs? Or it could be any amount of them?
Does that mean that +-300 digits is accurate enough to set correct syncofs?Wiki wrote:If manualid is less than about max_motor_current/2 go back to 4. When approaching rated_motor_current/2 make your increments/decrements smaller, like down to 300 digits
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Prius Gen 3 Inverter Logic Board Support Thread
Well, thats some good news. Strange in reverse though. I never tried to reverse fast, I'll try to check tomorrow.
I will describe in text how I concluded that resolver poleparis is 2 and motor polepairs is 4 for the MGR. If I screwed up, please let me know.
Slowly spinning the motor using sine firmware in manual mode. Check the time it takes for a complete revolution on the flanges. Say it took 5s. One revolution on the motor then takes 5s/6,86 = 0,73s.
Using a signal generator generating a sinewave at 4kHz and an opamp supplying it to the resolver excitation and then measure with the oscilloscope on one of the two resolver windings. For a time of 730ms I got 4 peaks, which I interpret as two "electrical revolutions" on the resolver, hence two pole pairs.
(Absolute value of sine will have two maxima for one revolution (0-360 degrees).)
To check motor pole pairs I now disconnect the motor phases and measure with the osilloscope between any two motor phases. Now spinning the motor by hand I got 4 full cycles of sinewave while having 4 resolver peaks. My conclusion is that for one motor revolution I got four "electrica revolutions" on the motor, hence 4 pole pairs.
Now I will, also tomorrow, try to check the actual flange/motor rpm agains the software reported rpm. If they match the resolver is at least correct.
I will describe in text how I concluded that resolver poleparis is 2 and motor polepairs is 4 for the MGR. If I screwed up, please let me know.
Slowly spinning the motor using sine firmware in manual mode. Check the time it takes for a complete revolution on the flanges. Say it took 5s. One revolution on the motor then takes 5s/6,86 = 0,73s.
Using a signal generator generating a sinewave at 4kHz and an opamp supplying it to the resolver excitation and then measure with the oscilloscope on one of the two resolver windings. For a time of 730ms I got 4 peaks, which I interpret as two "electrical revolutions" on the resolver, hence two pole pairs.
(Absolute value of sine will have two maxima for one revolution (0-360 degrees).)
To check motor pole pairs I now disconnect the motor phases and measure with the osilloscope between any two motor phases. Now spinning the motor by hand I got 4 full cycles of sinewave while having 4 resolver peaks. My conclusion is that for one motor revolution I got four "electrica revolutions" on the motor, hence 4 pole pairs.
Now I will, also tomorrow, try to check the actual flange/motor rpm agains the software reported rpm. If they match the resolver is at least correct.
Re: Prius Gen 3 Inverter Logic Board Support Thread
Bex, that matches the documentation I found on line and my settings, will try 2 & 1 as Konstantine has and document any change I see.bexander wrote: ↑Mon Aug 17, 2020 7:59 pm
I will describe in text how I concluded that resolver poleparis is 2 and motor polepairs is 4 for the MGR. If I screwed up, please let me know.
Slowly spinning the motor using sine firmware in manual mode. Check the time it takes for a complete revolution on the flanges. Say it took 5s. One revolution on the motor then takes 5s/6,86 = 0,73s.
Using a signal generator generating a sinewave at 4kHz and an opamp supplying it to the resolver excitation and then measure with the oscilloscope on one of the two resolver windings. For a time of 730ms I got 4 peaks, which I interpret as two "electrical revolutions" on the resolver, hence two pole pairs.
(Absolute value of sine will have two maxima for one revolution (0-360 degrees).)
To check motor pole pairs I now disconnect the motor phases and measure with the osilloscope between any two motor phases. Now spinning the motor by hand I got 4 full cycles of sinewave while having 4 resolver peaks. My conclusion is that for one motor revolution I got four "electrica revolutions" on the motor, hence 4 pole pairs.
<Edit: I cannot explain why, but I saw no difference in behavior between your and Konstantine's resolver settings>
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