Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
User avatar
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

Post by SciroccoEV »

RetroZero wrote: Tue Apr 28, 2020 1:51 pm So V3 PWM outputs are 3.3v.
Main inverter 32 pin (MUU,MVU,MWU) require PWM input signals of 12v. This is where the ULN2003 solves the problem - boosts 3.3v to 12v?
The inverter PWM inputs are pulled high internally to approx. 15V, in which state the lower transistor is turned on. Pulling one of these inputs low turns on the upper transistor. The 'Blue Pill' board used discrete transistors in open collector configuration to pull the inverter PWM inputs low. The ULN2003 is a bank of open collector Darlington transistors.
Then the circuit for dual op amp receives the MG2 (GIVA and GIVB) inputs from inverter (15v p-p), and sends 0 - 3.3v signal to II1
GIVA and GIVB are generator currents, not motor. The A & B channels are copies of each other
You need to use one of MIV(A or B) and one of MIW(A or B); note how the letters, V & W, relate to the phases MVU & MWU.
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Thanks for corrections. MG2 = MIVA and MIVB
What I am trying to understand, is the PWM signals. They exit the Inverter and are sent to the V3 board. The inputs cannot be reveived in their original voltages (12v), hence the ULN2003 to convert to 3.3v?
rikohm
Posts: 29
Joined: Tue Feb 26, 2019 8:08 pm
Location: Piteå, Sweden

Re: Prius Gen2 adapter board development thread

Post by rikohm »

RetroZero wrote: Tue Apr 28, 2020 4:14 pm Thanks for corrections. MG2 = MIVA and MIVB
What I am trying to understand, is the PWM signals. They exit the Inverter and are sent to the V3 board. The inputs cannot be reveived in their original voltages (12v), hence the ULN2003 to convert to 3.3v?
V3 board sends PWM signals to inverter but they need to be amplified from 3.3->12V by the ULN2003...
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Prius Gen2 adapter board development thread

Post by Kevin Sharpe »

RetroZero wrote: Tue Apr 28, 2020 4:14 pm What I am trying to understand, is the PWM signals.
does this help?

https://en.wikipedia.org/wiki/ULN2003A
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.
User avatar
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

Post by SciroccoEV »

RetroZero wrote: Tue Apr 28, 2020 4:14 pm Thanks for corrections. MG2 = MIVA and MIVB
What I am trying to understand, is the PWM signals. They exit the Inverter and are sent to the V3 board. The inputs cannot be reveived in their original voltages (12v), hence the ULN2003 to convert to 3.3v?
Once again, MIVA and MIVB are duplicate signals.
You need signals from phases V and W, so for simplicity use MIVA and MIWA.

The PWM signals are inputs to the inverter, not outputs.
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Thanks everyone - I realise I have been mixing things up...to make things worse.
So PWM pins on adapter board are OUTPUTS of 3.3v that require an amplification to 12v (by ULN2003). Adapterboard to MUU, MVU, MWU for MG2.
At the same time, the Current values INPUTS on adapterboard need to be corrected from 15v p-p(bi-polar) down to 0v - 3.3v.
The current values are connected in parralel, MIVA and MIWA for MG2, via the op-amp circuit before arriving at the adapter board II1
A duplicate is required for MG1 (for charging purposes)
I hope I got it now.
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I assume the "add-ons" for PWM signals, current sensor reading and blending are going to be resolved with new board. I am about to order Johanes's V3 board, along with necessary resistors, ULN2003, strip boards etc, and 'try' to create these add-ons....
I have a registered company here in France, so I could also ask for quotes to create the new board here, if Johannes is close to having the schematics, instead of me designing and building something 'a little beyond my skills'....no pressure, I am happy to stumble on if we are still in early stages of board fabrication..
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

You guys have been very patient with me.
Just in case it will be a while before a board can be built for testing, and after spending quite a few hours, again, I hope I have worked out this "bipolar-to-unipolar-with-AD822 circuit". Still a few blanks to fill in...if anyone has energy left - I appologise for tier 4 questions again.
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

