Toyota Prius Gen 2 Inverter Controller

Topics concerning the Toyota and Lexus inverter drop in boards
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by Ev8 »

You may require slightly different gains thanks to less than identical component layout? (Just guessing) I’d verify with a current clamp.

Also worth graphing position
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by Ev8 »

What are the specs of your encoder?
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Ev8 wrote: Sun Mar 10, 2024 8:36 pmYou may require slightly different gains thanks to less than identical component layout? (Just guessing) I’d verify with a current clamp.
Don't have a DC clamp meter. Might have a big DC shut and meter around somewhere.

Accuracy of the current doesn't bug me unless it uses that to know how to turn properly. Telling it to turn at zero hertz and it accelerating endlessly, or giving it 1hz and having it clunk slowly does bother me.
What are the specs of your encoder?
Absolutely no idea.

From the controller manual (that I'm NOT using, but, might give some insight perhaps?) out of the forklift that the manufacture (who paired it with the motor I'm using, both have their brand on it), sent me. Mostly greek to me. I don't even know what specs an encoder could have:

"2.1.8 SPEED SENSOR INTERFACE
The Speed Sensor Interface converts the quadrature pulse outputs from a speed
encoder to digital speed and direction numbers for use by other drive and system
functions."


...

"3 Output ENCODER +12_OUT Supply for external motor pulse sensors. Diode in series for B+ protection. Output voltage 11V +-5% at 50mA load.
4 Output ENCODER GND Ground reference for ENCODER, not B+ protected.
5 Input ENCODER CH 1 Phase 1 input from encoder (speed encoder). Internal 1 kΩ pull-up resistor to +12V_OUT
6 Input ENCODER CH 2 Phase 2 input from encoder (speed encoder). Internal 1 kΩ pull-up resistor to +12V_OUT"


...

3.11.3 SPEED ENCODER SIGNALS

The speed encoder or similar integrated into the motor, provides speed and direction feedback for the Motor Controller. The connector on the Motor Controller side is an AMP Superseal (282088-1). The standard speed encoder produces a two-phase square wave output (Example SKF P/N 6206/VU1028 gives 64 pulses/ revolution per phase). Other pulse rates in the range 32 - 160 p/r can be selected in the Software. (Parameter accessible via CANopen).

32 Item. No. 89Y05120A User’s Guide
1) These two wires [encoder signal] are motor depending. If the motor does not turn (i.e. oscillates around zero speed) at the first start up, these two wires have to be swapped. If the rotation direction is not correct, the SW parameter bit Inverted Rotation Direction in Application Setup Word (2020h:10) shall be set.

Speed encoders are manufactured with a short length of unshielded four conductor cable to which input and output connections are made. Table 4 lists the color-coding and signals names for the standard speed encoder. Figure 17 shows the wiring diagram.

The motor connections (U, V, W) shall never be swapped. The connector on the motor side is an AMP Superseal (282106-1) with integrated RC filter.

To minimize the possibility of electrical noise coupling into encoder lines, avoid routing encoder cables next to conductors carrying high currents or high current pulses. Noise immunity may also be improved by using twisted conductor cable for encoder to drive connections.


...

Does that say what it is?

I recognize the word "quadrature" with respect to encoders, but it otherwise means nothing to me.

...

Oh also, I don't know if I have my big motor wires correct (UVW-wise), I just figured if they were wrong it would mean the motor would rotate backwards and I'd have to flip them. Is that no longer true if I'm using an encoder?
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by Ev8 »

64 pulses per revolution

Change numimp to 64
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Ev8 wrote: Mon Mar 11, 2024 3:05 pm64 pulses per revolution. Change numimp to 64
I'm not sure that's actually what that's saying, it just quotes one possible encoder as having 64. But, that's a better guess than I have for any other number. If I disassemble the motor am I going to find an encoder with a number on it that I could look up? Or is this built in deeper to the motor and not accessible?

Going through parameters...

respolepairs - Says usually that should be same number of pairs as motor. Mine wasn't, it was left at 1. Should it be 3?

encmode - It seems I have a quadrature encoder without an index, because (I think?) an index pulse needs an extra wire? I only have 4 wires. So that means set to 1.
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by Ev8 »

You could just scope the encoder output and count the number of pulses through 1 revolution, not sure what to set resolver pole pairs to when using an encoder.
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by Ev8 »

Looks like every example I can find of sine parameters sets resolver pole pairs to 1
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

Ev8 wrote: Mon Mar 11, 2024 3:05 pm64 pulses per revolution Change numimp to 64
Finally got around to doing that today.

I'm not sure if it's working perfectly, but, when I tell it to move zero RPM... it now moves zero RPM.

One thing I hadn't seen before I had my encoder hooked up, the inverter actually tries to maintain that when turned on. Before, if the inverter was on and was commanded zero RPM, and I spun the shaft by hand, it freewheeled. Now that it knows the motor position, it gets grouchy and resists turning.

