Prius Gen2 Adapter Board for CHARGING

Topics concerning the Toyota and Lexus inverter drop in boards
Post Reply
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Just had another idea these days: If we want to do low power BOOST charging we should be able to use the auxiliary A/C compressor inverter to rectify 1-phase AC for us :) It feeds into the low voltage side of the buck/boost converter, so with the batteries connected to the DC bus on the high voltage side we can boost charge.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by MattsAwesomeStuff »

johu wrote: Wed Nov 10, 2021 4:53 pmIf we want to do low power BOOST charging we should be able to use the auxiliary A/C compressor inverter to rectify 1-phase AC for us
Has anyone reverse engineered the Aux inverter yet for any of the Priuses?

Like, just for use as an A/C compressor controller, that would be one more piece of the Prius puzzle, and bump up its reusability a lot more.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 Adapter Board for CHARGING

Post by ZooKeeper »

johu wrote: Wed Nov 10, 2021 4:53 pm Just had another idea these days: If we want to do low power BOOST charging we should be able to use the auxiliary A/C compressor inverter to rectify 1-phase AC for us :) It feeds into the low voltage side of the buck/boost converter, so with the batteries connected to the DC bus on the high voltage side we can boost charge.
I LIKE it!!! Especially for those who are not building a daily driver, but a hobby type vehicle where overnight charging or a mild top-off is all we ask for ;)
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
NiHaoMike
Posts: 64
Joined: Mon Dec 02, 2019 4:11 am
Location: Austin, TX
Been thanked: 1 time
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by NiHaoMike »

johu wrote: Wed Nov 10, 2021 4:53 pm Just had another idea these days: If we want to do low power BOOST charging we should be able to use the auxiliary A/C compressor inverter to rectify 1-phase AC for us :) It feeds into the low voltage side of the buck/boost converter, so with the batteries connected to the DC bus on the high voltage side we can boost charge.
It would be easier to just add a bridge rectifier, they're dirt cheap. That would leave the A/C inverter usable for its original purpose, or possibly for some other small 3 phase motor.
My first solar power system helped Naomi Wu, now I want to do even more with DIY solar.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

NiHaoMike wrote: Thu Nov 11, 2021 2:25 am It would be easier to just add a bridge rectifier, they're dirt cheap. That would leave the A/C inverter usable for its original purpose, or possibly for some other small 3 phase motor.
It's just an option. The advantage with abusing the A/C inverter is that the rectifier is already in the cooling chain as opposed to an external one.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

That's a really good idea. Would there need to be any physical changes bar plugging the AC into a different connector?
Those AC cables look chunky enough for most home charging applications anyway, and Boost charging gives some good options for going higher than 80s or so in the battery pack. Would be great to free up MG1 for more motor power if needed as well.

I have often thought of what I could do with the AC power on the inverter. AC isn't really that important in a convertible in the UK.
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by RetroZero »

LRBen wrote: Thu Nov 11, 2021 10:17 am That's a really good idea. Would there need to be any physical changes bar plugging the AC into a different connector?
Those AC cables look chunky enough for most home charging applications anyway, and Boost charging gives some good options for going higher than 80s or so in the battery pack. Would be great to free up MG1 for more motor power if needed as well.

I have often thought of what I could do with the AC power on the inverter. AC isn't really that important in a convertible in the UK.
Yup, great idea and possibility. It would be perfect being able to run both Mg1 and Mg2 AND a small charger all in one.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 Adapter Board for CHARGING

Post by ZooKeeper »

RetroZero wrote: Thu Nov 11, 2021 2:16 pm Yup, great idea and possibility. It would be perfect being able to run both Mg1 and Mg2 AND a small charger all in one.
Especially for those applications where the Leaf stack is too tall, or all you get is the motor :)
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
Richerson
Posts: 17
Joined: Sat May 02, 2020 8:11 am
Location: Oxford
Has thanked: 77 times
Been thanked: 1 time
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by Richerson »

Great Idea, i could use the ac inverter for single phase charging, MG1 for three phase charging, and MG2 for Motor. Any idea of the power of the ac inverter? 3KW?
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Prius Gen2 Adapter Board for CHARGING

Post by ZooKeeper »

It would appear to be something shy of 5kw (220vdc x 30A = 6600w, DC-DC rating is 100A @ 13.6v = 1360w) and both share the 30A HV fuse :O

5kw aligns well with 8hp for the "typical automotive AC compressor" at full load, really efficient ones are around 6hp.
Attachments
underside board
underside board
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

So I have finally caught up on the practical front. Currently bench testing all the HV stuff before I put it into the car.

Running this through a teensy 3.6 with a pcb I made up. It should be sending the relevant 12v signals to Inverter control board, which it seems to do just fine.
PXL_20220317_165432649.jpg
I wanted to check, if I send fwd and reverse signals to the control board does this automatically put it into buck mode? It doesn't seem to want to go into buck mode even when I set it to buck on the web interface.

I currently have a simulated battery on the DC line in the form of a light bulb on the precharge and a cooker heater element acting as the battery. What I am finding is that with CSDN and CPWM pulled high, there is current following through the DC lines. I thought this couldn't happen with CSDN pulled high.

I think I have the inverter powered, it's pulled 1.4Amps ish and I have the safety lid switch grounded(which oddly I didn't need to do last year when I was testing the motor or running it in the car at low voltage). This time around I have the positive battery wire bypassing the boost converter and going straight to the main DC bus. Although I can't hear the inverter whine when it gets power, so I feel like something in there isn't happy.

Edit: Done some more testing, it only pulls 1 amp. Also compared it to the inverter in the car, this one is definitely missing it's inverter whine on startup. Time to start digging around the inverter?
PXL_20220317_170300415.jpg
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by RetroZero »

Good setup. Might go your way and do some 'low' voltage simulations this weekend.
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

Ok I pulled the inverter from the car and got it on the bench. This time it makes the plesently high pitch squeal on start up.

I have my arduino running this on start up

Code: Select all

 //-------If charge port plugged in on startup run through charging setup.
  digitalRead (simpprox);
  if (digitalRead(simpprox)) // run normal start up
  {
    digitalWrite (precharge, HIGH);   //activate prehcharge on start up
    analogWrite(rpm, 128);
    analogWriteFrequency(rpm, 2000); //Start rpm at intial high to simulate engine start.Serial.print("normal startup");
    //digitalWrite(csdn, LOW);
    digitalWrite(fwd, HIGH);
    Serial.print("normal startup");
    chargemode = 1;

  }
  else ///put CPWM and CSDN to High and enable charge mode, disabling drive.
  {
    digitalWrite(fwd, HIGH);
    digitalWrite(rev, HIGH);
    delay (1000);
    digitalWrite(csdn, HIGH);
    digitalWrite(cpwm, HIGH);
    Serial.print("charge port connected");
    chargemode = 2;
  }
  delay(3000);
}
The idea is that if the charge port is sensed via the proxy pin output from SIMP charge, then it goes into charge mode by sending fwd and rev signals to the inverter controller and pulling CSDN and CPWM high via 470ohm resistor on each line.

Then my loop calls different functions depending on the charge mode. In the case of charging it runs this

Code: Select all