oops, attachement not in link..
Attachments
Modified biploar-to-unipolar.png
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Schematic done, does anyone feel like routing this out in KiCAD?
I've included a footprint for the ModICE connector but I believe there is a better one in KiCAD.

EDIT: I have started layout, therefor removed the Eagle file here.
Attachments
prius.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
kiwifiat
Posts: 99
Joined: Sat Dec 22, 2018 9:39 pm
Location: Vancouver, Canada
Been thanked: 10 times

Re: Prius Gen2 adapter board development thread

Post by kiwifiat »

SciroccoEV wrote: Tue Apr 28, 2020 8:04 am
kiwifiat wrote: Tue Apr 28, 2020 12:32 am So we have the transfer function but not the limits, it isn't possible to design a suitable conditioning circuit without knowledge of the output range.
Do you know what voltage the output saturates at? Are they 15V p-p or 20V p-p?
The linear output range of the current sensors likely exceeds the over current shutdown point of the power module.

Damien has performed short circuit tests to determine the approximate over current shutdown point.

Do I have to connect the dots for you?
I follow your logic. I found a reference here: http://isopack.blogspot.com/2015/02/tur ... silly.html and was hoping you might be able to corroborate the 400A rating of the MG2 sensors which would put them at 20V p-p. Certainly makes getting the level shift circuitry spot on. I haven't been able to locate any actual ratings for the gen2 current sensors in any of the Oak Ridge Lab reports sadly.
kiwifiat
Posts: 99
Joined: Sat Dec 22, 2018 9:39 pm
Location: Vancouver, Canada
Been thanked: 10 times

Re: Prius Gen2 adapter board development thread

Post by kiwifiat »

johu wrote: Tue Apr 28, 2020 5:22 am I would assume +/-600A or +/-15V to be a sensible range. So 30V p-p. FOC doesn't need that good SNR but I agree saturation would probably trigger a current limit.

EDIT: modified your design for roughly +/-15V and two inputs
You know what they say about assumptions! Regarding current sensor noise the engineering teams that designed the Honda IMA, Gen1 Leaf, Volt/Ampera inverters all thought it was important enough to include 3 current sensors in their designs as did the designer of the Lebowski controller.

Cost accountants getting in the way of engineering excellence. Sure we are stuck with 2 current sensors in the Toyota inverters and yes they run just fine. I think it is worth the effort to get the current data going in to the controller as accurate and with highest precision possible and to do that we need to know their maximum rating. Maybe Damien will come to our rescue.

I like the way you eliminated the precision voltage reference on the level shift schematic.
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Nice one Johu, but KiCAD bayond my scope. Let me know if you're interested in me getting confidentiality agreement signed with local company SMEE, and getting quote for making boards in France based on schematics.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

kiwifiat wrote: Thu Apr 30, 2020 4:57 am You know what they say about assumptions! Regarding current sensor noise the engineering teams that designed the Honda IMA, Gen1 Leaf, Volt/Ampera inverters all thought it was important enough to include 3 current sensors in their designs as did the designer of the Lebowski controller.
Well I didn't do much engineering excellence on the Leaf dropin board either (just a simple voltage divider) and it works just fine :)
The Lebowski is special as it runs sensorless control which we do not.
If it turns out a huge problem it's easily solved with different resistor values.
RetroZero wrote: Thu Apr 30, 2020 6:46 am Nice one Johu, but KiCAD bayond my scope. Let me know if you're interested in me getting confidentiality agreement signed with local company SMEE, and getting quote for making boards in France based on schematics.
I ain't signin no agreement :P I'll route out the board in Eagle today and/or tomorrow and make it public.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Sorry, not you. The company that makes the boards here in France. Wouldn't want them to go using it for anyone else. I have found out, the company Advantics, is based not too far from me. They might be creating there circuit boards locally, and might be using SMEE..
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Done :)

