Page 8 of 10

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Sun Nov 14, 2021 11:31 pm
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

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:32 am
by GE11
Hey man!

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

Posted: Wed Nov 17, 2021 5:46 am
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

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 12:41 pm
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??

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:00 pm
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,

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:13 pm
by GE11
Are these 4 Sensors read on 4 separate ADC pins?

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:18 pm
by Ev8
Yes

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:20 pm
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;

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:21 pm
by GE11
Makes sense ...

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 1:29 pm
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?

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 2:33 pm
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

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 9:40 pm
by GE11
Ok thanks!!

Oh my Gen 2 inverter came in the mail yesterday.. I bought 2 of them!

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Wed Nov 17, 2021 11:29 pm
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);

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Nov 18, 2021 2:24 pm
by Ev8
Temp gauge on the dash

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Nov 18, 2021 2:26 pm
by Ev8
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

Posted: Thu Nov 18, 2021 2:29 pm
by GE11
Ahh I get it...

What Temp Gauge are you using? Ill just get me one of those...

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Nov 18, 2021 8:39 pm
by Ev8
The one built into the RX8 instrument cluster so you will have to do something different

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Fri Nov 19, 2021 12:31 am
by GE11
Oh Ok..

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Mon Jan 10, 2022 6:01 pm
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

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Sun Jan 16, 2022 5:45 pm
by GE11
Hello EV8,

Will you be available to answer more questions?

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Jan 20, 2022 12:36 pm
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.

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Jan 20, 2022 5:13 pm
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

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Thu Jan 20, 2022 8:01 pm
by GE11
Thanks EV8 ... I can understand your so busy having to volunteer time for us..

thanks

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Sat Mar 19, 2022 10:30 pm
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.

Re: Prius Gen2 Inverter DC Motor Controller

Posted: Tue Mar 22, 2022 10:24 am
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.