[FIRST DRIVE] Toyota Prius gen2 plug and play

Tell us about the project you do with the open inverter
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

[FIRST DRIVE] Toyota Prius gen2 plug and play

Post by turnip73 »

Prius gen2 have all the connections needed to run it located behind the glove compartment (Hybrid Vehicle Control ECU and Engine Control Module).
I've designed a board that fits in the original Hybrid Vehicle Control ECU case and create a man in the middle setup for connecting for example the Toyota Prius™ Gen2 inverter controller - community edition https://openinverter.org/shop/index.php ... duct_id=63.

Please note that there is a few issues on the current board design (see issues in in github link below)

For more info see wiki in github link below.

https://github.com/hakanrolsson/PriusHVConnector

I have boards available if someone want one.

current status:
20231117 Working on keeping the Toyota HV ecu happy.

20230921 Working on VCU

20230813 Build 2nd board. DC/DC converter working

20230516 Bulb testing with Buck charging

20230429 Working on charging

20230311 First drive in the yard with openinverter in FOC very smooth!

20230305 Wheels spinning in FOC with accelerator pedal, still some tuning to do. OEM ECU more or less disconnected OI in charge of contactors.

20220925 Taken a few steps back trying to figure out how to spoof the OEM ECU to work without being connected to MG2 (MUU, MVU, MWU, MCS, MCSG, MSN, MSNG)

20220911 Still trying to do FOC tuning but getting DESAT error. GVIA, GVIB, MVIA, MVIB, GWIA, GWIB, MWIA, MWIB from OEM ECU connected to GVIA, GVIB, MVIA, MVIB, GWIA, GWIB, MWIA, MWIB on inverter

20220820 Trying to do FOC tuning but OEM Hybrid Vehicle Control ECU opens contactors. GVIA, GVIB, MVIA, MVIB, GWIA, GWIB, MWIA, MWIB from OEM ECU connected to GVIB and GWIB.

20220814 Connected encoder from MG2 to openinverter (MRF,MRFG,FMCS,MCSG,MSN and MSNG). Connected MCS,MCSG,MSN,MSNG from OEM Hybrid Vehicle Control ECU to GCS,GCSG,GSN,GSNG (MRF,MRFG left disconnected). Switched to FOC software. See angel plot in post below.

20220806 Motor (MG2) spinning in open loop manual mode. next connect encoder and accelerator pedal.

20220709 Trying to get Open Loop motor spinning. Running in parallel with OEM Hybrid Vehicle Control ECU giving openinverter control of MG1 (MUU, MVU and MWU), MG1 and MG2 disconnected from OEM ECU (MUU, MVU, MWU, GUU, GVU and GWU) and Engine Control Module disconnected with stock gen2 Prius (Black Betty viewtopic.php?t=1359)
Attachments
20220706_132316.jpg
20211127_213616.jpg
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Toyota Prius gen2 plug and play

Post by MattsAwesomeStuff »

Wow, look at that. Solid effort.

Hopefully this lends itself well to many future sneak attacks, subduing the wiring beast to our command.

Perhaps Damien or Johannes know someone with a Prius they could borrow and molest in the dark.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Got MG2 to work in reverse. In drive the OEM controller trips and opens the contactors.
Getting Code P0A78 probably because I have MIVA,MIVB,MIWA and MIVB but not MUU, MVU, MWU, GUU, GVU and GWU connected to the OEM controller.
Without MIVA,MIVB,MIWA and MIVB connected to the OEM controller it will not close the contactors.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Connected up the encoder to MG2:
anglePlot.jpg
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Toyota Prius gen2 plug and play

Post by RetroZero »

Would be interested in your syncoffs value amongst your other parameters. Good job 👍
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

RetroZero wrote: Mon Aug 15, 2022 6:48 am Would be interested in your syncoffs value amongst your other parameters. Good job 👍
Thank you for all your work. I will post parameters when stabilized.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Hmm, no Idea why the OEM ECU is opening the contactors when I try to FOC tune... When moved GVIA, GVIB, MVIA, MVIB, GWIA, GWIB, MWIA, MWIB from OEM ECU connecied to GViB and GWIB I don't see any "power transfer" on the screen any more also no voltage on GViB and GWIB from controller. no codes more then P0A87 (MUU, MVU and MWU disconnected), P0A7A (GUU, GVU and GWU disconnected) and U0100 (Engine ECU disconnected).
I'll hook up the computer and capure some CAN logs next time to see what's up.
linda.ljungdahl
Posts: 31
Joined: Fri May 14, 2021 8:05 am
Has thanked: 1 time
Been thanked: 5 times

Re: Toyota Prius gen2 plug and play

Post by linda.ljungdahl »

I have the same problem at the moment, when running the inverter in manual mode the main contactor never closes.
I watched damiens video on FOC, and there he connects the HV directly to the inverter trough the lightbulb, so I guess one have to do the FOC-tuning by forcing the contactors or connecting hv directly to the inveter and use a bulb as current limiter.
I couldn't find any way of forcing the contactors to operate through the web-int...
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Toyota Prius gen2 plug and play

Post by johu »

Indeed contactors are not operated in manual mode and there is no manual turn-on
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
linda.ljungdahl
Posts: 31
Joined: Fri May 14, 2021 8:05 am
Has thanked: 1 time
Been thanked: 5 times

Re: Toyota Prius gen2 plug and play

Post by linda.ljungdahl »

johu wrote: Sun Aug 21, 2022 4:51 pm Indeed contactors are not operated in manual mode and there is no manual turn-on
Ok, then we know for shure, thanks for the info :)
Also, the precharge relay activates on boot, is there a way to disable that? (bootprec is set to off)
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Toyota Prius gen2 plug and play

Post by johu »

It will always turn on, the only way to disable it: don't connect to it or change source code ;)
bootprec will turn on precharge already in bootloader stage, so directly after power up. I did this actually for controlling DC/DC converter in Prius Gen3 by looping precharge output to its enable pin. That way it only switches on after starting
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

linda.ljungdahl wrote: Sun Aug 21, 2022 4:27 pm I have the same problem at the moment, when running the inverter in manual mode the main contactor never closes.
I watched damiens video on FOC, and there he connects the HV directly to the inverter trough the lightbulb, so I guess one have to do the FOC-tuning by forcing the contactors or connecting hv directly to the inveter and use a bulb as current limiter.
I couldn't find any way of forcing the contactors to operate through the web-int...
johu wrote: Sun Aug 21, 2022 4:51 pm Indeed contactors are not operated in manual mode and there is no manual turn-on
The OEM Hybrid Vehicle Control ECU is in control of the contactors for now. I'm trying to keep the OEM Hybrid Vehicle Control ECU happy so the car will go in to ready state and I can switch release the parking pawl.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Getting DESAT error when trying to do FOC tuning (probably the same error as before). I now have access to Techstream to trouble shoot.
I've started work on setting up SOC spoofing etc. to keep the OEM ECU's happy.
PaulUdrea
Posts: 25
Joined: Wed Aug 04, 2021 8:29 pm
Location: Toronto, Canada
Has thanked: 11 times
Been thanked: 1 time

Re: Toyota Prius gen2 plug and play

Post by PaulUdrea »

Great idea. I would be interested in the board you have designed. Did you sort out the issues on the board you mentioned in your first post? Is the board working in conjunction with the openinverter VCU designed by Johannes?
I just started the same project of converting a Prius Gen2 to full EV. I am at the stage of CAN bus logging and identifying the frames. Would be interested to know what CAN bus frames you have identified.
Cheers,
Paul
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

