Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

im in. will make myself avail when you tell me.
FYI Im eastern time zone USA

I will need to learn how to do google hangout but I think no problem
may I propose tomorrow?
the priustoric boatcar guy
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 »

Sounds good.
I'm going to need a hacksaw
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 »

Isaac96 wrote: Tue Jul 28, 2020 7:51 pm il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.

If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
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 »

imwoody36 wrote: Tue Jul 28, 2020 8:06 pm im in. will make myself avail when you tell me.
ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm I too would be in for a Google meet as I am always open to Educational opportunities.
Can you guys update this thread and the wiki once you get your issues resolved? It's important that we understand why you're having such problems so that we can help avoid them in the future.

Many thanks.
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.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm
Isaac96 wrote: Tue Jul 28, 2020 7:51 pm il1 and il2 are measuring phase currents. Since you're outputting AC, the currents swing from positive to negative. It's mostly magnitude, but if I remember correctly you might have to reverse the sign of il1 and il2 to make the FOC algorithm happy (don't quote me on that please).

-Isaac
Isaac, that was my point, we are running DC "backwards" thru one leg to calibrate the sensors. Should we expect a positive or negative value, IF that matters.

If my entry level understanding would be permitted, I too would be in for a Google meet as I am always open to Educational opportunities.
Right, sorry, I misunderstood the question. FOC might care, the slip control doesn't.
Have you tried making il1gain and il2gain negative?

(also you quoted me... how dare you ;))

Hopefully once someone has this system working we as a community can draft some documentation?

-Isaac
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

update, ac clamp ammeter on the U, V, And W wires to the motor during operation show 17 amps on two of them and almost zero on the U phase pin 31 of the board.

I would have expected much fewer amps based on how the equipment is sounding, and also all of them to be the same.

scoping the signal on pins 29,30 and 31 shows no pwm signal on pin 31 like the others.
however there is a signal going to the uln2003 driver IC and nothing coming out , even when that channel is unloaded.
looks like ive got a bad driver IC.
the priustoric boatcar guy
ascii-art
Posts: 9
Joined: Mon Jul 20, 2020 4:38 pm
Location: Sweden

Re: Prius Gen2 adapter board development thread

Post by ascii-art »

imwoody36 wrote: Tue Jul 28, 2020 8:06 pm im in. will make myself avail when you tell me.
ZooKeeper wrote: Tue Jul 28, 2020 9:05 pm I too would be in for a Google meet as I am always open to Educational opportunities.
I'd greatly appreciate it as well. Thanks for the offer!
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

amazon says my replacement driver IC will be here the 30th.
Im working simultaneously on a nissan leaf EV boat, Ill get the test jig connected this morning.

two new vids coming now. https://youtu.be/SEfrh-gR1xg

this is the only one I will put here about nissan. apologies for not on topic
the priustoric boatcar guy
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 »

the uln2003 is not a push pull driver so you would need to connect a small load like a resistor to see its output change
I'm going to need a hacksaw
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

okay, can do easily. did try a second inverter already.

edit, just added a 470 ohm to ground..retested, still no signal.

its okay, a new driver will be here soon, and I can change it.
I have not dropped or shorted wires and there are no poor splices exposed, but I own the statistical probability that It was damaged in my care.

if I figure out what happened I will share.
the priustoric boatcar guy
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 »

imwoody36 wrote: Wed Jul 29, 2020 2:13 pm edit, just added a 470 ohm to ground..retested, still no signal.
The resistor must go from the ULN2003 output pin to 12V. If you connect the output pin to ground via a resistor then nothing will happen.

It's unlikely the driver chip is damaged. Check the connector pin soldering (no disrespect intended but some of the soldering looks 'suspect' in the video), connector pins, and the wiring loom carefully because that's the most likely problem here.
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 »

imwoody36 wrote: Wed Jul 29, 2020 2:13 pm edit, just added a 470 ohm to ground..retested, still no signal.
The ULN2003 is an open collector Darlington transistor array.
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

Kevin Sharpe wrote: Wed Jul 29, 2020 3:01 pm
imwoody36 wrote: Wed Jul 29, 2020 2:13 pm edit, just added a 470 ohm to ground..retested, still no signal.
The resistor must go from the ULN2003 output pin to 12V. If you connect the output pin to ground via a resistor then nothing will happen.

It's unlikely the driver chip is damaged. Check the connector pin soldering (no disrespect intended but some of the soldering looks 'suspect' in the video), connector pins, and the wiring loom carefully because that's the most likely problem here.
yeah, it looks that way because I already revisited the soldering when it was not working.
the priustoric boatcar guy
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

amazon sent DIP instead of SOP package. had to reorder 2003 drivers. ( the side project with the nissan leaf driver worked practically out of the box)
the priustoric boatcar guy
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 316 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Isaac96 wrote: Sun Jul 26, 2020 5:10 pm
RetroZero wrote: Sun Jul 26, 2020 4:40 pm BTW, relaoding the programme can be done with a ST Link V2?
Yes. Careful, there are apparently some fakes floating around -- if you get an STM32 Nucleo board those have an ST-link onboard (and also a spare STM32 chip).

-Isaac
St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

RetroZero wrote: Fri Jul 31, 2020 5:11 pm St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
I hope you're flashing firmware to the STM32 chip?

If so, there is 1 thread and 1 PDF you'll need to use the Nucleo's ST-Link:
viewtopic.php?f=2&t=6
Page 19 or so here: https://www.st.com/resource/en/user_man ... ronics.pdf

-Isaac
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 316 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Thanks for the pointers.. Fingers crossed 🤞
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 adapter board development thread

Post by LRBen »

Had some success getting the Outlander motor spinning with the inverter!

Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.

This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.

Video

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 Gen2 adapter board development thread

Post by johnspark »

Jack Bauer wrote: Tue Jul 28, 2020 7:49 pm Ok. This ain't working. How about we do a google hangout or similar and I'll talk you all through it.
If you have not had the session yet, i would like to watch this as well thank you
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

LRBen wrote: Sat Aug 01, 2020 8:08 pm Had some success getting the Outlander motor spinning with the inverter!

Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.

This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.
Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

Great work LRBen!
Have the same combination, willing to share Parameters? I'm stuck for days on my DESAT error
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 adapter board development thread

Post by LRBen »

Bram wrote: Mon Aug 03, 2020 11:30 am Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?

Once I get the throttle working well I will share my parameters.
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

LRBen wrote: Mon Aug 03, 2020 5:31 pm
Bram wrote: Mon Aug 03, 2020 11:30 am Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?

Once I get the throttle working well I will share my parameters.
Thank you!
Had the same throttle issue with my blue pill set up. the (induction) motor only moved until the test/manual Frequency, and throttle did not moved very linear. still need to figure out what it is, let you know once figured out.
User avatar
johu
Site Admin
Posts: 5757
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

In general it is hard to control motor speed of an unloaded motor with the throttle. Throttle input controls torque and of course very little torque will spin an unloaded motor up very fast. You can try using the idlespeed parameter for testing as well.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply