Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
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: Fri Apr 24, 2020 12:31 pm anything Gen 2 and Gen 3 compatible would open up huge potential for kit configurations 👍
Would also minimise the number of parts we have to put through testing 8-)
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.
RetroZero
Posts: 730
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 🤞👍
RetroZero
Posts: 730
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 »

Hi again, just comming back to the add-ons for V3 board,to run the transaxle

1. At the very least you need 3 NPN transistors that operate the 12V PWM signals. -this is where a ULN2003 chip is a viable solution? example - https://i.ebayimg.com/images/g/qlQAAOSw ... -l1600.jpg . Then need to work out how to connect and set parameters.

2. Next you need to convert the bipolar -15V to +15V current feedback signals to 0-3.3V. A circuit has been posted earlier. You need MG2 current feedback for running FOC. Is this a good Example ?-http://www.icstation.com/images/big/pro ... 1_7347.jpg


I am working on 3 and 4 tomorrow :)

3. You need the blended in MG1 current feedback for charge mode (measure AC input current)
4. Then you can map one of the low side PWM signals, again via an NPN transistor, to the buck converter to allow HV battery charging.
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 »

RetroZero wrote: Sun Apr 26, 2020 7:59 pm
2. Next you need to convert the bipolar -15V to +15V current feedback signals to 0-3.3V. A circuit has been posted earlier. You need MG2 current feedback for running FOC. Is this a good Example ?-http://www.icstation.com/images/big/pro ... 1_7347.jpg
My previous quote of 15V p-p (-7.5V to +7.5V)may have been misinformation, I read a quote from some MIT guys the other day that they are 20V p-p which makes more sense for 400A resolution. I think that is what SciroccoEV was saying so apologies. Can anyone confirm?
RetroZero
Posts: 730
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 »

No problem, anything to move forward and rectify info along the way... So whilst waiting confirmation, might have to treat the bi-polar sensors as 20v (peak to peak). Whatever the values, I'm still trying to understand how to link up the circuits and set correct parameters... Here we go Google again today 😊
Good news is that it seems with some 'minor' mods, V3 could be a viable tested option going forward.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by Jack Bauer »

Why is it always me who has to short circuit a car battery into the inverter and catch the current sensors output on the scope?? :)
I'm going to need a hacksaw
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: Mon Apr 27, 2020 6:45 am Why is it always me who has to short circuit a car battery into the inverter and catch the current sensors output on the scope?? :)
You the one who does this way better then others so far :lol: When we'll need to measure motor's torque, we'll ask Johu.... :evil:
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Yes, health and safety FTW :P
kiwifiat wrote: Mon Apr 27, 2020 5:51 am My previous quote of 15V p-p (-7.5V to +7.5V)may have been misinformation, I read a quote from some MIT guys the other day that they are 20V p-p which makes more sense for 400A resolution. I think that is what SciroccoEV was saying so apologies. Can anyone confirm?
I was thinking more about this: viewtopic.php?f=14&t=228&start=210#p9400
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
RetroZero
Posts: 730
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 »

As for short circuiting car batteries, Damien, you're the reference for it, and seems' like they don't blow up in your face...#happybatteryshortcircuiting!
RetroZero
Posts: 730
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 »

Coming back to Current sensors.
1. Gen 2 inverter has 2 current sensors per ciruit: 2 for Mg1 (Phase V and W) and 2 for Mg2 (Phase V and W)
2. The current sensors are bi-polar - between 15 and 20 volts peak to peak (7.5v or 10v = 0 amps) Is it 15v or 20v, or is it in between these values?
3. V3 board uses these currents (converted to voltage of 0-3.3volts) to monitor over current (set in parameters by user) - only monitor?
4. V3 board has 2 Current inputs (converted to volts) - #pin 6 = II1 current - which means input current between -3v & +3v, AND #pin9 = II2
5. The +/-3v input from #pin 6 and #pin 9 are connected to a circuit in series BEFORE arriving at the V3 board. This circuit is the 'day counter' - example https://www.ebay.fr/itm/Adjustable-3A-D ... 2320889426
6.The MG1 Phase Currents V (converted into voltage) from the Inverter arrive via the 32 pin White Main connecter on pins #2 (GIVA)and #3 (GIVB). Why
2 wires? Is it positive and negative values?
7.My 2cents pea brain understands that GIVA & GIVB would connect to said 'day counter circuit board' in parallel- inputs (15v-20v), and then we set the output reference to 1.65v for input current of 0 volts.
8.If this is correct, we would duplicate the MG2 Phase Currents V via JP7 #pin 9?
9. We don't need or use Phase current W, OR is this where Johannes was talking about 'blending'? Does that mean we connect both MG current sensors in parallel to II1 and II2 respectively?

