Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I assume : VCCIO = IO = Ov reference. (0.2v on my multimeter) , and VCC = -3.3V
STM Pin 60 = GND = OK
STM Pin 01 = VBAT = 0.2v - OK? - (VBAT = IO = 0v?)
STM Pin 12 = VSSA = -3.3v - OK
STM Pin 13 = VDDA = 0.2v - OK?

Would that seem correct so far?
jap
Posts: 32
Joined: Fri Jun 26, 2020 5:14 pm
Location: Finland

Re: Prius Gen2 adapter board development thread

Post by jap »

I think those values are all over the place, you could look at what pins should receive from STM32 datasheet:

https://www.st.com/en/microcontrollers- ... 03rb.html/
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 »

thank you for answering kiwifiat,
you are right the three coils in the resolver are 14 ohms, 14 ohms and 8 ohms.
I have photographed the toyota schematic with my oem harness laying on top.
yes the colors match, with black and white being the excitation.
the openinverter board is producing this almost sinusoidal signal unloaded. the distortion shows up when connected to the 8 ohm resolver

I am baffled why the vector signal entering the openinverter board will not show a valid angle when plotted with the webinterface
and I would argue this is a problem that could be fixed in firmware.
Attachments
20200723_082723.jpg
20200723_082533.jpg
20200723_082518.jpg
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 »

Ok, lesson time considering I have just been doing this with the Model 3 drive unit. In order to work the FOC software needs the exact angular position of the rotor. It does this by feeding one end of the sine and cosine from the resolver to two adc inputs. The other ends are held and about 1.65v. Why 1.65v? well its 3.3v/2 :) Now, in order to get the most accuracy we want the sine and cos amplitudes to be close to 0v at minimum and close to 3.3v at maximum. We can tolerate less but more is very bad as we loose angle information. ok so far?

Now we end up with two numbers. Feed those into an arctan function and presto an angle in degrees. That's how it works.

So lets scope the sin and cos pins on the stm32 and what should we see?

If it clips, thats bad.

If it is very low amplitude, thats bad.
Attachments
scope_0.jpg
I'm going to need a hacksaw
jap
Posts: 32
Joined: Fri Jun 26, 2020 5:14 pm
Location: Finland

Re: Prius Gen2 adapter board development thread

Post by jap »

And those pretty waves we see only with a spinning rotor, right? With rotor/resolver standing you have only 2 steady values for sin/cos.
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 »

Unless I am mistaken, you will not see pretty waves in the VCU GUI, but something more like a sawtooth. The pretty ones are on only on scopes.
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

jap wrote: Thu Jul 23, 2020 10:07 am I think those values are all over the place, you could look at what pins should receive from STM32 datasheet:

https://www.st.com/en/microcontrollers- ... 03rb.html/
Thanks jap,
So VBAT on Pin 01 of STM is 0.2v (16v supply and GRND cable of multimeter on Negative battery pole) - Should be between 1.8v and 3.6v
Went back to beginning - Power supply: 12v (multimeter GRND to Negative Pole)
D1 = +16v
Power supply Pin 4 +4.5V Pin 1 +8.14V
Power supply Pin 5 +15.9V Pin 2 -2.97V
Power supply Pin 6 +2.53V Pin 3 -2.15V

Voltage Regulator Pin 1 + 2.5V
Voltage Regulator Pin 2 +0.34V
Voltage Regulator Pin 3 -2.93V

I deduce from these values that Voltage Regulator Pin 2 (VCCIO) is the supply to STM Pin 1 (VBAT)
If so, the actual voltage of +0.34v is incorrect - should be between 1.8V and 3.6v

However, I do not know if the problem is before voltage regulator as the power supply values don't make sense. :roll:
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

More internet digging later....ground is not where GRND of multimeter should be used for reference. Capacitors!!!
So start again...
Voltage Regulator
Pin 1 = Ground reference
Pin 2 = VCCIO 3.3V
Pin 3 = VCC 5.0V
Makes more sense. And I have 3.3V at VBAT Pin 01 on STM. I have 3.3V when testing across Pin 01 and Pin 60 of STM.
So STM has power, I think..
I can confirm 3.3V at Alive LED and 1.95V between STM and LED
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

VDD 1,2,3,4 all have 3.3V at STM32
Between VBAT and VSSA I have 3.3V
Between VBAT and VDDA I have 0.0V
It seems like all my supplies and grounds are OK....that means I fried my nice new STM32?
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 »

thanks " elon" while trying to figure out what pins are the sin and cos in to the STM32, I remembered this was one of the boards Johu had to rotate the chip.
so I reflowed it with hot air. and my symptoms are different... and maybe a little better. some circular jerky motor movement.



so, now I will go back and retest the polarity of the sin and cosine connections. you dont happen to know what pins I should scope do you?
I can likely go find a point to probe nearby.
Attachments
20200723_142036.jpg
the priustoric boatcar guy
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 »

Woody, diagram Johu posted earlier in this thread on 29-April on Pg. 29 may help.
johu wrote: Wed Apr 29, 2020 6:12 pm Schematic done, does anyone feel like routing this out in KiCAD?
I've included a footprint for the ModICE connector but I believe there is a better one in KiCAD.

EDIT: I have started layout, therefor removed the Eagle file here.
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!
I can now plot a sawtooth, just like damiens in his youtube. the only change was reflowing the STM.
now when I attempt motor spin , I get a few moments before the contacters cut out and they wont restart until I power cycle.
no errors but Ive been up for 10 hours and maybe I should take damiens advice and ponder a bit.

is there a way to restart without power cycling?

