Prius Gen2 Inverter DC Motor Controller

Topics concerning the Toyota and Lexus inverter drop in boards
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Ev8 wrote: Sun Nov 14, 2021 10:23 pm Yes that’s right, teensy 3.2 I will try in coming weeks draw up a schematic for the board, most likely To happen Christmas week though as I have no time off until then
Thank you so much!! greatly appreciated
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Hey man!

Do I need to Buy one of these for the controller??

https://www.ebay.com/itm/274670520327?_ ... %7Ciid%3A1
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

No, you don’t need that, I had one and there is code there that is commented out for using one but you don’t need it, basically I was using it as a known value while developing the code to make sure I was getting good data from the built in current sensors
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Ev8 wrote: Wed Nov 17, 2021 5:46 am No, you don’t need that, I had one and there is code there that is commented out for using one but you don’t need it, basically I was using it as a known value while developing the code to make sure I was getting good data from the built in current sensors
Ahh.. So you are using the Built in Current sensors?? How do you implement this? Is through a hall effect sensor? Or is it through some sort of Shunt resistor??
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

The built in current sensors on the gen2 inverter are Hall effect sensors there are 4 of them on the output of the 6phases, software reads 2 sensors on mg1 and 2 sensors on mg2 we have to assume the 3rd phase of each has an equal amount of current to half the sum of the 2 sensors then add up the real and assumed values of mg1 and mg2 to find the total current output to the motor,
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Are these 4 Sensors read on 4 separate ADC pins?
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

Yes
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Ahh!

OK I see it now...


current_limit=map(filtered_throttle,0,254,cl_low,cl_high);

analog_current1 = analogRead (CR1);
amps_current1 = map(analog_current1,9,1023,0,400);

analog_current2 = analogRead (CR2);
amps_current2 = map(analog_current2,9,1023,0,400);

analog_current3 = analogRead (CR3);
amps_current3 = map(analog_current3,9,1023,0,400);

analog_current4 = analogRead (CR4);
amps_current4 = map(analog_current4,9,1023,0,400);

mg_amps = ((amps_current1 + amps_current2) * 1.5) + ((amps_current3 + amps_current4) * 1.5);
if (mg_amps <0) mg_amps =0;
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Makes sense ...
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

So.. Looking at the Map function it looks like each Phase measures from 0 to 400 amps after the Map... When you sum these all up. It seems the Granularity of current measurement will be on the order of multiple amps... correct?
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

After the map function we end up with a resolution on 0.39 amps per adc value, once added up we end up with a total resolution just over 2 amps, plenty fine enough when dealing with hundreds of amps, this raw mg_amps is used as feedback for control based functions which require quick response and is also filtered to become filtered_current for a more stable display figure
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Ok thanks!!

Oh my Gen 2 inverter came in the mail yesterday.. I bought 2 of them!
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Hey got another Question:

What Temperature device are you writing to here that needs a PWM signal?

temp_pwm = map (filtered_temp, 0,160, 0, 254);
analogWrite (PWM_6, temp_pwm);
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

Temp gauge on the dash
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

Pwm gnd does a good impression of a temp gauge sender, you’ll need to change the values to suit your car
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Ahh I get it...

What Temp Gauge are you using? Ill just get me one of those...
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

The one built into the RX8 instrument cluster so you will have to do something different
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Oh Ok..
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Hey,

So the electircal interface from the Tens 3.2 board and the Prius inverter is there some sort of electrical buffer or translator or something that goes between the Prius inverter and the Tensy board? Im still moving forward..

thanks
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Hello EV8,

Will you be available to answer more questions?
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by MattsAwesomeStuff »

Ev8 wrote: Wed Oct 20, 2021 1:32 pmI should commit some time to designing a real board if there is genuine need for it…
Hey, since there's been a couple more people over on the DIY EV forums asking about suitable DC controllers this week (and attempting to find out what is/was the Open Revolt controller), I said I'd give you a soft nag about someday designing or publishing something a beginner could use. :P

No pressure, I too never seem to have the time I think I do to get my own stuff done, let alone stuff for other people.

