Thank you so much!! greatly appreciated
Prius Gen2 Inverter DC Motor Controller
Re: Prius Gen2 Inverter DC Motor Controller
Hey man!
Do I need to Buy one of these for the controller??
https://www.ebay.com/itm/274670520327?_ ... %7Ciid%3A1
Do I need to Buy one of these for the controller??
https://www.ebay.com/itm/274670520327?_ ... %7Ciid%3A1
Re: Prius Gen2 Inverter DC Motor Controller
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
Re: Prius Gen2 Inverter DC Motor Controller
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??
Re: Prius Gen2 Inverter DC Motor Controller
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,
Re: Prius Gen2 Inverter DC Motor Controller
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;
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;
Re: Prius Gen2 Inverter DC Motor Controller
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?
Re: Prius Gen2 Inverter DC Motor Controller
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
Re: Prius Gen2 Inverter DC Motor Controller
Ok thanks!!
Oh my Gen 2 inverter came in the mail yesterday.. I bought 2 of them!
Oh my Gen 2 inverter came in the mail yesterday.. I bought 2 of them!
Re: Prius Gen2 Inverter DC Motor Controller
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);
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);
Re: Prius Gen2 Inverter DC Motor Controller
Pwm gnd does a good impression of a temp gauge sender, you’ll need to change the values to suit your car
Re: Prius Gen2 Inverter DC Motor Controller
Ahh I get it...
What Temp Gauge are you using? Ill just get me one of those...
What Temp Gauge are you using? Ill just get me one of those...
Re: Prius Gen2 Inverter DC Motor Controller
The one built into the RX8 instrument cluster so you will have to do something different
Re: Prius Gen2 Inverter DC Motor Controller
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
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
Re: Prius Gen2 Inverter DC Motor Controller
Hello EV8,
Will you be available to answer more questions?
Will you be available to answer more questions?
-
- Posts: 1013
- Joined: Fri Apr 26, 2019 5:40 pm
- Has thanked: 390 times
- Been thanked: 258 times
Re: Prius Gen2 Inverter DC Motor Controller
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.

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.
Re: Prius Gen2 Inverter DC Motor Controller
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
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
Re: Prius Gen2 Inverter DC Motor Controller
Thanks EV8 ... I can understand your so busy having to volunteer time for us..
thanks
thanks
Re: Prius Gen2 Inverter DC Motor Controller
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 wrote: ↑Thu Jan 20, 2022 12:36 pmHey, 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.
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.
-
- Posts: 1013
- Joined: Fri Apr 26, 2019 5:40 pm
- Has thanked: 390 times
- Been thanked: 258 times
Re: Prius Gen2 Inverter DC Motor Controller
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.
... 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.