Prius Gen 3 Inverter Logic Board Support Thread

Topics concerning the Toyota and Lexus inverter drop in boards
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

Sine firmware used just to verify the inverter can spin the motor for permanent mag motors, open loop. You need to start in manual mode, not normal run mode, no throttle input used.

"As above, start the inverter in manual mode, set ampnom to 100 and fslipsnpnt to 10, the motor should start to spin."

130 deadtime, encoder needs to be AB.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Parameters for sine mode

Post by FFMan »

catphish wrote: Fri Oct 21, 2022 3:25 pm That's absolutely incorrect. The sine version is for use with induction motors and definitely requires motor feedback. It won't work with the feedback provided by a synchronous motor.

In order to test without feedback, you would require a special mode that ignores the throttle and all feedback and just sends a fixed frequency and voltage to the motor. Hopefully somebody else can comment as to whether this mode exists or not.

On a related note, what is "MOD_SINE" mode? I could never figure it out. Is it related to testing like this, or something else entirely?
i might have this wrong but half way down the wiki https://openinverter.org/wiki/Toyota_Pr ... g_Firmware damien suggests loading the sine f/w to test the pwm, and if you seek out latuta on you tube he does the same. Set the encmode to A/B and it outputs a sine wave requiring no encoder feedback - good for testing - at least that is my understanding but if i'm wrong it might explain a few things...
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Parameters for sine mode

Post by catphish »

FFMan wrote: Fri Oct 21, 2022 3:54 pm i might have this wrong but half way down the wiki https://openinverter.org/wiki/Toyota_Pr ... g_Firmware damien suggests loading the sine f/w to test the pwm, and if you seek out latuta on you tube he does the same. Set the encmode to A/B and it outputs a sine wave requiring no encoder feedback - good for testing - at least that is my understanding but if i'm wrong it might explain a few things...
That makes sense now. If you put the sine firmware into "manual" mode, it will ignore the throttle and run at a slip. It will listen for encoder feedback, but it won't get any, and hence will just output the fixed slip frequency. You mentioned throttle in your post, so I suspect you have not started the inverter in manual mode.
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Parameters for sine mode

Post by FFMan »

catphish wrote: Fri Oct 21, 2022 4:38 pm That makes sense now. If you put the sine firmware into "manual" mode, it will ignore the throttle and run at a slip. It will listen for encoder feedback, but it won't get any, and hence will just output the fixed slip frequency. You mentioned throttle in your post, so I suspect you have not started the inverter in manual mode.
deffo starting in manual mode and throttle makes a difference, watch the video link i posted.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

It shouldn't, put sine 4.94 on there and try again.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