Just if you're weighing how useful it'd be, add a couple more tokens to the "Yeah" side of the balance.
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by Ev8 »

I’m so sorry to everyone who’s been waiting, I promise it is something I will do but Christmas didn’t pan out with any me time! Right now I’m trying to complete a guy’s mk1 golf gti restoration and I’m then out of the country for 4 weeks, basically I need to pull the board from my car and double check a few things before I draw up a schematic, unfortunately it’s off the road and in the corner of the unit with a melted commutator unit I get time to begin phase2 with an ac motor.

I haven’t done anything close to ground breaking here it’s all just input signal conditioning with resistors and logic level mosfets driving the outputs. The information for the resistor values I even posted I believe, the code was actually what took the time and effort to develop, I kinda hoped others would be able to reverse engineer it for themselves, anyway I’m rambling now,

Short story I will post a schematic…. But I can’t promise when
GE11
Posts: 42
Joined: Fri Oct 15, 2021 7:03 pm

Re: Prius Gen2 Inverter DC Motor Controller

Post by GE11 »

Thanks EV8 ... I can understand your so busy having to volunteer time for us..

thanks
sigdigits
Posts: 73
Joined: Sun Mar 06, 2022 12:20 am
Has thanked: 30 times
Been thanked: 7 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by sigdigits »

MattsAwesomeStuff wrote: Thu Jan 20, 2022 12:36 pm
Ev8 wrote: Wed Oct 20, 2021 1:32 pmI should commit some time to designing a real board if there is genuine need for it…
Hey, since there's been a couple more people over on the DIY EV forums asking about suitable DC controllers this week (and attempting to find out what is/was the Open Revolt controller), I said I'd give you a soft nag about someday designing or publishing something a beginner could use. :P

No pressure, I too never seem to have the time I think I do to get my own stuff done, let alone stuff for other people.

Just if you're weighing how useful it'd be, add a couple more tokens to the "Yeah" side of the balance.
I happen to have built the Open Revolt controller, and I even have a few spare boards left if anyone is interested. I found this thread because of Damien's video about building an IGBT version using the Open Revolt board. I'm interested in this thread, as well because I have a prius inverter, and I'm looking into doing more conversions/restoration projects with DC and AC motors. Not sure where things sit at the moment, but I'm glad to help where I can but learning as I go.
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Prius Gen2 Inverter DC Motor Controller

Post by MattsAwesomeStuff »

A couple more people asked about this, or, something that could do this.

... after a 2 year hiatus from looking at the details of inverters and such, I've been diving back in the last month. I'm not doing a DC build, but over on the DIYEV forums I try to steer people towards the solutions that would work best for them, and, this project is the only sub-$1000 DC controller I know of, hence me encouraging this to go somewhere.

Gave this whole thread a re-read, and embarrassingly, learned something(s) obvious...

Damien already made and sold at least 10 of these boards, from JLCPCB already. About a year ago. And, I presume sold out and he's not making more. So, I presume there's already a... I dunno what it is, the format that would show circuit traces and stuff? I presume that's on the Github, I just don't know what any of those filenames are for or what they do or what the proper software is. But that's not much of a hurdle.

So, if we've got parts from the BOM (very simple), and we've got a schematic from some type of file I don't know about, and we've got code from... someone. Then, what is our current roadblock on doing this? (Also, this makes more sense that EV8 was able to build this on perfboard, as it's very simple, and, a circuit layout already existed in as much as he felt like copying it).

By coincidence, I happen to be building a Prius Gen 2 AC project, and I do have a spare forklift motor, so, I could technically test this myself if need be. The fact that there's like, 3 or 4 exploded inverters in this project is intimidating though, because I have no electronic instincts to fill in the knowledge gaps, I'm likely to add another inverter corpse to the morgue.

----

Anyway, as a state of affairs, for those following along, where are we?

I'm not much good except for cheerleading, coordinating, and documenting it when it's done.

What are the missing pieces we need to know, to have this be a viable option for people?

I would really like this to be *the* DC option.
Post Reply