I was still seeing -5 amps when doing nothing on iL2, but then later it went away and not sure why. I guess I'll see if it reappears.

I'm not sure if it's set up correctly yet. When I tell it to turn at 1 RPM, or 3 RPM or whatever, it doesn't seem to match. It's in a very loose ballpark, but not a match.

I told it to graph Angle, manually turned the shaft to zero degrees, and then counted how many cycles I went through for one physical rotation. I figured it would either be accurate at 1:1, or maybe it would be 3:1 because that's how many pole pairs. No, it was about 3.5 or so rotations.

Also, my motor temp says it's -43'C, which, it's not. And, my inverter temp... none of the 6 or 7 options in the dropdown seemed to correspond to reality. Not sure what to pick for that.

Making something resembling progress... I guess.
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by arber333 »

What you are doing is done with IPM motor with resolver.
If i understand you have ACIM and dual channel encoder. Four wires channel A, B and +12v, gnd.
Inside the brain this is converted to quad encoder position but you need to input how many pulses does single channel make. You count this by putting a LED on signal A and 12V and count it blink.

... If signal is pnp you need to provide gnd to other side of the led...
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

arber333 wrote: Sat Mar 23, 2024 5:00 pmIf i understand you have ACIM and dual channel encoder. Four wires channel A, B and +12v, gnd.
Correct!
Inside the brain this is converted to quad encoder position but you need to input how many pulses does single channel make. You count this by putting a LED on signal A and 12V and count it blink.


Count... one physical rotation?

And then... do what with that number? Is that my numimp?
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by arber333 »

MattsAwesomeStuff wrote: Sat Mar 23, 2024 7:54 pm Count... one physical location?

And then... do what with that number? Is that my numimp?
LED will blink when encode moves beyont the next step. Here i used 60 slot single channel optical encoder and it worked with ACIM really fine.
https://mazdamx3ev.wordpress.com/2015/0 ... er-senzor/

Yes "numimp" is actually number of impulses on one channel along one rotation. So if you see your encoder stating 64ppr this is 64 pulses per rotation. But inverter sees it as 256 signal for determining speed and direction of rotation because A and B differ in phase. When signal A is 1 B is 0. Thats your AB encoder. Mine was just 60pr without direction data. To do that my inverter switched phase count in software directly. So my motor could simply roll downhill and inverter never knew. Yours could apply a "hil hold" function i guess...

Can you state the P/N for your encoder and some photo of its sticker?
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

arber333 wrote: Sat Mar 23, 2024 8:15 pm. Yours could apply a "hil hold" function i guess...
That'd be neat.

It's certainly not grabbing hard. I can move it with my fingers and i had my current set to 90% (on only a 12v battery). But it's non zero.
Can you state the P/N for your encoder and some photo of its sticker?
Hmm, no. The only thing I know about the encoder is that it's a superseal connector that goes into the far side of the motor. I've never fully disassembled the motor or looked at its bottom end. I guess I could try pulling the rotor out or taking off the opposite end plate, but, I basically presume my hands are made of nitroglycerin and I stand a good chance of destroying anything I touch. I just spent 4 weeks ruining a driveshaft (I'll take out these ujoints to re grease them... Oops they're held in place with plastic injection), and
a rear diff (sandblasted and painted, oops, pinion bearing seals against driveshaft, not on its own, now diff and bearing are full of sand and water).

Nothing in the spec sheet identifies the encoder other than its pinout.
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Toyota Prius Gen 2 Inverter Controller

Post by arber333 »

MattsAwesomeStuff wrote: Mon Mar 25, 2024 8:56 am
Hmm, no. The only thing I know about the encoder is that it's a superseal connector that goes into the far side of the motor.
......
Nothing in the spec sheet identifies the encoder other than its pinout.
https://www.dynapar.com/technology/enco ... e_encoder/
Ok, then your best bet would be to put a wheel (a handle) to the shaft and count LED pulses from channel A for one revolution. If there are 64 pulses then so be it, but i am inclined there is more...
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: Toyota Prius Gen 2 Inverter Controller

Post by MattsAwesomeStuff »

That was a great link, it was explained the right way for me to understand.
Ok, then your best bet would be to put a wheel (a handle) to the shaft and count LED pulses from channel A for one revolution. If there are 64 pulses then so be it, but i am inclined there is more...
1712837044685.png
80.

80 pulses per revolution.

I set NumImp to 80 et voila. Zero means zero. A plot of angle shows exactly 1 revolution when I complete one revolution.

I found out what the resolver pole pair parameter does too. It correctly tells the software what 1 revolution is. So if I have 3 pole pairs and tell it to be 3, then 1 hz is actually 1hz instead of 1/3 hz. I'm not sure if that's helpful or not, or immaterial (just a number, whether it's 300% or 100% the speed doesn't matter).

Next up... motor temperature. Or inverter temperature for that matter. I tried every temperature sensor on the drop-down menu, all produced nonsensical temperatures. So, is that something I can create or manually set instead of choosing from the selection?
Post Reply