Prius Gen2 Adapter Board for CHARGING
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Prius Gen2 Adapter Board for CHARGING
Hope everyone is OK with me setting up a new Topic for using Prius Gen 2 and Adapter board in CHARGE MODE.
Latest Update software means Charge Function requires BUCK MODE when using MG1 as rectifier and have battery connected to stock battery input
So if I understand correctly:
1 - FORWARD and REVERSE signals HIGH (inverter in RUN Mode) AND HV DC contactors OPEN - No connection to 200V battey.
2. CPWM with 470R to switch Charge mode - HIGH
3. Precharge DC to rectified AC (One 400W halogen light for the moment) with connections as mentioned in previous post.
4. Set duty cycle (40% = 320V down to 200 V) (I noted, the higher the duty cycle, the higher the voltage)
5.Close DC contactor and AC Main contactor at same time. (To be confirmed)
For the "switch to PI charge controller", this would be the regulation of current and/or voltage into the Battery Pack?
From my basic automotive electrics undertsanding, If the potential is different between two batteries, there will be a transfer of current to balance each other. The greater the difference, the greater the current flow.
So if I set duty cycle "a bit higher" than pack voltage, I will have a current flow towards pack. If I set it to around 10 Amps MAX (Ampmeter on HV Cable), I could monitor it over a few hours of charging. (the simple way until BMS knowledge is improved)
From what I understand, using Johu's existing Wiki diagram, and previous discussions, this would be the correct wiring set up to the Inverter for CHARGE MODE.
This is my understanding, and hope to post on the Wiki (If forum agrees) IF it's correct!
Blow up your Inverters at your own risk (Had to do the disclaimer slogan)
testing i
EDIT- Modified Relay K4 / P4 output to +12v supply relay K5 / S4 (allows for Main DC Contactor to close at same time as AC contactor)
No Precharge required on DC connection to battery - To be confirmed
Deleted schema untill more complete testing is caried out.
Latest Update software means Charge Function requires BUCK MODE when using MG1 as rectifier and have battery connected to stock battery input
So if I understand correctly:
1 - FORWARD and REVERSE signals HIGH (inverter in RUN Mode) AND HV DC contactors OPEN - No connection to 200V battey.
2. CPWM with 470R to switch Charge mode - HIGH
3. Precharge DC to rectified AC (One 400W halogen light for the moment) with connections as mentioned in previous post.
4. Set duty cycle (40% = 320V down to 200 V) (I noted, the higher the duty cycle, the higher the voltage)
5.Close DC contactor and AC Main contactor at same time. (To be confirmed)
For the "switch to PI charge controller", this would be the regulation of current and/or voltage into the Battery Pack?
From my basic automotive electrics undertsanding, If the potential is different between two batteries, there will be a transfer of current to balance each other. The greater the difference, the greater the current flow.
So if I set duty cycle "a bit higher" than pack voltage, I will have a current flow towards pack. If I set it to around 10 Amps MAX (Ampmeter on HV Cable), I could monitor it over a few hours of charging. (the simple way until BMS knowledge is improved)
From what I understand, using Johu's existing Wiki diagram, and previous discussions, this would be the correct wiring set up to the Inverter for CHARGE MODE.
This is my understanding, and hope to post on the Wiki (If forum agrees) IF it's correct!
Blow up your Inverters at your own risk (Had to do the disclaimer slogan)
testing i
EDIT- Modified Relay K4 / P4 output to +12v supply relay K5 / S4 (allows for Main DC Contactor to close at same time as AC contactor)
No Precharge required on DC connection to battery - To be confirmed
Deleted schema untill more complete testing is caried out.
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
I thought if running a few "LY4 12v 8 pin" relays to switch AC side... Any other easy options to suggest?
Re: Prius Gen2 Adapter Board for CHARGING
I am going to plan on using a second Leaf relay board, since I will end up with two anyway
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
"Talent is equally distributed but opportunity is not." - Leila Janah
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Basically step #4 in your list is not yet implemented, charge mode only knows PI control. But it can be worked around. Also you must set chargemode to "boost" (which is a bit counter-intuitive because we are bucking)
So to set dutycycle to a given value just use the limiting parameter "chargemax" to the dutycycle you want and chargecur to non-zero value. Well, had I not forgotten to actually implement that parameter - new firmware later... Until then you can set chargeki=0 play with chargekp until you get your duty cycle.
So to set dutycycle to a given value just use the limiting parameter "chargemax" to the dutycycle you want and chargecur to non-zero value. Well, had I not forgotten to actually implement that parameter - new firmware later... Until then you can set chargeki=0 play with chargekp until you get your duty cycle.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 474
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 43 times
- Been thanked: 107 times
Re: Prius Gen2 Adapter Board for CHARGING
I'm glad you made a new thread for charging. I've been wondering a couple of things recently regarding the charging capabilities and didn't really want to go on that tangent on the main thread.
Is there an upper limit to what this inverter can charge? From the original thread it looks like it's ideal for a 200v battery. I'm considering running a 120s battery for 444v nominal and 504v max charge. I know the IGBTs are fine for this and MG2 should be fine to run this to the motor.
But I am uncertain if MG1 could charge this battery setup from 240v AC.
My understanding is that it will rectify 240vac to 320vdc and it can then buck that voltage down as required. But I don't know if it can also boost it up or if I would require three phase 415vac input.
Is there an upper limit to what this inverter can charge? From the original thread it looks like it's ideal for a 200v battery. I'm considering running a 120s battery for 444v nominal and 504v max charge. I know the IGBTs are fine for this and MG2 should be fine to run this to the motor.
But I am uncertain if MG1 could charge this battery setup from 240v AC.
My understanding is that it will rectify 240vac to 320vdc and it can then buck that voltage down as required. But I don't know if it can also boost it up or if I would require three phase 415vac input.
- rstevens81
- Posts: 353
- Joined: Sun Dec 22, 2019 10:36 am
- Location: Bristol, UK
- Has thanked: 23 times
- Been thanked: 92 times
Re: Prius Gen2 Adapter Board for CHARGING
As the minimum voltage if your batteries is greater than 320v, (2.67v @ 320v) you could use the motor as an inductor and boost upto the required voltage (see wiki for diagram) that way you would only be using mg2 and no need to worry about mg1 buck/boost converter.LRBen wrote: ↑Tue Oct 06, 2020 7:35 pm
Is there an upper limit to what this inverter can charge? From the original thread it looks like it's ideal for a 200v battery. I'm considering running a 120s battery for 444v nominal and 504v max charge. I know the IGBTs are fine for this and MG2 should be fine to run this to the motor.
But I am uncertain if MG1 could charge this battery setup from 240v AC.
My understanding is that it will rectify 240vac to 320vdc and it can then buck that voltage down as required. But I don't know if it can also boost it up or if I would require three phase 415vac input.
https://openinverter.org/wiki/Battery_Charging
Rule 1 of EV Club is don't buy a rust bucket....
Which rule does everyone forget
Which rule does everyone forget
Re: Prius Gen2 Adapter Board for CHARGING
There certainly are some minor advantages to boost charging from 120v mains here in the US. Given the utter lack of 240V outlets, or local charging stations, I think that will be my plan. Especially since my conversion is not intended for "trips", but only as a local "grocery getter" as it were.
Now, to read, re-read and re-re-read the Battery Charging Wiki and design the external wiring
Now, to read, re-read and re-re-read the Battery Charging Wiki and design the external wiring
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
"Talent is equally distributed but opportunity is not." - Leila Janah
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Sorry, with the gen2 inverter you cannot. For motor based charging only one of six IGBT is used. They 5 other ones must be OFF. In the Gen2 always 3 IGBTs are ON.rstevens81 wrote: ↑Tue Oct 06, 2020 8:19 pm As the minimum voltage if your batteries is greater than 320v, (2.67v @ 320v) you could use the motor as an inductor and boost upto the required voltage (see wiki for diagram) that way you would only be using mg2 and no need to worry about mg1 buck/boost converter.
https://openinverter.org/wiki/Battery_Charging
The integrated DC/DC converter (the X -> 12V one) is only populated with 400V caps, so when running the Gen2 inverter at more than 400V I'd disconnect the DC/DC completely. By default the upper buck/boost converter IGBT is on and conducts the inverter DC link voltage to the DC/DC converter.
My current take is that packs above 300V max cannot be charged.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 474
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 43 times
- Been thanked: 107 times
Re: Prius Gen2 Adapter Board for CHARGING
Perfect thank you for the information. I will add this charging information to the wiki tonight.
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Yes, re-read and re-read the wiki.... So say by some miracle, the nice wiki diagram I butchered is correct for the Gen 2 inverter, and I sourced contacters, and disconnected MG1, where would the PI charge control fit to regulate current and voltage?
I will attempt Johu's run around option first, but might as well go into the deeper and finer details. We are playing with lithium batteries after all.
I will attempt Johu's run around option first, but might as well go into the deeper and finer details. We are playing with lithium batteries after all.
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
PI control is Proportional - Integral Control right?
This means we're measuring currents and voltages at Input and Output(of inverter) , comparing them, and then with some magic codes, adjust the PWM duty cycles to supply constant "corrected" value to the battery (which we would have to know/calculate before)?
Is this where ISA Shunt comes in?
This means we're measuring currents and voltages at Input and Output(of inverter) , comparing them, and then with some magic codes, adjust the PWM duty cycles to supply constant "corrected" value to the battery (which we would have to know/calculate before)?
Is this where ISA Shunt comes in?
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
You could also use a transformer 110V to 240V?? Would simplify things maybe? I'm off hunting for contactors and bits today.....Can't complete fine tuning my bench set-up as the Prius battery pack is not holding charge. I hope my diagram is correctZooKeeper wrote: ↑Tue Oct 06, 2020 9:36 pm There certainly are some minor advantages to boost charging from 120v mains here in the US. Given the utter lack of 240V outlets, or local charging stations, I think that will be my plan. Especially since my conversion is not intended for "trips", but only as a local "grocery getter" as it were.
Now, to read, re-read and re-re-read the Battery Charging Wiki and design the external wiring
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
The board measures the AC input current into MG1. It just selects the current sensor that is most active. So may be best to connect AC to one phase without current sensor and one with.
Now it will software-rectify that current (while the diodes in MG1 hardware rectify it), low pass filter it, and compare the measured current with the set current "chargecur". It will then accumulate the difference between the two. The PWM duty cycle is then calculated like
Note that no voltage is ever used. Note also that we are controlling input current, not output current - because we have no output current sensor.
Due to the fast cycle time of the charge controller the proportional part will improve the power factor because it increases the duty cycle as the sine nears the valley and decreases it when it nears its peak. Of course that works much better with boost charging.
Now I'll just brain storm at how to be able to boost charge with a Gen2 inverter when U_ac,peak < U_battery
Now it will software-rectify that current (while the diodes in MG1 hardware rectify it), low pass filter it, and compare the measured current with the set current "chargecur". It will then accumulate the difference between the two. The PWM duty cycle is then calculated like
Code: Select all
PWM = Kp * error + Ki * accumulated_error / pwm_freq
Due to the fast cycle time of the charge controller the proportional part will improve the power factor because it increases the duty cycle as the sine nears the valley and decreases it when it nears its peak. Of course that works much better with boost charging.
Now I'll just brain storm at how to be able to boost charge with a Gen2 inverter when U_ac,peak < U_battery
- Can't use MG1 as rectifier anymore, because our input current must now come from "the other side" of the buck/boost converter, i.e. from the stock DC input
- Thus we need an external rectifier
- We could permanently enable one phase leg (with current sensor) of MG1 to be able to measure OUTPUT current with an MG1 sensor
- B- connected to DC bus -
- B+ connected to said MG1 phase leg
- no difference software-wise
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Any ideas on 10 Pin relay (K5) and 8 pin relay (K4) ?
Requires 12v_dc for switching 220 v_ac. Seems very specific, and the few I found, well, thank goodness I was sitting down.
Requires 12v_dc for switching 220 v_ac. Seems very specific, and the few I found, well, thank goodness I was sitting down.
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
The German term is Koppelschütz. Like this one here: https://www.ebay.de/itm/Siemens-3RH1140 ... Sw8Y5fPRV-
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Thanks, doing it 'the manual way' tonight. I am the relays...
This is what I understand from set up procedure instructions
"Connect CPWM to 12v via 480 ohn resistor for Charge mode... Looks correct?
This is what I understand from set up procedure instructions
"Connect CPWM to 12v via 480 ohn resistor for Charge mode... Looks correct?
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Yes
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
OK, I manage to get Boost Mode (no Ac connected as yet)
MacGyver precharge system in place.
Have 12 volt battery connected to HV DC side of inverter.
Next stupid question... How to set Duty Cycle in Parameters?
MacGyver precharge system in place.
Have 12 volt battery connected to HV DC side of inverter.
Next stupid question... How to set Duty Cycle in Parameters?
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Sorry for being a bother, I have seen heaps of these, but the switching voltage is 24 Volts. From my little "Google" research, it's not going to be enough to switch the relays.. Should I get a boost module for the switching side?johu wrote: ↑Wed Oct 07, 2020 2:16 pm The German term is Koppelschütz. Like this one here: https://www.ebay.de/itm/Siemens-3RH1140 ... Sw8Y5fPRV-
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
The Sirius contactor I have works fine from 12V so I'm hoping the entire series will
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
Whilst waiting on those relays, I went back and re-read the last few posts after some "research".
So Duty Cycle is calculated by the difference between Current IN and the value of "chargecur" set manually in Parameters. There is no way to set Duty Cycle "manually".?
Say that I got that part right, what about voltage.
If I want to copy Johu's video on the wiki, and start testing with lower voltage, to recharge 12v battery with 1A, setting "udcmin" and "udcmax" will take 320vdc and buck it down to within these parameters? ( example 12v min and 14v max)
So Duty Cycle is calculated by the difference between Current IN and the value of "chargecur" set manually in Parameters. There is no way to set Duty Cycle "manually".?
Say that I got that part right, what about voltage.
If I want to copy Johu's video on the wiki, and start testing with lower voltage, to recharge 12v battery with 1A, setting "udcmin" and "udcmax" will take 320vdc and buck it down to within these parameters? ( example 12v min and 14v max)
- johu
- Site Admin
- Posts: 5787
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1022 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
No easy way to set DC manually, yes. The charge controller only uses the 3 parameters "chargekp", "chargeki" and "chargecur", everything else is irrelevant.
It is all a bit special with the Prius buck/boost converter because either the top or bottom IGBT are always on. Very annoying. When I get my new Prius inverter on the bench I think I will make a video about charging to make it clear.
viewtopic.php?f=14&t=701&p=12856#p12856
It is all a bit special with the Prius buck/boost converter because either the top or bottom IGBT are always on. Very annoying. When I get my new Prius inverter on the bench I think I will make a video about charging to make it clear.
viewtopic.php?f=14&t=701&p=12856#p12856
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 728
- Joined: Tue Oct 29, 2019 2:48 pm
- Location: France
- Has thanked: 328 times
- Been thanked: 44 times
- Contact:
Re: Prius Gen2 Adapter Board for CHARGING
So for example I want to charge up original Prius pack for testing: 5amps to max of 210VDC (trickle charge to avoid overheating)
Udcmax is set to 215v ( max battery voltage allowed)
Udcsw or Udcnom = 210v (for now the maximum voltage allowed when charging)? (28 modules with max 7.5V average per module)
Chargeki (integral) = 0
Chargekp (proportional) = >0 A - set low and increase whilst monitoring amps to HV Battery? (using ampmeter on HV + cable)
Chargecur = 5amps (amount of current we allow INTO the inverter in Boost mode )?
Chargemax is not used on Gen2 inverter?
Did I just let out the black Japanese dust?
Udcmax is set to 215v ( max battery voltage allowed)
Udcsw or Udcnom = 210v (for now the maximum voltage allowed when charging)? (28 modules with max 7.5V average per module)
Chargeki (integral) = 0
Chargekp (proportional) = >0 A - set low and increase whilst monitoring amps to HV Battery? (using ampmeter on HV + cable)
Chargecur = 5amps (amount of current we allow INTO the inverter in Boost mode )?
Chargemax is not used on Gen2 inverter?
Did I just let out the black Japanese dust?