Bigpie wrote: Fri Oct 21, 2022 4:59 pm It shouldn't, put sine 4.94 on there and try again.
i see 5.2 has just recently been put on git. Should i try and find 4.94 specifically (not sure where, i'm not that fluent with git) or are you saying something later than what I have should be OK ?

I note the version number isn't readily visible, for some reason the version number is not in the file name as the likes of Dell etc do so, can i identify it from the file date ?

Does throttle affect it because fweakstrt & fweak come into play ?
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

All versions are https://github.com/jsphuebner/stm32-sine/releases

https://openinverter.org/wiki/Using_FOC_Software says theres a bug with manual mode 4.97 upwards. I say 4.94 because that's the version I used so know manual mode works as expected.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
Ctwidle
Posts: 89
Joined: Wed Jan 06, 2021 9:44 pm
Been thanked: 11 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Ctwidle »

I’m Slightly ahead of FFman. I managed to get good plots using sine firmware then switched to FOC (currently trying 4.96 after failing to get spinning with 5.20) Yaris inverter with Prius board, 120v and parameters as per Damien’s video. With iD 1 and iD 3 Motor twitches in opposite directions but doesn’t spin, 60w bulb glows slowly but not full brightness. Udc falls to around 5v on refresh with iDC -10.6, iL1 -34.9, iL2 -39.9, iD 0.75, i1 -55.7.

I am a bit suspicious that the inverter could be faulty as all of the HV cover plates had been removed along with what I assume was a fuse in the slot in the image. But Any comments or suggestions would be appreciated.
Attachments
image.jpg
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by m.art.y »

Ctwidle wrote: Sun Oct 23, 2022 9:45 am I’m Slightly ahead of FFman. I managed to get good plots using sine firmware then switched to FOC (currently trying 4.96 after failing to get spinning with 5.20) Yaris inverter with Prius board, 120v and parameters as per Damien’s video. With iD 1 and iD 3 Motor twitches in opposite directions but doesn’t spin, 60w bulb glows slowly but not full brightness. Udc falls to around 5v on refresh with iDC -10.6, iL1 -34.9, iL2 -39.9, iD 0.75, i1 -55.7.

I am a bit suspicious that the inverter could be faulty as all of the HV cover plates had been removed along with what I assume was a fuse in the slot in the image. But Any comments or suggestions would be appreciated.
Hi, it is unlikely the inverter is faulty because it wouldn't have worked with sine firmware also. You need to watch Damiens FOC tuning video very carefuly and enter all the correct parameters. FOC need current sensors to be correctly configured and check if the new firmware still need "pinswap" option to tell the software on which phases the current sensors are (because toyota have current sensors on 'wrong' phases). Then you need to search for the correct resolver configuration with trial and error. And after initial test with the lightbulb when you have confirmed the inverter is not taking all the possible power it can get from the battery (light bulb not going full bright) you need to REMOVE THE LIGHTBULB to get the motor to do anything. Inverter will attempt to draw all the available power if current sensors are wrongly configured or inverter is faulty so with a lightbulb you check for that. After you have checked that then further the lightbulb will be starving motor from the Amps it needs. Sometimes helps if you have thin battery wires when testing. They will be sufficient to spin the motor but will fail if there is something wrong. I once observed my thin automotive wires evaporate in an instant when inverter attempted to pull all the power from the battery - it worked like a fuse.
Ctwidle
Posts: 89
Joined: Wed Jan 06, 2021 9:44 pm
Been thanked: 11 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Ctwidle »

Ah, I got the impression from the video that it wouldn’t spin with the sine firmware if the resolver wiring wasn’t correct? I’m not sure that Damien makes it clear how to tell if you have the wrong combination without lots of trial and error with the things like Pinswap.
I just uploaded 4.90 (couldn’t find a 4.94) and then tried )all the pinswaps variations and Currents12 produced a single revolution so I tried it without the bulb and was glad I had a 20amp car fuse in circuit☠️.
Its getting late down under so I will revisit the resolver connections in the am.
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

Some progress here.

Thanks to bigpie for the shout on f/w versions. Loaded 4.90 and MG2 spins smoothly and now the throttle pot makes no difference, so there is a bug in the later versions of sine in manual mode it seems. Might be worth a line in wiki article about this.

So I am pleased with the progress, and need to move to FOC next after doing the pin identify etc.

I am seeing on the spot values a heatsink temp of 100 and a motor temp of 170 even when it is stone cold. I have the temp sensor type set to semikron which i thought was right for Prius Gen3 gearbox, but maybe not ?
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by m.art.y »

Ctwidle wrote: Sun Oct 23, 2022 11:41 am Ah, I got the impression from the video that it wouldn’t spin with the sine firmware if the resolver wiring wasn’t correct? I’m not sure that Damien makes it clear how to tell if you have the wrong combination without lots of trial and error with the things like Pinswap.
I just uploaded 4.90 (couldn’t find a 4.94) and then tried )all the pinswaps variations and Currents12 produced a single revolution so I tried it without the bulb and was glad I had a 20amp car fuse in circuit☠️.
Its getting late down under so I will revisit the resolver connections in the am.
Sorry if I wasn't clear enough. You only remove light bulb when you are confident pinswap is set correctly. Setting pinswap CORRECTLY is essential, with it set wrong you will get fuses blown or cables melted. Pinswap can swap just the phases on which current sensors are read or it can also swap encoder ouputs at the same time too and it can perhaps do other things, hence the many options. I can't remember which pinswap option you need to set for Prius/Yaris inverters perhaps other guys like @Bigpie who are using Prius inverters could share? But there was even a video about pinswap in a Prius inverter.
Permanent magnet motor and inverter testing with sine firmware does not utilise any feedback from any sensors including resolver. So it does not prove that you have your resolver wiring correct - only that motor and inverter works.
FOC absolutely need feedback from current sensors and motor position sensor to spin the motor.
Ctwidle
Posts: 89
Joined: Wed Jan 06, 2021 9:44 pm
Been thanked: 11 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Ctwidle »