Some changes in pin assignment:
  1. GIVA - to level shifter 1
  2. MIVA - another input to level shifter 1
  3. GIWA - to level shifter 2
  4. MIVA - another input to level shifter 2
  5. VH - udc input
  6. MIVT - tmphs input
  7. MFIV - desat input
  8. CPWM - PWM2_N for charging
  9. MUU - PWM1
  10. MVU - PWM2
  11. MWU - PWM3
  12. GINV and GCNV and GND - ground everything here
  1. Encoder channel B/Resolver S3
  2. GND/Resolver center point S1S4
  3. Encoder channel A or single channel input/Resolver S2
  4. Resover excitation R1
  5. Resover excitation R2
  6. 5V output
  7. Throttle Input (0-3.3V)
  8. 2nd Throttle Input (0-3.3V)
  9. Start input (12V)
  10. Brake Input (12V)
  11. Forward (12V)
  12. Reverse (12V)
  13. Motor Temperature Input -
  14. Motor Temperature Input +
  15. DC contactor output
  16. Precharge Output
  17. CANL
  18. CANH
  19. GND
  20. 12V
I use the TDA2822 in bridge mode now, meaning it can do true bipolar output -> Can generate 9V p-p from 5V supply rail. And that means I could remove the boost converter. I also removed the over current comparator since the Prius HW takes care of that. ABZ encoder is no longer supported, don't know of anyone who ever used it.
The only unknown is the "MFIV" fault output from the inverter. Don't know yet what it outputs as "good" and "bad". Right now I'm assuming it outputs 12V for bad and 0V for good.
Attachments
prius-gen2-v1.0.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen2 adapter board development thread

Post by konstantin8818 »

Jack Bauer wrote: Sun Mar 01, 2020 1:15 pm Can never have too many boards:)
...so already have got two and definitely going to buy third one :)
User avatar
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

Post by SciroccoEV »

johu wrote: Thu Apr 30, 2020 7:06 pm The only unknown is the "MFIV" fault output from the inverter. Don't know yet what it outputs as "good" and "bad". Right now I'm assuming it outputs 12V for bad and 0V for good.
From the Prius manual...
MFIV.JPG
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

SciroccoEV wrote: Thu Apr 30, 2020 7:35 pm From the Prius manual...
So it means
normal - 5.4V to 7.4V
abnormal - 2V to 3V

In other word <3V abnormal ?

Not a very nice logic level...
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
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

Post by SciroccoEV »

johu wrote: Thu Apr 30, 2020 8:15 pm In other word <3V abnormal ?

Not a very nice logic level...
I've found that the stated voltages don't necessarily match up with reality on the bench.
Perhaps they do when feeding impedance of the OEM ECU.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 adapter board development thread

Post by ZooKeeper »

johu wrote: Thu Apr 30, 2020 7:06 pm Done :)
<<<<<<< = Much Drooling..... :D
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Yes, much drooling. Awesome job (again) Johu! Will see locally how much to make up 5 (for testing), and delay times?
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Easy, easy :) will get some made at JLC and test them, then will publish the design.

Did a little testing on my inverter, with just 24V DC voltage. So 25mV per A of phase current is confirmed - measured 64A RMS with the clamp meter and getting 1.7V RMS on the sensor output. You can see it's not quite sinusoidal, I think thats because the inverter behaves weird at low sine amplitudes. Still hoping higher voltages to mitigate this.

MFIV signal is 7.2V indeed but I couldn't provoke over current with my worn out lead batteries ;)
Attachments
PriusCurrent.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

I am about to order some parts. Can anyone tell me the part number of the 2-pole "inverter 12V power supply connector" (next to 32-pin signal plug):
Image
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 731
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 329 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Sorry, looked from connecter I have with reference 11717. No luck, will check tomorrow again if no on can come to rescue
Post Reply