Prius Gen 3 Inverter Logic Board Support Thread

Topics concerning the Toyota and Lexus inverter drop in boards
Locked
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by bexander »

How did you measure the resistance? Just using a multimeter for low resistances is a bit inaccurate.
May I suggest using a bench power supply and push 10A (verify the current with a multimeter) through the inductor and measure the voltage drop in mV mode on the multimeter. Then calculate the resistance. This will give more accurate result.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by johnspark »

yes you are right bexander, i used to have access to a 10 amp and a 100amp ductor, but i dont work at the company that has those things anymore. Probably could inject 10 amp as you say and measure v drop.
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Sorry guys can we keep on topic please. If you wish to discuss the boost inductor characteristics please start a new thread.
I'm going to need a hacksaw
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Programming guide video is now live :
I'm going to need a hacksaw
MattsAwesomeStuff
Posts: 874
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 280 times
Been thanked: 165 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by MattsAwesomeStuff »

Left this as a Youtube comment. I lack skills or funds to contribute, so, just trying to do what I can.
---
This tutorial will show you how to program both of the chips on the Prius Inverter Logic Board, the "STM32" and the "ATmega328p", necessary for getting the inverter board to work, for those who chose to just purchase the populated board. If you purchased the full kit, these will already be programmed.

Timestamps:

1 - Power the board. 12v to the board. Top left (outside) is ground. 6 pins down is the 12+. Red LED should stay lit.

2 - STM32 Programming. Several methods. You're watching a tutorial, so this is the easiest method. Purchase an "ST-Link v2" dongle from eBay, only a few dollars, it usually comes with the jumper wires. The pinout is shown right on the case. You will not use all the wires, only 3 of them. These 3 wires connect to 3 pins on the Prius Logic Board (but not in the same order).

You will use:

"SWCLK" (single wire clock) - To outside pin closest to board edge.
"SWDIO" (single wire data input and output) - To inside pin.
"GND" (ground) - To middle pin.

Then plug the dongle into a USB port on a PC.

3 - ST-Link Software. Link in description. Download and install it.

Click "Target --> Connect" from top menu. You want to see the screen get filled with a data dump of symbols. In the upper right of the screen you can see it identified the device.

In the main viewing window are multiple tabs, click the "Binary File" tab to select it. This will ask to open a file, you choose: "stm32_loader.hex" from OpenInverter.org, download ahead of time. This will change what shows up in the viewing window.

Click "Target --> Program and Verify" from the top menu.

This pops up a window, and you can probably just click "Start" on that window. This programs the STM32 chip with the stm32_loader.hex file.

The STM32 on your Prius Inverter Board can now load other files.

You can close the stm32_loader.hex tab, and go back to the "Binary File" tab, which will ask to open another file. You choose: "stm32_sine.hex" or whatever other OpenInverter.org configuration file makes sense for your project (.hex for motors with encoders, .foc for motors with resolvers, the type of motor you are using determines which of these to pick).

Same as last time, click "Target --> Program and Verify" from the top menu. And click Start.

The STM32 on your Prius Inverter Board now also has the software to run a motor using a sine wave (or FOC) and is set to use that.

A different red LED on the Prius Inverter Board will not be rapidly blinking continuously.

You are now done with the ST-Link USB dongle, it's no longer needed. Future updates can be done via wifi.

4 - Programming the AT-MEGA 328P chip. There are many ways to do this, you are watching a tutorial, so this is the easiest.

You will need to purchase an "Atmel-ICE" device. Plug one end of the ribbon cable it comes with into the "AVR" plug on the device. Plug the other rend of the ribbon cable into the (only) 6-pin header on the Prius Inverter Board, with the tab on the plug facing the outside of the board.

A green led will illuminate on the Atmel ICE device.

(Damien skipped this). Plug the Atmel ICE into a USB port on a PC.

5 - Atmel Studio Software. Link in the description. Download and install it.

Click "Tools --> Device Programming" from top menu.

A window appears, select:
"Tool" - Atmel-ICE
"Device" - ATmega328p
"Interface" - ISP

Click Apply.

Click "Read" below "Device Signature", to initiate communication with the chip. Some numbers and symbols should now appear below the Device Signature.

On the left menubar, select "Fuses". In the pane to the right, under "Fuse Register", change the values to match the following:
EXTENDED: 0x05
HIGH: 0xDE
LOW: 0xFF

Click the "Program" button on the bottom right of this pane to program the chip. A quick progress bar will appear and the chip will program

Just to the right of "Program", click the "Read" button. Then, back up top by the Device Signature, click that "Read" button too. (Why?)