Support appreciated😀. I came to the conclusion that my power source might not be able to supply the necessary amps. 6 sealed 12v batteries were ok but the 36v bench PSU may have suffered from over exertion! New supply with current limiting capability (plus an in-line fuse ‘cos I like belt and braces) and the motor is ready to leap off the bench. Now that my nerves have settled from mistyping the 0v I can think about some proper tuning.
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

FOC tuning.

So since getting the mg2 spinning in sine mode i loaded the foc f/w and started following the long foc video damien and johannes put together.

I identified the resolver pairs and exciter, and verified exciter output with a speaker. I then tried all 4 combinations of wiring as Damien suggests. However it wasn't clear to me exactly what one is looking for, and what a bad set looks like.

If you look here https://www.dropbox.com/sh/046vu69fom3d ... rGIUa?dl=0 there is a shot of each graph from each combination and the one damien shows in the video (the one with no number). My number 2 looks the most like his, but do the others look wrong and to be excluded or am i not doing this right ?

On the basis i thought no 2 was right i moved on to try and turn the motor, so i set the parameters as per the video (though i note the earlier f/w shown in the vide might have different pin swap setups) inc set pinswap 5 , applied my hv with the bulb in circuit and set manual id to 1, then 2 up to 5 (using 70v). However, all I get is the lamp lights up, the motor does nothing. I'm reluctant to remove the bulb from the circuit until I get the behaviour Damien suggests at about 1hour 3 mins into the video.

What might i be doing wrong here ?

Update - i watched Latuta and he set pinswap to PWM23, which seems to equate to a value of 8 so i set that also. I also tried taking the bulb out of circuit, and the whine from the inverter got louder but no motor movement.

thank you
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

I'd try plotting again, turn the rotor slowly but smoothly if possible. You're looking for a saw tooth shape from 0 to 360 repeating.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

ok - tried it again turning smoother but results are similar so i think something else is amiss.

Couple of things spring to mind, when i'm turning the shaft with the inverter started but no HV, it is fighting me and hard to turn, then sometimes it lets go, spins freely suddenly and the plot goes flat, though i can see no error reported.

Second thing is, whilst i think i have the resolver pairs identified from the resistance, what are the pairs on the inverter side. I have 4 wires:-

encoder A
encoder B
Resolver cos
resolver sin

So made a pair from encoder A & cos, and a pair from encoder B and sin, and then used these as my pairs to try in all 4 combinations. But not sure I have paired hose correctly, the video uses different inverter connections and ties the grounds together so its not clear.

For the encoder i am using ampseal pin 20, and ground to connect to the low ohm pair from the gearbox.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

OK - V1C board Prius Gen3 inverter and gearbox wired to MG2

Been through all the wiring again and checked the pairs etc (Pair 1 - encoder A & Sin, Pair 2 - encoder B & cos).

I downgraded to 4.90 FOC f/w figuring maybe if the latest version of sine f/w was broken in manual mode then maybe foc is somewhere too, and it seems the videos from Damien and Latuta are on earlier versions. Didn't seem to make any difference.

Results are pretty much the same as before, 4 graphs as shown:-

Image

https://www.dropbox.com/s/yip2iv3dz8ug5 ... 1.PNG?dl=0

https://www.dropbox.com/s/jrvlouy11ek8y ... 2.PNG?dl=0

https://www.dropbox.com/s/u26poqy7751ht ... 3.PNG?dl=0