void charging() {

  //--------Charge process Not done yet
  digitalRead (simppilot);
  digitalRead (simpprox);
  int simpproxvalue = digitalRead(simpprox);
  int simppilotvalue = digitalRead(simppilot);
  maincontactorsingalvalue = digitalRead(maincontactorsignal);
  //digitalRead (chargebutton);
  digitalRead (maincontactorsignal); // main contactor close signal from OI control board


  if (simpproxvalue == 0 && simppilotvalue == 0 && maincontactorsingalvalue == 1) // If plugged into charger both should read high, only run if main contactor not closed.
  {
   // digitalWrite (precharge, HIGH); // close  Battery precharge contactor
    digitalWrite (chargestart, HIGH); // semd signal to simpcharge to send AC voltage
    Serial.print("charge precarghe");
  }
  else {

    if (simpproxvalue == 0 && simppilotvalue == 0 && maincontactorsingalvalue == 0)// && (Batterysoc < 95)) //needs pilot signal and HV bus precharged before charging starts. Won't start charging past 95% SoC
    {
      digitalWrite (maincontactor, HIGH);
      digitalWrite (accontactor, HIGH);
      digitalWrite (csdn, LOW);
      digitalWrite (precharge, LOW);
      Serial.print("start charging");
    }

    else {
      digitalWrite (chargestart, LOW);
    }
What happens is that the charge port is recognised, then the inverter makes a louder whine until the main contactor closes, which then gives 315v on the battery outputs and about 350v on the DC bus. However changing chargepwmin or chargepwmax doesn't change the voltage. If I close the precharge contactor on the charge during the precharge process then I get the light shining and the voltage on the DC bus stays at 240v, which makes sense if it hasn't closed the AC contactor and is running through the AC precharge resistor.

Feels like buck mode isn't activating when fwd and reverse are both selected. Is there another way to activate buck mode through CANBUS or IO signals I can send the the control board? Without having to manually select buck in the web interface. Running firmware version 5.14 FOC.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Check "udcswbuck" as in buck mode usually you precharge to a higher voltage.
Also I found that chargepwmin/max isn't immediately applied. That got me as well. Changed firmware attached
Attachments
stm32_foc.bin
(47.27 KiB) Downloaded 118 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

johu wrote: Fri Mar 18, 2022 5:43 pm Check "udcswbuck" as in buck mode usually you precharge to a higher voltage.
Also I found that chargepwmin/max isn't immediately applied. That got me as well. Changed firmware attached
Thanks for that. I got the contactors working as they should, as with the precharge.

I am still having the initial problem of the VCU not going into buck mode with the fwd and rev signals being sent to it.
As a work around I have disabled pulling CSDN pin to low and then I can manually set the inverter to buck mode through the web interface, once the precharge is complete. This then does show as being in buck mode. I can then manually pull CDSN to ground with a jumper wire, when I do this the inverter whine shuts off, then comes back if I pull it back to 12v.

What I am finding is that voltage is going onto the DC inputs almost immediately, pulling CSDN low or high doesn't affect this at all. chargepwmin/max also has no effect. Which doesn't make sense, since I thought with CSDN to high there should be no connection between the HV bus and the battery connections. Or at least no connection somewhere between the battery connection and MG1.

I think I am going to double check all the wiring, make sure the right signal is going to the right pin.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

I'm not quite sure about your setup but in boost direction (i.e. as seen from the stock battery input) current cannot be blocked. It always flows via the upper diode
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

I think my battery connections might have something to do with it. I was bypassing the original stock battery inputs on the positive side and going straight to the HV bus. This makes sense in terms of driving a motor of course, it also makes sense that I am always seeing current and voltage since I was connected to the HV bus, so of course I would.

But it all the videos I have seen on charging the battery connections being used were the stock inputs. So I moved my battery connector back to the stock input. I'm thinking the boost converter I am by passing is kind of important for charging? Or do I have that confused?

This time I get no voltage at all on the stock battery inputs. So this feels like progress, I'm going to keep going through the processes, just confirm the signals are all correct and present.
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by RetroZero »

Oh it’s been a long time. Very rusty with thé charge setup. Would you agrée that the wiring diagram i posted at the beginning of this thread is still relevant ? I starting from scratch.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Well basically you'd need to have two interlocked positive DC contactors. Similar to this: https://openinverter.org/wiki/File:Buck ... ection.png

Your drive contactors connects to DC bus as you had before. The charge contactor connects to the converter
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

RetroZero wrote: Sat Mar 19, 2022 3:10 pm Oh it’s been a long time. Very rusty with thé charge setup. Would you agrée that the wiring diagram i posted at the beginning of this thread is still relevant ? I starting from scratch.
Ah yes, that's what I should have linked to.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

johu wrote: Sat Mar 19, 2022 3:12 pm Well basically you'd need to have two interlocked positive DC contactors. Similar to this: https://openinverter.org/wiki/File:Buck ... ection.png

Your drive contactors connects to DC bus as you had before. The charge contactor connects to the converter

Ah ok that makes sense now. Hence why going through the AC phase wires would simplify things as that is the other side of the converter, so if we got that working then we would just need to connect to the HV bus?
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

I think it's working in a manner. Rechecked all my connections just to make sure.

What I get too now is the HV bus precharged, all contactors closed and CDSN/CPWM pulled high.
Then I can set buck in the web interface, and manually pulled CSDN low. When both of those are done it starts making a different noise and the EVSE isn't very happy, clicking on and off. I do however get some voltage on the stock battery inputs.

The UDC voltage is as shown. I'm thinking CPWM is pulled the wrong way and the high side IGBT is on, shorting the EVSE. That would cause it to keep trip out and hence lower the voltage? I id try to bypass the 470 ohm resistor on CPWM to give it full 12v but that made no difference.
2022-03-19 17_39_50-Window.png
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Shorting CPWM to 12V AND connecting it to the control board can easily blow the output driver. Please check if you still see a valid waveform with CPWM pulled up.

CPWM pulled high and CSDN pulled low (or floating) will close the LOW side transistor, shorting the battery input (the stock one). Pulling CPWM low (or floating) will close the high side transistor thus connecting DC bus to battery input bidirectionally.

CSDN pulled high disables both transistors.

No quite sure what you connected where, schematic would help
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

johu wrote: Sat Mar 19, 2022 6:50 pm Shorting CPWM to 12V AND connecting it to the control board can easily blow the output driver. Please check if you still see a valid waveform with CPWM pulled up.
Not sure why I decided to by pass the resistor on CPWM now, I think I got confused with CSDN which isn't so clear if it needs a resistor or not. How do we check for a valid waveform?
johu wrote: Sat Mar 19, 2022 6:50 pm CPWM pulled high and CSDN pulled low (or floating) will close the LOW side transistor, shorting the battery input (the stock one). Pulling CPWM low (or floating) will close the high side transistor thus connecting DC bus to battery input bidirectionally.
I was of the understanding that CPWM needs to be pulled high at all times during charging. Then CSDN is pulled high to start with and then left floating or Low to start the charging process.
johu wrote: Sat Mar 19, 2022 6:50 pm No quite sure what you connected where, schematic would help
This is how I have connected CSDN and CPWM, the Teensy control board sends 12v via resistors when needed and leaves them floating when not.
2022-03-19 19_34_00-Untitled Diagram.drawio - diagrams.net.png
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Finally succeeded somewhat with boost mode charging via A/C inverter. When I say inverter I have to say I threw out the IGBTs and replaced them with a standard rectifier. Managed to reuse 3 PCB holes, the 2nd AC input goes directly to a terminal block. Also bridges the emitter resistor as it was blown anyway.

So now I can charge directly from the grid but the current waveform is not pretty. Have to research this further, in my "poor mans charger" it looks way better. BTW the currents are off by a factor of 5 because the charging current sensor has a different gain. The setpoint is 10A (2A real) but the overshoots are 40A.

The DC-DC converter also operates happily from rectified AC.

CPWM is pulled to 12V via 499 Ohm. CSDN is connected to the DC switch out (so 12V with switch off, GND with switch on). So it activates simultaneously with the positive DC contactor.
Attachments
params.json
(1.42 KiB) Downloaded 80 times
charging.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply