Page 24 of 37
Re: Prius Gen2 adapter board development thread
Posted: Wed Aug 26, 2020 9:57 pm
by hugow93
I was wiring up the board and inverter this evening to test in open loop mode.
Like a champ, I briefly wired the I9 to 12v backwards (12v, GND swapped, some resultant sparks and smell before I realised).
Could have been 10 seconds?
Related or otherwise, I wasn't able to get the inverter to turn on (quite likely I've made a mistake elsewhere too and will get more time to debug on the weekend).
I know the general consensus is "can't kill a Toyota inverter", but just to rule out that as a variable, would this have seriously damaged the inverter electronics?
The control board still seems to be fine, all LEDs as normal.
Any insight appreciated, thanks!
Re: Prius Gen2 adapter board development thread
Posted: Wed Aug 26, 2020 10:29 pm
by Isaac96
Smell generally means something is dead. Can you look at parts and see if any are discolored? Check things like diodes (which would have become forward biased and carried short-circuit current).
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 1:24 am
by RetroZero
hugow93 wrote: ↑Wed Aug 26, 2020 9:57 pm
I was wiring up the board and inverter this evening to test in open loop mode.
Like a champ, I briefly wired the I9 to 12v backwards (12v, GND swapped, some resultant sparks and smell before I realised).
I feel your pain. Hope it's an easy accessible diode or fuse.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 1:41 am
by RetroZero
Looks like I have Mg2 outputs running MG1 in closed loop on 12volts

. Will add some extra set up steps to wiki
That was after 'set pinswap 5' and physically swopping PWM U and W. (I was only getting juddering motor no matter the 'syncoffs' value.
Is it normal that pinswap remains at "none" after manually setting input to 5?
Next step - verify Il1 and Il2 are correctly synchronised with U and V pwm outputs.
Could I disconnect motor wiring and carry out testing with resistor (55W light bulb) between PWM out puts and Neg HV terminal (like sine mode initial set up), along with disconnecting each PWM output signals from adapter board to confirm PWM phases are correct?
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 2:03 am
by ZooKeeper
RetroZero wrote: ↑Thu Aug 27, 2020 1:41 am
Is it normal that pinswap remains at "none" after manually setting input to 5?
Yes, same as mine.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 10:16 am
by ascii-art
I'm a little confused about the current sensing. If I understand the Patreon schematic correctly, both GIVA and MIVA are connected to the same input on the MCP602SN op-amp via individual resistors (and similarly, GIWA and MIWA are joined).
I thought GIVA and GIWA are the current sensors for MG1 and MiVA and MIWA are current sensors on two of the MG1 phases. So why are they combined on the pcb? Shouldn't one only need MIVA and MIWA if driving MG2 (or G... for MG2)? Is there some kind of differential signalling going on?
Does any current on MG1 have to be taken into consideration when calibrating the IL1 & IL2 readings for MG2? Thanks for any thoughts on this, I'm a little lost.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 11:18 am
by SciroccoEV
ascii-art wrote: ↑Thu Aug 27, 2020 10:16 am
I'm a little confused about the current sensing.
This is why it's important to read the threads. I admit this becomes more difficult as they become longer, but they wouldn't be so long in the first place if people actually read them.
As has been described, the idea is to be able to use the MG1 inverter for charging purposes. There are a limited number of analogue inputs on the CPU, so the currents from the two inverters are fed into a 'summing' amplifier. Since only one inverter is going to be in use at any one time, then you're adding zero and the circuit effectively gives you the current reading from whichever inverter is actually in use.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 3:54 pm
by tom3141
Just assembling my board and noticed a discrepancy between the wiki wiring schematic and the sheet that came with the board. The wiki has pin 9 as brake and pin 10 as start, the pinout on the sheet has them reversed. I assume this is a typo on the wiring schematic on the wiki?
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 3:55 pm
by ZooKeeper
tom3141 wrote: ↑Thu Aug 27, 2020 3:54 pm
Just assembling my board and noticed a discrepancy between the wiki wiring schematic and the sheet that came with the board. The wiki has pin 9 as brake and pin 10 as start, the pinout on the sheet has them reversed. I assume this is a typo on the wiring schematic on the wiki?
What board, the thru-hole or SMD?
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 3:57 pm
by tom3141
Sorry, Johannes SMD
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 4:07 pm
by RetroZero
Good spotting BatMan! The Pin Mapping with the adapter board is correct (works for me). Willl require Zookeeper to update and replace the one on wiki?
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 4:33 pm
by ZooKeeper
Done, thanks for letting us know!
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 5:04 pm
by tom3141
Great, thanks for confirming and making the change.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 5:11 pm
by RetroZero
Took the liberty to add 5 more steps - please read through and check I haven't made any major mistakes. I am the dumb "automotive mechanic trying electrical engineering" on this forum, so read with caution, however I hope documenting the steps I know have worked for me will help the more qualified to "update/modify"..And free up Damien, Johu and others doing the hard R&D.
Re: Prius Gen2 adapter board development thread
Posted: Thu Aug 27, 2020 5:53 pm
by RetroZero
Even though I have Mg1 spinning under throttle control and 2amps current on 12 volt setup, I would like to proceed and verify Il1 and Il2 locations along with PWM outputs. Can I use the Sine procedures in Foc?
Here is the setup before "Pinswap", and would like to test the new configuration in Foc mode.
Re: Prius Gen2 adapter board development thread
Posted: Fri Aug 28, 2020 2:17 am
by ZooKeeper
Does anyone prefer v1.2 over that which is already in the Wiki?
I tidied up some and tried to match the wire colors on the I-10 connector as closely as possible to original.
Re: Prius Gen2 adapter board development thread
Posted: Fri Aug 28, 2020 4:01 pm
by RetroZero
Hope to complete PWM phase positions in relation to adapterboard pinswap5 command. Once all is good, I will move to next power stage....happened to stumble on a Gen2 battery pack looking for a good home with 211 volts sleeping inside

. I hope to start with 4 modules at a time (28 volts) , so will make up some jumper cable system and remove the original bus bar set up in the meantime. Since the Safety Lever is connected to the pack in the middle, I will have to start there and move outwards in both directions when adding modules.
Would recharging 4 modules at a time with a 24 volt charger be a problem (short term solution)? I haven't gone into charger mode of the Inverter yet, and don't have a BMS yet.
I saw somewhere talk about Prius contactors not having economisers and there being a code to add for making them draw less current..Could this be a short term solution untill I sort out some certain Kilovacs with economisers ?
Re: Prius Gen2 adapter board development thread
Posted: Fri Aug 28, 2020 5:06 pm
by SciroccoEV
Very simple coil economiser;
Use a variable power supply to find the pull in and drop out voltages for the contactor. Chose a series resistor to give you a coil voltage around mid way between the pull in and drop out voltages when running from your chosen supply (13.8V usually).
Put an electrolytic capacitor in parallel with the resistor. The current it takes to charge this capacitor will give the boost you need to pull in the contactor. You may need quite a large value to give a reliable pull in.
Re: Prius Gen2 adapter board development thread
Posted: Fri Aug 28, 2020 6:55 pm
by johu
Re: Prius Gen2 adapter board development thread
Posted: Sun Aug 30, 2020 3:25 pm
by RetroZero
OK, thanks.
Re: Prius Gen2 adapter board development thread
Posted: Sun Aug 30, 2020 5:39 pm
by johu
Just uploaded the schematic and gerber files to github:
https://github.com/jsphuebner/inverter-hardware
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 31, 2020 2:17 pm
by RetroZero
Got Foc set up on the bench, and trying to verify pinswap functions.
AFAIK, pinswap is only in FOC firmware. So I have noted my currents (that need swapping) along with PWM signals.
If I do any of the pinswap drop down selections in Foc mode, no modifications appear at inverter for currents or pwm.. (after update, refresh and restart of board)
I had to physically swop cables last time round.
Since I'm planning on bumping up voltage, and using original prius connections, I can't go swopping cables around.
Any ideas? What am I missing?
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 31, 2020 5:27 pm
by ZooKeeper
I am not sure what, if any, pinswaps are needed for the Prius Gen2 inverter powering the Gen2 transaxle. My guess is only the current sensors as the MG2 connections between the Inverter and motor are as in the vehicle I presume??
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 31, 2020 5:42 pm
by RetroZero
imwoody36 wrote: ↑Thu Jul 16, 2020 10:13 pm
greetings everyone,
Ive a question about resolver connections.
I believe these are the colors and signals for the gen2 prius MG1 resolver( and if anybody has MG2 connections I can easily find the colors by the attached photo)
Any chance of putting up a picture of MG2 resolver wiring diagram please?
Re: Prius Gen2 adapter board development thread
Posted: Mon Aug 31, 2020 6:25 pm
by ZooKeeper
RetroZero wrote: ↑Mon Aug 31, 2020 5:42 pm
Any chance of putting up a picture of MG2 resolver wiring diagram please?