https://www.dropbox.com/s/68mc4nujufxkz ... 4.PNG?dl=0

Plots 2 & 4 are a mirrors of 1 & 3 in terms of the orientation of the teeth.

Do any/none look right ?
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by m.art.y »

FFMan wrote: Tue Nov 01, 2022 9:38 am Do any/none look right ?
Not all graph is visible isn't clear if it has full 0-360 amplitude. So what is happening? Do you hear a specific sound that the motor is making as you try to spin it? Check if you have your settings right in encoder mode, pole pairs, pinswap. And did you wire resolver inputs correctly. Without correct feedback from current sensors and resolver the motor is not going to budge.
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

This is mine from when I was getting setup.
You can see it has a plot from 0 climbing up to 360 and dropping back to 0. If you're spinning it too fast or not using enough plot points you'll cut off bits.
BTW, if you attach the images directly to the thread, it'll be easier for people reading to view and compare and ensure they remain should you deleted them from dropbox.
Attachments
3 yellow_green.png
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

> Not all graph is visible isn't clear if it has full 0-360 amplitude.

sorry - yes each is swinging from 0 to 360, very little jitter at idle.

I have (names from memory):-

encoder - resolver
polepairs 4
respolepairs 2
pinswap pwm23

> And did you wire resolver inputs correctly.

well that is the queston really - what is correctly. I identified the resolver pairs with the meter, then as stated above paired on the ampseal encoder A with Sin, and encoder B with cos connections. The V1c is slightly different to the version used in Damiens video so it was best guess but seemed to be confirmed by the russian diagram.

So when I turn on the 80v (lithium) HV with 100w bulb inline and step increase the manualid the light stays on and the motor does nothing. I believe the bulb should extinguish after a few seconds. I've upped the manualid to 5. Not tried with the bulb bypassed yet as it does not seem to be recommended at this stage.

appreciate the response.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by m.art.y »

FFMan wrote: Tue Nov 01, 2022 10:53 am So when I turn on the 80v (lithium) HV with 100w bulb inline and step increase the manualid the light stays on and the motor does nothing. I believe the bulb should extinguish after a few seconds. I've upped the manualid to 5. Not tried with the bulb bypassed yet as it does not seem to be recommended at this stage.
Because your voltage is low the bulb is absorbing all the amps needed by the motor to spin. That's why it stays lit. I was not able to get my motor to spin with a bulb in line. Use a fuse on your battery side and try removing the bulb.
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bigpie »

Bulb needs to be taken out of series after precharge and you've verified you've got some current control otherwise you motor will either not spin or start to briefly then stop.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

Bigpie wrote: Tue Nov 01, 2022 10:17 am This is mine from when I was getting setup.
You can see it has a plot from 0 climbing up to 360 and dropping back to 0. If you're spinning it too fast or not using enough plot points you'll cut off bits.
BTW, if you attach the images directly to the thread, it'll be easier for people reading to view and compare and ensure they remain should you deleted them from dropbox.
i edit my post and use the /img markup option but that doesn't appear to have worked. Do i need to push my images somewhere else first as i can't see a place to browse for a local image file. I must be being a bit dense...
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
mjc506
Posts: 343
Joined: Wed Sep 09, 2020 9:36 pm
Location: Wales, United Kingdom
Has thanked: 30 times
Been thanked: 28 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by mjc506 »

Click on 'full editor & preview' Can either upload images, or just paste into the text box.
FFMan
Posts: 309
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 45 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by FFMan »

ok - so fired it up, precharged it then bypassed the bulb set manualid to 5 and got this

https://www.dropbox.com/s/wq0kdxznjvg91 ... 4.MOV?dl=0

this is using the pairs shown in the second graph.

Given my graphs were a little inconclusive, shall i just try each pair combination in turn to see if motor spins or is there definitely still a bigger issue ?

i've added a dump of my params in case you can spot anything. Deadtime is set to zero, i got the impression this was right for Prius.
Attachments
params (4).json
(1.29 KiB) Downloaded 96 times
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
Locked