Im assuming I need to play with W.C.U phases or perhaps sin cos polarity
does anyone want to see a tube video of the reflow under a microscope?
the priustoric boatcar guy
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I would like to see that as I am going to attempt an STM replacement....
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 »

imwoody36 wrote: Thu Jul 23, 2020 8:27 pm update!
I can now plot a sawtooth, just like damiens in his youtube. the only change was reflowing the STM.
now when I attempt motor spin , I get a few moments before the contacters cut out and they wont restart until I power cycle.
no errors but Ive been up for 10 hours and maybe I should take damiens advice and ponder a bit.

is there a way to restart without power cycling?

Im assuming I need to play with W.C.U phases or perhaps sin cos polarity
does anyone want to see a tube video of the reflow under a microscope?
That is good news, did reflowing the stm32 fix the clipping present on the resolver drive signal?
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 »

RetroZero wrote: Fri Jul 24, 2020 4:57 am I would like to see that as I am going to attempt an STM replacement....
NOOOOOOOOOOOO. Have you tried to access the mcu via stlink?
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 Gen2 adapter board development thread

Post by Jack Bauer »

imwoody36 wrote: Thu Jul 23, 2020 8:27 pm update!
I can now plot a sawtooth, just like damiens in his youtube. the only change was reflowing the STM.
now when I attempt motor spin , I get a few moments before the contacters cut out and they wont restart until I power cycle.
no errors but Ive been up for 10 hours and maybe I should take damiens advice and ponder a bit.

is there a way to restart without power cycling?

Im assuming I need to play with W.C.U phases or perhaps sin cos polarity
does anyone want to see a tube video of the reflow under a microscope?
Ok now we're talking. Lets ask ourselves some questions first before doing anything. why would the the contactors drop?
.....because we hit overcurrent limit........
.........why would we do that given that FOC firmware uses current control......must mean we are either not receiving the correct current readings into the stm32, or we are reading them incorrectly (not calibrated) OR we are reading the wrong current for that phase leg. Remember my fun with the Gen3 inverter where Johannes expects to be able to read the current on phase A and B but the Gen 3 inverter has current sensors on phases A and C!

Even if you have resolver incorrect (motor won't spin) it should still be possible to control the current into the stator via throttle. Once you get that happening THEN we mess with the resolver.
I'm going to need a hacksaw
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Jack Bauer wrote: Fri Jul 24, 2020 6:33 am
RetroZero wrote: Fri Jul 24, 2020 4:57 am I would like to see that as I am going to attempt an STM replacement....
NOOOOOOOOOOOO. Have you tried to access the mcu via stlink?
Sorry, I don't have one. Tried through wifi to restore default parameters. Looking at what other alternatives I might be able to come up with trolling the forum.
I saw somewhere a home made adapter connected to USB port....but before doing anything, I would like to understand the whole software reload and reset process.....trolling again. I really don't want to touch the STM if it can be avoided..
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

For info, I did create the problem by supplying 12V to Pin16 (precharge) with the board functioning.
I heard a little pop and then Alive LED went dead.
I tried testing the Mosfets in Diode mode with multimeter, but no readings in iether of them.From what I understand, they are usually tested out of circuit.
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 Jul 24, 2020 8:29 am For info, I did create the problem by supplying 12V to Pin16 (precharge) with the board functioning.
I heard a little pop and then Alive LED went dead.
I'm not following this thread closely but when you say "supplying 12V to Pin16 (precharge)" do you mean you put 12V on an output pin?
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: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Yes 😡 was trying to tidy up wiring and test precharge circuit when I 'dropped' output wire on 12 v supply. Poof. Very upsetting and frustrating 😤. Easy to say that there's a lesson to be learnt, and taking a step back can sometimes be the best way forward, but it's a huge setback I created. Pissed off with what I did.
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 Jul 24, 2020 9:20 am Yes 😡
Welcome to the world of RND ;)

Assuming the precharge driver chip is not current limited then it (or the tracks supplying power) probably failed. In the first instance check signals and grounds around the driver chip to see whether it's still functioning. Also try and work out where all the current from the 12V supply went. It's possible the driver chip failed and the CPU pin had 12V applied which would be bad news. This is speculation... I haven't looked at the schematic or driver datasheet.

At this point it might just be easier to buy another board rather than spend time trying to debug the faulty board.
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
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 »

You will need an st link to program the boot loader if you replace the stm32.
I'm going to need a hacksaw
jap
Posts: 32
Joined: Fri Jun 26, 2020 5:14 pm
Location: Finland

Re: Prius Gen2 adapter board development thread

Post by jap »

Before changing STM, I would check for other failed components. You practically created a short with +12v directly to ground through board.
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

I would buy another board in 2 seconds, problem is Johu is on well deserved holiday. As this is a professional project, time is of the essence at the moment. Mid August really complicates things for me.
As for st link, yes I would need to get one to program the stm...if I go that route.
All my VSS have 0V and all my VDD have 3.3v . VBAT also 3.3v
I notice Output Precharge and DCSW are connected in series to ground. Could it be possible that another element tied to common ground caused the short?
RetroZero
Posts: 755
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 361 times
Been thanked: 44 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

jap wrote: Fri Jul 24, 2020 10:28 am Before changing STM, I would check for other failed components. You practically created a short with +12v directly to ground through board.
Started tracing and found different resistance values for the 2 X 100uF ECAP. C13 and C23
C13 In one direction 3.3K Ohms for about a second and then Open Circuit . 3K Ohms in other direction
C23 0.6k Ohms in one direction . 225 Ohms in the other.....
Could I have cooked C13 capacitor with +12v?
Anyone able to give me rough values? Since they are identicle capacitors, they should give me identicle values?
Post Reply