Page 9 of 24
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Tue Apr 14, 2020 9:06 am
by RetroZero
Johannes inverter uses signal from resolver directly. No need to convert it again...
Thanks arber333
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Tue Apr 14, 2020 12:18 pm
by ZooKeeper
post deleted
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 7:59 am
by RetroZero
Wiki updated, could some one please check and confirm it's correct.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 10:06 am
by konstantin8818
RetroZero wrote: ↑Wed Apr 15, 2020 7:59 am
Wiki updated, could some one please check and confirm it's correct.
It consists of a circuit board and programming that replaces the original logic board in the inverter and allows independent control of it without communicating with a Prius ECU.
I don't remember if it was like this before, but there is no original logic board inside gen2, control board connects to white socket from outside.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 11:19 am
by RetroZero
Ok, thanks. Yes you are right, there is no logic board.Will correct and ask for proof reading again. Yhis helps me understand everything at the same time.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 11:28 am
by RetroZero
Think I managed to do the corrections

Now to BOM and Digekey!
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 3:49 pm
by RetroZero
For info, for those who have already populated their Gen2 controller boards, the size reference for 6TB and 10TB that best fits would be appreciated. I will update the wiki at the same time (or even the BOM)
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 5:17 pm
by konstantin8818
I've bought two of 2EHDR-10P and two of 2EHDR-6P
Pins are 1mm thick so I have some doubts if they fit into holes, as my board already populated and Damien used twin sockets I can't identifie, and pins are covered in solder so I can't say thickness of pins.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Wed Apr 15, 2020 7:33 pm
by RetroZero
Thanks, that's another step in right direction.
Anyone else?
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 2:01 am
by MattsAwesomeStuff
RetroZero wrote: ↑Wed Apr 15, 2020 11:28 amNow to BOM and Digekey!
Does this help?:
http://www.digikey.ca/short/zpfj75 (it has an "error" because of a component update, just click "submit")
I was kind of frustrated reading the simple BOM, because I lacked the knowledge to fill in some of the blanks.
Here's some of the conversation from my build thread:
viewtopic.php?f=11&t=383&start=10 -- Careful when reading this, there are false answers earlier on.
I ordered a little extra of some cheap stuff. I did not order extra transistors that I then screwed up.
Included is the special 40-pin white plug and a stack of its pins to wire it, but if you have the stub of one from your Prius you won't need that.
I'm not 100% sure that's everything I needed or if I used some of my own parts, but I think it's fairly complete.
I think the big diode is underspec (not enough amps), but it's all they had. I think it's enough.
They appear to be backordered on the 90-degree terminal that you'd plug the wifi board into. You could maybe find something similar or skip it and just use component legs as pins.
They're also backordered on a capacitor apparently, but, the specs are there just pick something cheap and equivalent.
You can order the terminal blocks vertically or horizontally. Think about where you want your wires going, up or to the sides, and where you will have room to loosen the screws. I'm not sure I chose the best option, I did the opposite of what Damien used.
You will also need to buy 3 things elsewhere, the Blue Pill, an "ST-Link" (amazon/ebay, they're all the same), and your ESP8266 of choice (I chose the "Wemos D1 Mini" that Dima suggested) instead of the one Johannes uses that requires soldering jumpers to reflash. That means my wifi is easier to configure, but it doesn't plug into the Gen2 logic board, you have to wire it in (I used the cables that same with the ST-Link).
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 8:06 am
by RetroZero
Neither board alone will result in a finalised inverter you can install in a vehicle. The Gen 2 IPM current sensors are bipolar output, so with both boards, you need an interface circuit.
Does anyone have the 'how to build' interface circuit with BOM? I understand it is different depending on which board is used. Like Damien said once, 'you can never have enough boards', but if the BOM's are different, I would like to incorporate it in the parts ordering. Thanks in advance.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 8:29 am
by SciroccoEV
RetroZero wrote: ↑Thu Apr 16, 2020 8:06 am
Neither board alone will result in a finalised inverter you can install in a vehicle. The Gen 2 IPM current sensors are bipolar output, so with both boards, you need an interface circuit.
Does anyone have the 'how to build' interface circuit with BOM? I understand it is different depending on which board is used. Like Damien said once, 'you can never have enough boards', but if the BOM's are different, I would like to incorporate it in the parts ordering. Thanks in advance.
I previously posted a link to a website with a suitable circuit. There was even a component value calculator associated with it.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 9:26 am
by RetroZero
I am not looking for freebies, but where could I find this website with the info? If it is a 'proven' add-on for iether Damien's or Johu's controllers, it would help move the Gen 2 inverter developpement along. Could even be an item on one of their webshops....
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 9:29 am
by konstantin8818
For example, I'm going to feed to inverter no more then 200Amps.
According to Johu's equation of DC to AC current => 200/1.41=142A at one phase.
And according to your quote: 142*0.025=3.55Volts. So inverter will show me no more than +-3.55 volts and it is Vpp=7.1V
We want to convert a 7.1Vpp signal to a 3.3V signal so the gain should be 1/2. We can choose........
And from this one I can't use your calculator, as it only says "NaN" to me every time
Yes, I'm this far from electronics...
Can someone please explain me, what I do wrong and write me the rest of the equation?
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 10:11 am
by johnspark
arber333 wrote: ↑Mon Apr 13, 2020 10:02 pm
RetroZero wrote: ↑Mon Apr 13, 2020 9:37 pm
I'm confused, Gen 2 MG2 requires FOC and current sensors additional circuits, or modify the outputs to match the inputs on Analog to Digital Converter?
Well i am not sure why, but Prius inverter uses 2x AU6802 chips under the main board. I like them because they can provide signal from resolver and convert it either to ABZ signal or UVW commutation signal. Nice all around chip.
http://www.garnet.it/en/products/motion ... pTgl_0zaUn
Johannes inverter uses signal from resolver directly. No need to convert it again...
Arber, isn't one AU6802 for MG1 and the second AU6802 for MG2?
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 2:48 pm
by RetroZero
Does this help?:
http://www.digikey.ca/short/zpfj75 (it has an "error" because of a component update, just click "submit")
I was kind of frustrated reading the simple BOM, because I lacked the knowledge to fill in some of the blanks.
Here's some of the conversation from my build thread:
viewtopic.php?f=11&t=383&start=10 -- Careful when reading this, there are false answers earlier on.
I ordered a little extra of some cheap stuff. I did not order extra transistors that I then screwed up.
Included is the special 40-pin white plug and a stack of its pins to wire it, but if you have the stub of one from your Prius you won't need that.
Thanks MattsAwesomeStuff. I'm doubling everything, anticipating that I will require 2 boards (MG1 and MG2)....
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 3:33 pm
by arber333
johnspark wrote: ↑Thu Apr 16, 2020 10:11 am
Arber, isn't one AU6802 for MG1 and the second AU6802 for MG2?
They are of no consequence to Johannes design. There is a resolver circuit with audio amplifier.
I would use them in Lebowski board, but i rather chose electro-mechanical solution of RLS UVW encoder.
I suppose i could design rev2 board for Gen2 inverter using initial Olimex STM32-H103 chip. I could use Damiens data and schematics, keeping faithfully to the same pinout.
But i dont have any Gen2 inverter here to test it. Everything i would do would have to be tested by someone who has it.
Would you be willing to try it?
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 4:16 pm
by kiwifiat
konstantin8818 wrote: ↑Thu Apr 16, 2020 9:29 am
For example, I'm going to feed to inverter no more then 200Amps.
According to Johu's equation of DC to AC current => 200/1.41=142A at one phase.
And according to your quote: 142*0.025=3.55Volts. So inverter will show me no more than +-3.55 volts and it is Vpp=7.1V
We want to convert a 7.1Vpp signal to a 3.3V signal so the gain should be 1/2. We can choose........
And from this one I can't use your calculator, as it only says "NaN" to me every time
Yes, I'm this far from electronics...
Can someone please explain me, what I do wrong and write me the rest of the equation?
Снимок экрана (208).png
The Prius Gen2 current sensors are bipolar 15Vp-p, not 10V or 7.1V. Use whatever you like as the 1.65V reference, what is critical is the OP amp output does not saturate as in the case of FOC accuracy of the current input is important to the control algorithm :
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 4:23 pm
by konstantin8818
kiwifiat wrote: ↑Thu Apr 16, 2020 4:16 pm
The Prius Gen2 current sensors are bipolar 15Vp-p, not 10V or 7.1V. Use whatever you like as the 1.65V reference, what is critical is the OP amp output does not saturate as in the case of FOC accuracy of the current input is important to the control algorithm :
Thank you very much!
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 7:18 pm
by jnsaff
arber333 wrote: ↑Thu Apr 16, 2020 3:33 pm
I suppose i could design rev2 board for Gen2 inverter using initial Olimex STM32-H103 chip. I could use Damiens data and schematics, keeping faithfully to the same pinout.
But i dont have any Gen2 inverter here to test it. Everything i would do would have to be tested by someone who has it.
Would you be willing to try it?
I’m happy to try and also do the ordering of prototypes from JLC, will donate the leftovers (min order 5 at jlc).
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 7:37 pm
by arber333
jnsaff wrote: ↑Thu Apr 16, 2020 7:18 pm
I’m happy to try and also do the ordering of prototypes from JLC, will donate the leftovers (min order 5 at jlc).
Yeah... well i dont have experience with JLC.
I usually make a board with 0805 size parts. I work around difficult mounting of small LQFP chip by using Olimex STM32H-103 board Johannes used in Rev2. This is why my boards are all designed as Rev2. I include voltage input sensing and current sensor lines without any comparators in between.
I find it easy to assemble 0805 parts and occasional SOIC14 part, but i normally deal with DIP parts.
So if you like you can order the bare boards and assemble them by yourself. Then test the board with 12V power on desk and when you are satisfied you proceed to connect inverter.
I will start in github, so anyone can contribute.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 7:44 pm
by johu
You could also do an adapter board for V3 mainboard - much less layout work and relies on something proven.
I was also thinking about doing one. Would also like to map the charge feature to the integrated buck converter. Maybe a new "pwmpol" "unipolar" or so that just runs the high side pins. Then I can use one of the low side pins to run the buck converter.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 8:14 pm
by jnsaff
I have one of those johu boards and a gen2 board, I could just try to make it work with a bread board, should be doable, no?
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 9:04 pm
by arber333
johu wrote: ↑Thu Apr 16, 2020 7:44 pm
You could also do an adapter board for V3 mainboard - much less layout work and relies on something proven.
I was also thinking about doing one. Would also like to map the charge feature to the integrated buck converter. Maybe a new "pwmpol" "unipolar" or so that just runs the high side pins. Then I can use one of the low side pins to run the buck converter.
Ah, so you could also remap the pwm pins just for the gen2 use. I remember there was talk about this. That would be really good. If you also have a way of getting gen2 inverter than so much better. I agree, i know rev2 board a lot better than rev3. This is the reason i offered it.
But i got much work to do on Prius gen3 EMW charger design adaptation so go ahead with it.
Re: Toyota Prius Gen 2 Inverter Controller
Posted: Thu Apr 16, 2020 9:27 pm
by kiwifiat
konstantin8818 wrote: ↑Thu Apr 16, 2020 4:23 pm
kiwifiat wrote: ↑Thu Apr 16, 2020 4:16 pm
The Prius Gen2 current sensors are bipolar 15Vp-p, not 10V or 7.1V. Use whatever you like as the 1.65V reference, what is critical is the OP amp output does not saturate as in the case of FOC accuracy of the current input is important to the control algorithm :
Thank you very much!
If you plan on using the schematic make sure you change C1 to 1nF, the cutoff frequency with 100nF shown is too low.