On the left menubar, select "Memories". In the pane to the right, is a "Flash" title, and a file you can choose. You want to choose: "optboot_atmega328.hex" from wherever you installed your Arduino IDE. (We've skipped the step of downloading an Arduino IDE?).

Click the "Program" button right below the Flash and filename.

The ATmega328p chip should now have an Arduino bootloader loaded onto it, which means the Arduino software can now load files onto that chip.

6 - Conclusion. Don't do this, and don't support Damien, he has threatened to make more videos and boards if you do.
----

A couple bits were ambiguous to me, I added some commentary that I hope is correct (I've never done this before, and I don't have one of these boards, and I'm not using a Gen3). Please correct me if I'm wrong.

Next some screencaps of the procedure might be helpful to people, either here or on the wiki.

I'm curious (but don't need to know), what the purpose of the ATmega328p is, and why we flashed it with an arduino bootloader. And what we then do with that in terms of getting a motor spinning or whatnot. Outside the scope of this episode perhaps.
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Anyone experiencing problems running motors in reverse after successful tuning please set fwkp to 0 and try again. Johannes and I are working on this problem. A full tuning and tutorial video can be expected in about a week.
I'm going to need a hacksaw
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

So just to let folks know we do have a V1d version of the logic board on the way with the following additions :

-Second STM32 for running MG1 and MG2 in dual motor applications.
-MG1 cpu is slaved to MG2 via transcieverless CAN : https://www.mikrocontroller.net/attachm ... AP2921.pdf
-Dual wifi modules
-External connectors will remain the same with a few pin remaps.
-Buck / boost charge retained.

This will be sold as separate kit. V1c will remain available.
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by johu »

Transceiverless CAN, thats really cool. So will you pre-program devices with things like pot already mapped?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Yeah for the full kits I'll configure both stm32 to communicate. Mg2 will send things like start, direction and throttle to mg1.
I'm going to need a hacksaw
MattsAwesomeStuff
Posts: 874
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 280 times
Been thanked: 165 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by MattsAwesomeStuff »

Cool progress!

As my build is pushing beyond "cheap easy summer project and on the road having fun" and into "several thousand, multi-year restoration" territory, choice of inverter and cost of control board are shrinking in comparable priority. By the time I'm ready to roll things, I might switch to the Gen 3.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by konstantin8818 »

Now that is interesting news =) Dual MGR system getting real.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by arber333 »

Jack Bauer wrote: Fri Sep 11, 2020 4:29 pm Yeah for the full kits I'll configure both stm32 to communicate. Mg2 will send things like start, direction and throttle to mg1.
Wow! Would it be possible to implement a sort of electronic differential drive with both motor interacting on torque output? We could have a sort of a torque converter drive similar to Volt/Ampera system where both motors are spinning to relieve traction motor of higher RPM losses. I am not sure where this would be used yet but it is really cool!
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 168 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bratitude »

arber333 wrote: Fri Sep 11, 2020 8:29 pm
Jack Bauer wrote: Fri Sep 11, 2020 4:29 pm Yeah for the full kits I'll configure both stm32 to communicate. Mg2 will send things like start, direction and throttle to mg1.
Wow! Would it be possible to implement a sort of electronic differential drive with both motor interacting on torque output? We could have a sort of a torque converter drive similar to Volt/Ampera system where both motors are spinning to relieve traction motor of higher RPM losses. I am not sure where this would be used yet but it is really cool!
If I understand and what you are asking correctly, two separate motors driving separate axles, then You have torque vectoring. drive like it’s on rails around corners. it would significantly improve handling. add in input from a yaw sensor and steering wheel angle = a very awesome awd system.

or more related to driving the Prius trans axle?
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by arber333 »

Bratitude wrote: Sat Sep 12, 2020 8:04 pm If I understand and what you are asking correctly, two separate motors driving separate axles, then You have torque vectoring. drive like it’s on rails around corners. it would significantly improve handling. add in input from a yaw sensor and steering wheel angle = a very awesome awd system.

or more related to driving the Prius trans axle?
No, my idea would be to run the MG1 WITH the MG2 in a sort of torque converter way.
If you think about Leaf motor at speed i can attest it draws 40A when car is at 110km/h straight road (8000rpm) and 80A (!) when car is at 130km/h (9000rpm). I guess we call that windage and air drag losses. Volt fights this with its "long range mode" where generator helps to drive the axle and because of a reduction gear and clutches two motors end up running at lower RPM than one single motor would at high speed. I think in Volt this happens at like 100km/h. You can certainly feel the lag in thrust if you want to pull the car out of this mode by accelerating.

I also talked with a guy that was developing a sort of torque variable transmission drive where one motor would fight the other and result would be high RPM on the final drive while on the other side motors would still be in their comfort zone, no FW. I thought of that as application when Damien announced his next board.

Maybe i didnt get the setup correctly but using the PSD we could drive both motors separately and have some variable drive to gather torque/rpm onto one axle? I may be wrong and this would be only possible with Gen3 axle. I need to watch Mr. Kelly again....
stibium80
Posts: 4
Joined: Fri Jul 17, 2020 3:12 pm
Location: South Carolina, United States

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by stibium80 »

I wanted to share my experience with doing a Gen3 Prius logic board swap with the group. I made a YouTube video walking through some aspects of doing the logic board swap (see below).