I hope the answer is not staring me in the face somewhere in the wikis (cause I looked), or I will have to go stab myself in the foot with a blunt object or something...
Again, sorry if questions seem stupid and redundant.
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: Mon Apr 27, 2020 4:50 pm 2. The current sensors are bi-polar - between 15 and 20 volts peak to peak (7.5v or 10v = 0 amps) Is it 15v or 20v, or is it in between these values?
OK, one more time...

At zero current, the voltage output is zero.

The output voltage changes at 0.025V per Amp.

Output voltage is positive for positive current and negative for negative current.

It's bi-polar, as in the output voltage changes polarity. I really can't think of a way to make the description simpler.
RetroZero
Posts: 730
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, my mistake. Yes the 7.5 volts positive = maximum + Amps reading through current sensor. Inversely for negative 7.5volts.
When Amps is at 0 amps, it equals 0 volts.
However, V3 board only allows maximum input of 3.3volts. The zero value input from current sensors is converted to a 1.65volt value(through day counter), thus 3.3volts represents max positive current and 0v represents max negative current.
If that's correct, how do we go from 2 current sensors per circuit, with 4 pin connectors (GIVA, GIVB, GIWA, GIWB), to one pin II1?
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 »

The current outputs are described in this previously referenced source; http://techno-fandom.org/~hobbit/cars/ginv/i3elec.html

The A & B channels appear to simply be duplicates.

As I have previously proposed, the summing amplifier that performs the level shifting to can have a third input added.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Thats great, I thought they were differential pairs or something. 4 wires eliminated, nice.
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: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

So I'm thinking about the pin mapping of the ModICE connector. Would be nice to use the 20+12 version to make it obvious which plug goes where.

Lets see. Wires to inverter:
  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. MUU - PWM1
  6. MVU - PWM2
  7. MWU - PWM3
  8. VH - udc input
  9. MIVT - tmphs input
  10. MFIV - desat input
  11. CPWM - PWM2_N for charging
  12. GINV and GCNV and GND - ground everything here
So thats 12 pins used up. Inside the wiring loom I would constantly tie MSDN and CSDN (inverter 2 and boost converter shut down) to 12V. I don't see a reason to disable them at any point in time.

On the inverter side I need to drop 6 pins because we only have 20 pins on the ModICE. How about
  1. Encoder channel B/Resolver S3
  2. GND/Resolver center point S1S4
  3. Encoder channel A or single channel input/Resolver S2
  4. Index pulse input/5V output/Resover excitation R1
  5. Throttle Input (0-3.3V)
  6. 2nd Throttle Input (0-3.3V)
  7. Start input (12V)
  8. Brake Input (12V)
  9. Forward (12V)
  10. Reverse (12V)
  11. Motor Temperature Input -
  12. Motor Temperature Input +
  13. DC contactor output
  14. Precharge Output
  15. Misc output - e.g. for controlling brake booster vacuum pump
  16. Misc input - for measuring brake booster vacuum
  17. CANL
  18. CANH
  19. GND
  20. 12V
So as you see I'm trying to incorporate brake booster control or some other misc function, that switches a digital output with respect to some analog input. I've dropped a few IOs which would need to be handled by some CAN IO module if needed.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

I do not see the need for 15 & 16, they are well controlled with simple vacuum switches.

Can motor Temp be a single input from a 5v or 3v3 reference? Most "engines" are that way.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
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: Mon Apr 27, 2020 5:00 pm
RetroZero wrote: Mon Apr 27, 2020 4:50 pm 2. The current sensors are bi-polar - between 15 and 20 volts peak to peak (7.5v or 10v = 0 amps) Is it 15v or 20v, or is it in between these values?
OK, one more time...

At zero current, the voltage output is zero.

The output voltage changes at 0.025V per Amp.

Output voltage is positive for positive current and negative for negative current.

It's bi-polar, as in the output voltage changes polarity. I really can't think of a way to make the description simpler.
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 http://techno-fandom.org/~hobbit/cars/ginv/i3elec.html site does not specify as far as I can see, maybe I'm going blind. It is particularly important for FOC to have accurate current data and especially important that the current inputs don't saturate when current is actually still increasing. Crap in equals crap out in other words for the FOC algorithm.
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

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
Attachments
bipolar15V-to-unipolar-3.3V.png
bipolar15V-to-unipolar-3.3V.png (9.39 KiB) Viewed 4653 times
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: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

ZooKeeper wrote: Mon Apr 27, 2020 11:48 pm I do not see the need for 15 & 16, they are well controlled with simple vacuum switches.
I remember Shane had a problem with the vacuum switch as it was lacking hysteresis so the pump would switch on and off multiple times. But anyway, it's just an application example.
ZooKeeper wrote: Mon Apr 27, 2020 11:48 pm Can motor Temp be a single input from a 5v or 3v3 reference? Most "engines" are that way.
Yeah I wish, but all electric motors I know just expose two wires of a sensor.
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 »

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?
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 »

johu wrote: Tue Apr 28, 2020 5:56 am Yeah I wish, but all electric motors I know just expose two wires of a sensor.
Isn't one of those wires connected to "common ground"? At least in Curtis controller and powerwatcher and even on Damien'g gen 2 board they are.
RetroZero
Posts: 730
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 »

"As I have previously proposed, the summing amplifier that performs the level shifting to can have a third input added"

Thanks Scirocco, but this is again over my electronics level. I 'sort of' understand the concept, and the changes Johu has done to your schematics proposal, but above me.
I found a differential summing op amp on Herdware.com, but don't know if it is the 'quick fix solution'. I am happy to pay someone to build this circuit, or let me know where I could find it as standard item and populate myself.

I am currently in position as "sitting duck" after realising that both boards cannot run a motor on its own. The 3 "extra" items require designing or aquiring as standard add ons....Depending on these 3 "extras", the appropriate board can then be ordered. Damiens being through hole, allows for more modifications from what I understand, but V3 is closer to a "tested" compatible solution (without much possibilities to modify once populated). :roll:
Glad my questions however have helped Johu to eliminate some wires :)
User avatar
johu
Site Admin
Posts: 5789
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1023 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Why don't you just build that circuit on your strip board? Dual OpAmp and a few resistors. You can skip the second input, it is only needed for charging. You need to build the circuit TWICE (thus dual opamp) once for il1, once for il2.

EDIT: a solution that would run both inverters will need two mostly independent brain boards/a dual brain board and will obviously loose the ability to charge.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Tue Apr 28, 2020 5:56 am
ZooKeeper wrote: Mon Apr 27, 2020 11:48 pm Can motor Temp be a single input from a 5v or 3v3 reference? Most "engines" are that way.
Yeah I wish, but all electric motors I know just expose two wires of a sensor.
So 5v ref and signal like automotive? Let me do some testing on my MGR, but NTC or PTC, one should be able to be either common Vref or Gnd.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
RetroZero
Posts: 730
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 »

johu wrote: Tue Apr 28, 2020 10:02 am Why don't you just build that circuit on your strip board? Dual OpAmp and a few resistors. You can skip the second input, it is only needed for charging. You need to build the circuit TWICE (thus dual opamp) once for il1, once for il2.

EDIT: a solution that would run both inverters will need two mostly independent brain boards/a dual brain board and will obviously loose the ability to charge.

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?

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

Am I getting this?
Post Reply