Page 9 of 24

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
SciroccoEV wrote: Thu Apr 09, 2020 9:09 pm Once again; Bipolar, ie voltage output is both positive and negative, 25mv per amp.
And just to try and keep the length of this thread down; https://daycounter.com/Circuits/OpAmp-L ... fter.phtml
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 :cry:
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

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
SciroccoEV wrote: Thu Apr 09, 2020 9:09 pm Once again; Bipolar, ie voltage output is both positive and negative, 25mv per amp.
And just to try and keep the length of this thread down; https://daycounter.com/Circuits/OpAmp-L ... fter.phtml
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 :cry:
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.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Thu Apr 16, 2020 11:44 pm
by MattsAwesomeStuff
In the "Do-ocracy" sense, as in, those willing to do the work decide how it's done, I have nothing to interfere.

But, I presume anyone wanting to create a JLPCB version of the Gen2 inverter is not going to be using the Blue Pill anymore, and just using the STM32 right?

A possible challenge is that Damien had to reinterpret the circuit a bit (for the Gen3) to fit JLPCB's parts inventory, so, it's not quite as simple as just transcribing the schematic.

And... anyone going through the effort of doing that... should we make a feature list of things we'd like to see on the board? Duplicate the driver so it can do M1 and M2? Include charger support? DC support? Boost converter support? DC-DC 12v support?

My thinking is... I picked up an early version because I wanted to get rolling ASAP. With, somewhat being okay with buying a fancier version later. So for me, since I've already put ~$120 in parts into a test version, I would like to hang on (and support however I'm able) a complete board, not another in-between board.

But I will not be the one doing the work, so, just idle thoughts from me.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 12:51 am
by kiwifiat
I believe konstantin8818 would like to run a prius transaxle with his gen2 board. To do that he needs to condition the current sensor signals coming from the prius inverter so they can be read correctly by the STM32. As SciroccoEV has pointed out for a few $ in parts that can be done. In addition to run a PMSM with the Gen2 board a few more $ in parts and a bit of strip board the resolver interface can be constructed. That may not be a suitable solution for some but as Jack Bauer has observed it is not brain surgery.

Jack Bauer and yaroslav have both demonstrated that the bluepill can run an induction motor. johu fixed the issue with the pwm shutting down due to interference on the bk-in pin on the bluepill some time back. I personally plan using the bluepill on a Ford Escape hybrid transaxle not because it is the optimal solution but probably for the same reason Jack Bauer did the gen2 board in the first place, just for kicks and the fact that it is ridiculously cheap as was the transaxle @ $100CAD . It may not make a lot of sense but for me it is a fun exercise.

Anyone starting from scratch and lacking the required electronics skills has the option of the rev3 board as it has everything already onboard to run both induction and pmsm's.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 2:44 am
by ZooKeeper
post deleted

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 5:38 am
by RetroZero
RetroZero is also planning on running the Gen 2 inverter and transaxle...Like Matt, I can only watch and learn, and at best be a crash test dummy. Willing to 'risk' ordering a Rev3 whilst the 'little worthwhile is easy part' continues. 😉 Planning to make up adapter between Mg1 & Mg2, but get her spinning first I say.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 6:00 am
by konstantin8818
kiwifiat wrote: Fri Apr 17, 2020 12:51 am I believe konstantin8818 would like to run a prius transaxle with his gen2 board.
Thank you for the update with capacitor.
For now I'm planning to test Damien's board with my ACIM motor which currently runs under curis 1236. I want to see what difference prius inverter can do. So all I need now is to wait untill my contactors arrive.
I've got no prius transaxle yet, but I've got Lexus MGR. I want to run it with Johu's board and for that I need that current sensor signal converter. As well as BUS voltage sensor signal devider.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 6:09 am
by konstantin8818
ZooKeeper wrote: Fri Apr 17, 2020 2:44 am
DC-DC 12v support?
Already works! Just need three wires, 12v x2 and 5v x1 (I just updated the Wiki ;) )
I can't see any changes in wiki. Can you please show it here, wich wires goes where?

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 11:57 am
by mattndex@gmail.com
Trying to upload a few pages of what I found. Is there a way we can share the Toyota manuals or it's illegal? For now just trying to upload screen shots of C5 connector signals.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 12:07 pm
by mattndex@gmail.com
NODD and VLO are the ones giving me a headache at the moment because I don't have anywhere to test them.

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 12:20 pm
by ZooKeeper
post deleted

Re: Toyota Prius Gen 2 Inverter Controller

Posted: Fri Apr 17, 2020 12:26 pm
by johu
Not sure if uploading the manuals is a good idea, better link to an existing source. Some excerpts should be fine though.
Is there any info on the part number of those control input connectors for the DC/DC converter (and aux inverter)?
Any info on the 2 pole connector for power, next to the 32-pin one?
Any info on the aux inverter in general?