I’m doing my swap with a G9200-47210 inverter that I bought on eBay. From a little bit of internet sleuthing, it looks like this inverter in from a 2012 Prius. Of note is that this inverter uses a smaller format board that is 150mmx143mm (F1759-47070-05). I think the 2010-2011 Prius board are a larger size (like in Damien’s design). Since the board bolt pattern was different than Damien’s v1c design, I ended up drilling a new set of holes for the pin and screw hole in my board from JLCPCB.

[media] [/media]

I’ve still got a ways to go before I’m running a motor, but I thought my progress so far might be of interest to the group. I also wanted to let others know that I found this to be a very do-able project for those that have an interest in diy EVs and rudimentary soldering skills.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by johnspark »

V1d GREAT NEWS JB!
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 168 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by Bratitude »

arber333 wrote: Sat Sep 12, 2020 8:43 pm
Bratitude wrote: Sat Sep 12, 2020 8:04 pm If I understand and what you are asking correctly, two separate motors driving separate axles, then You have torque vectoring. drive like it’s on rails around corners. it would significantly improve handling. add in input from a yaw sensor and steering wheel angle = a very awesome awd system.

or more related to driving the Prius trans axle?
No, my idea would be to run the MG1 WITH the MG2 in a sort of torque converter way.
If you think about Leaf motor at speed i can attest it draws 40A when car is at 110km/h straight road (8000rpm) and 80A (!) when car is at 130km/h (9000rpm). I guess we call that windage and air drag losses. Volt fights this with its "long range mode" where generator helps to drive the axle and because of a reduction gear and clutches two motors end up running at lower RPM than one single motor would at high speed. I think in Volt this happens at like 100km/h. You can certainly feel the lag in thrust if you want to pull the car out of this mode by accelerating.

I also talked with a guy that was developing a sort of torque variable transmission drive where one motor would fight the other and result would be high RPM on the final drive while on the other side motors would still be in their comfort zone, no FW. I thought of that as application when Damien announced his next board.

Maybe i didnt get the setup correctly but using the PSD we could drive both motors separately and have some variable drive to gather torque/rpm onto one axle? I may be wrong and this would be only possible with Gen3 axle. I need to watch Mr. Kelly again....

This would be applicable to quite a few hybrid box’s wouldn’t it? If there’s enough difference in ratios, wouldn’t this be useful for increasing 0-60 while maintaining a higher top speed? Interesting.
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

V1d dual motor initial schematic attached.
  • MG1 STM32 has no inputs other than CAN from MG2 STM32 for control.
    One concern I have is I am reusing the bias circuit from the mg2 resolver for the mg1. I THINK it will be ok but ....
    A fault in either mg1 or mg2 power stages shuts down both mg units.
    MG1 and 2 disabled during charge.
    Single TDA2822 used for both resolver exciters. One side for each MG.
    Single 3v3 reg using AMS117. I THINK it will be ok but ....
Attachments
PriusG3_V1d_dual - Schematic.pdf
(697.15 KiB) Downloaded 180 times
I'm going to need a hacksaw
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by arber333 »

Jack Bauer wrote: Sun Sep 13, 2020 9:40 am Single TDA2822 used for both resolver exciters. One side for each MG.
Single 3v3 reg using AMS117. I THINK it will be ok but ....

[/list]
Really good management of resources JB! Could we use this single CAN bus to disable MG1 (or put it in freewheel mode) if it would not be needed?
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

And....here it is. The V1d now with 3 mcus on board:)

The program for release is :

*PDFs of schematic and pcb layout public now.
*Source files only available on Patreon for a period of time. Probably 6 to 12 months.
*Once bench tested both partial boards and full kits will be available from the webshop.
*Once bench tested a Yaris/Auris variant will be released in the same way.
Attachments
PriusG3_V1d_dual_3D.pdf
(197.37 KiB) Downloaded 130 times
PriusG3_V1d_dual - Schematic.pdf
(697.1 KiB) Downloaded 117 times
PriusG3_V1d_dual - PCB.pdf
(472.73 KiB) Downloaded 137 times
I'm going to need a hacksaw
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

V1d design updated and released on github:
https://github.com/damienmaguire/Prius- ... master/V1d
Prototypes on order from JLCPCB.
I'm going to need a hacksaw
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

Now in production at JLCPCB:)
Attachments
block1.jpg
I'm going to need a hacksaw
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by bobby_come_lately »

Nice! Great to see this design evolving. May be useful if my project turns out to need MOAR POWER!
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Prius Gen 3 Inverter Logic Board Support Thread

Post by m.art.y »

Hi. On Prius gen 3 inverter v1c board there are two connectors conn3 and conn5. I understand conn3 is to enable dcdc converter when pins are shorted? What is conn5 and how it should be wired - are conn5 pins supposed to be shorted as well? Thanks 🙂
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 Gen 3 Inverter Logic Board Support Thread

Post by Jack Bauer »

I'm going to need a hacksaw
Locked