PaulUdrea wrote: Thu Sep 22, 2022 11:36 am Great idea. I would be interested in the board you have designed. Did you sort out the issues on the board you mentioned in your first post? Is the board working in conjunction with the openinverter VCU designed by Johannes?
I just started the same project of converting a Prius Gen2 to full EV. I am at the stage of CAN bus logging and identifying the frames. Would be interested to know what CAN bus frames you have identified.
Cheers,
Paul
Hi Paul,
I have found all the issues and fixed them on back of the board with extra wires (also documented in github with bug reports).
I was able to run in reverse with openinverter VCU in manual mode with stm32_sine (see post above)
Currently trying to figure out how to spoof the inverter input/output to keep the OEM CPU happy.
I'm using the work of Electric Auto Association - Plug in Hybrid Electric Vehicle http://www.eaa-phev.org/wiki/Prius_PHEV ... #CAN_Tools and Attila Vass to identify CAN bus frames.
pm me your address and I can send you a board.
Cheers,
/Håkan
PaulUdrea
Posts: 25
Joined: Wed Aug 04, 2021 8:29 pm
Location: Toronto, Canada
Has thanked: 11 times
Been thanked: 1 time

Re: Toyota Prius gen2 plug and play

Post by PaulUdrea »

Hello Hakan,
That's a lot of progress. I do have the spreadsheet created by Attila Vass, but there are no CAN bus frames, he identified PIDs if remember well. My apologies for the late reply, I am on vacation and it just crossed my mind to check the news on the forum, hence found your post. I'll message you now.
Cheers,
Paul
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

After spending time trying to keep the OEM HV ECU's happy I decided to cut it out of the loop for now. I now have wheels spinning in FOC with accelerator pedal. Still some tuning to do. Next need to figure out charging. I really like the idea of using the controller and as charger too like @johu and @RetroZero but I want to keep my AC control and I need to bypass the boost converter when I get a bigger battery.
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Toyota Prius gen2 plug and play

Post by RetroZero »

The charger is a great backup but is limited to 320vdc. I am happy to have been able to get it working, and I use it for test purposes at lower voltages. Stand alone charger is next plan as I will be running MG1 and Mg2.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

First drive with openinverter, I'm running with @Johu parameters download/file.php?id=19655 viewtopic.php?p=48233#p48233 (only changes voltages lowered and wired accelerator pedal) and firmware download/file.php?id=19972 viewtopic.php?t=2809 I'll update the wring in the github wiki https://github.com/hakanrolsson/PriusHVConnector/wiki for the board.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Working on changing.
Following @RetroZero's steps in https://openinverter.org/forum/viewtopic.php?t=1070
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Hmm, return of my old friend desat...
Attachments
20230501_173404.jpg
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Toyota Prius gen2 plug and play

Post by RetroZero »

That does look familiar. How did you get along? I have haven't touched mine for ages. BTW, if you don't have a bms, be careful with amps and Max dc voltage. I overheated my Prius pack and had to put a house cooling fan in the boot overnight, and it was still very warm the next morning.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

turnip73 wrote: Mon May 01, 2023 7:49 pm Hmm, return of my old friend desat...
My 12v safety bulb caused the desat.
Using 330w 1A Inverter to create 240V AC gives me 260V DC on buzz bars bucked to 160V DC
Next:connect a heater element and "real" 240V AC.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: Toyota Prius gen2 plug and play

Post by turnip73 »

Built a 2nd more configurable board using ferrules and Wago connectors. Got 12V DCDC converter working (just disconnected NOOD from Hybrid Vehicle Control ECU). Car now has a backseat and an exhaust again.
turnip73
Posts: 34
Joined: Wed Dec 26, 2018 1:38 pm
Location: Greystones Ireland
Has thanked: 11 times
Been thanked: 14 times

Re: [FIRST DRIVE] Toyota Prius gen2 plug and play

Post by turnip73 »

Made a fork of Johannes stm32-car and created a prius-gen2 based on the audi-a2 branch (https://github.com/hakanrolsson/stm32-c ... prius-gen2) that reads can message 0x540 (shift leaver position) and set drivesel.
Post Reply