Prius Gen2 Adapter Board for CHARGING

Topics concerning the Toyota and Lexus inverter drop in boards
Post Reply
Pcstreet
Posts: 27
Joined: Fri Oct 09, 2020 7:32 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by Pcstreet »

OK thanks I think there is something wrong with the inverter as it will go into run mode and boost mode but not buck mode. I have ordered another inverter so will try again when I get this one. I bought the first one in a unknown condition and I have not been able to get the 12v dc to dc side working. Will post again once I have retested with the new inverter.
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

johu wrote: Tue Jan 19, 2021 5:17 pm Those things are now fixed. Mind you, the power factor is probably not great, most of the sine wave remains unused as is usual with buck chargers. But it charges :)
I'm just about to start to look into the practical side of charging on my project now and I have been looking over this thread again. I just had a question about the power factor that you mentioned there. What are your thoughts on using this as a daily charger for a car given the power factor? Would the power factor affect performance enough that it might be better to use say the Eltek 3kw chargers that seem to be pretty cheap second hand?
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

Ok I've been reading through the wikis, posts and watching the relevent youtube videos on repeat today. Ended up with what I think is a overview of the charging process. It looks like one or two things have changed over time.
Is this an accurate overview of the current state of charging with the gen 2 inverter?


Relevant Parameters
  • Charge mode:Buck
  • Chargecur: 1.5
  • Chargekp 20
  • Chargeki: 10
  • Chargeflt 2 dig
  • Charge pwmmin: 10 (Change this to get equivalent to min battery voltage.)
  • udcswbuck: x (HV bus voltage at which point Ground signal is used to control AC and HV battery relays)
Relevant Pins
  • CSDN (pin 29 on inverter)
    Shuts down high and low IGBTs when fed 12v, via 470R
    When CSDN is HIGH both IGBTs are OFF.
  • CPWM(pin 31 on control board, 13 on inverter)
    Enables charge mode when fed 12v via 470R
    When CPWM is HIGH, the LOW side IGBT is on(shorts out battery), when CPWM is LOW the HIGH side IGBT is on.
  • Forward and reverse (11 and 12 on control board)
    Both must be high to enable charging
  • DCSW switch(15 in control board)
    Controls DC relay switch.
Physical setup
  • 240v AC plugs into two MG1 phases, with a precharge resistor always on.
    Relay controlled by DCSW pin connected to ground side of relay signal wires.
  • HV Battery connected with precharge resistor
    Relay controlled from DCSW pin connect to ground side of relay wires.
  • CPWM to 12v via 470R resistor.
  • CSDN pin to 12v via 470R resistor. Ground side connected to DCSW pin.
    CSDN pin also tied to DCSW signal pin.

Process
  • Fwd and reverse signals high, relays open
  • CPWM and CSDN pulled high.
  • Connect AC input voltage with precharge
  • DCSW will then close relays and pull down CSDN pin to activate charging.
  • Activate buck on charger. By manual web interface or does just having FWD and Reverse high activate this?
  • To stop, can change chargecur to 0 or switch off inverter power.
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

One further question I have regarding the DCSW pin and relays. So from what I understand the DCSW switch can be used to close the AC relay once the HV bus is up to voltage. But the DCSW is also used to close the battery side contactors. So I thought this might cause some issues if the precharge on one side was done before the other.

However now I think about it, the HV bus should be common to both MG1 input and the battery inputs. So it isn't a question of precharging each side, it's just about charging up the HV bus. Is that right or have I got the wrong end of the stick?

I'm just trying to source some AC relays for my own setup. Is there a part number for that Leaf board you used for AC precharge and relays?
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Forgot to comment on that one. Very good you wrote it up.
LRBen wrote: Sun Mar 28, 2021 6:02 pm [*]CPWM to 12v via 470R resistor. Controlled with a physical switch?
[*]CSDN pin to 12v via 470R resistor. All the time?
[*]CPWM pulled high. Can add switch. (Or always on via 470R?)
Yes CPWM should only be pulled high when you actually intend to charge, likewise CSDN. That way the upper IGBT stays closed and allows regen current to exit the inverter.
LRBen wrote: Sat Apr 03, 2021 11:01 am However now I think about it, the HV bus should be common to both MG1 input and the battery inputs. So it isn't a question of precharging each side, it's just about charging up the HV bus. Is that right or have I got the wrong end of the stick?
When charge mode is set to buck the inverter precharges to "udcswbuck" instead.
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: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

Thanks for confirming that. That makes sense. I have updated my post and added the section to the wiki.
johu wrote: Sat Apr 03, 2021 1:15 pm When charge mode is set to buck the inverter precharges to "udcswbuck" instead.
Ah I see, So I am guessing there that the udcswbuck would be for when the AC is connected to MG1 and that voltage would be higher than the battery voltage. So the HV bus needs to precharge to that higher voltage?
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Yes exactly.
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: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

Brilliant, that all makes sense now!
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 316 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by RetroZero »

Question not too dumb (I think)...
Does Mg1 motor need to be disconnected from circuit before using the Charge function? Basically, if I were to run both Mg1 and Mg2, I would need to make a HV Contactor box for seperating Mg1 motor before charging?
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Yes, grid 400V AC into the motor is not good ;) (probably just trips your house fuse)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Might be interesting to explore the idea of using MG1 as an inductor for charging, just like the Renault Zoe. Easy way is to add a bridge rectifier with the output connected between phase B (since phases A and C have current sensors) and HV ground.
My first solar power system helped Naomi Wu, now I want to do even more with DIY solar.
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 316 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by RetroZero »

I am looking for firstly, a short term solution, to recharge my prius battery for testing purposes. So if MG1 is not in use, I can hard wire in the current solution.

However, I will be running dual motors in the end, so it looks like an external charger will be better suited, since bridge rectifiers will set off alarm bells with my TUV equivalent regulations here.. Another Inverter is too much waste I feel.
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

I ran into a strange issue while testing charge mode.
When using 24V from a powersupply everything seems to work OK.
However, things didn't quite work when I switched to 110VAC:
A few seconds after plugging in the 110VAC (U and W on MG1, 30Ohm precharge resistor always on) the AC contactor closes (udcswbuck set to 160V)
However, the board reports a DESAT error and I see 160VDC on the HV battery bus and 0VDC on the DC bus.
I have nothing plugged into the HV battery bus, since I want to charge a 12V lead acid battery (for testing) so 160VDC wouldn't be great.
As soon as I unplug the 110VAC from MG1 the DESAT error is gone.
Any idea where that DESAT error is coming from?
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

What are your charger parameters? Did you measure the two voltages with a meter? The board itself can only measure one of them.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

Yes, measured with meter on copper bus bars.
Charger Params:
Charge mode:Buck
Chargecur: 2
Chargekp 20
Chargeki: 10
Chargeflt 2 dig
pwmmin: 7
pwmmax: 9
udcswbuck: 155
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

quick update: So the DESAT error was due to the 12V supply drooping when the contactor closed. Replaced it with a solid 12VDC supply and no more errors.
I see 164.8VDC on the DC bus and 164.2V on the HV battery side.
pwmmin is set to 7.18, pwmmax to 9.0.
I was expecting the regulation to only happen within the min-max window (11.8VDC and 14.8VDC), even without a load/battery attached. I changed the pwmmin and pwmmax values but they seem to have no effect on the HV battery bus voltage. What pin has the PWM signal that's used to control the charging voltage?
parameters attached.
firmware 5.06.R-foc
Attachments
110VAC_12VDC_charging_20210917.json
(1.33 KiB) Downloaded 83 times
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Try loading the output with a cooker element or something.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

Is CPWM supposed to stay pulled high with 470ohm at all times when charging?
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 100 times

Re: Prius Gen2 Adapter Board for CHARGING

Post by LRBen »

kon wrote: Sat Sep 18, 2021 8:21 pm Is CPWM supposed to stay pulled high with 470ohm at all times when charging?
Yes I believe it is.
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

My bad, I had the wrong pin pulled up high. My HV battery bus voltage is now within the expected window. The charging current however is not where I'd expect it to be. I set it to 1A and saw 2.5A output. Set it to 5A and 10A and also got 2.5A both times. When increasing pwmmax to 10 and max charging current at 10A I saw it spike to 30A and then settle at 26A. All currents were measured with a clamp meter on the HV battery bus cable going to the 12V lead acid battery.
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

Yes in buck mode chargecur (well, rather unintuitively) refers to the INPUT current as that's where the current sensors are located.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Sun Sep 19, 2021 10:13 am Yes in buck mode chargecur (well, rather unintuitively) refers to the INPUT current as that's where the current sensors are located.
That is actually good for my application to avoid overloading the weak US circuits! I never considered installing an element on the battery side to test charging, I will do it! 8-)
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
kon
Posts: 28
Joined: Sat Mar 20, 2021 7:54 pm

Re: Prius Gen2 Adapter Board for CHARGING

Post by kon »

Got it.
Just to recap:
When in charge mode the PI loop regulates the pwm duty cycle within pwmin and pwmax which changes HV battery voltage to achieve set charging current (on AC input).
There is no upper current limit for the input, right?(in case the PI loop freaks out due to poor tuning)
Is there a way of approximating the DC charging current on the battery side based on the other known parameters?
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 »

kon wrote: Sun Sep 19, 2021 5:00 pm Is there a way of approximating the DC charging current on the battery side based on the other known parameters?
Watts in ~= Watts Out???
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
johu
Site Admin
Posts: 5763
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1005 times
Contact:

Re: Prius Gen2 Adapter Board for CHARGING

Post by johu »

kon wrote: Sun Sep 19, 2021 5:00 pm There is no upper current limit for the input, right?(in case the PI loop freaks out due to poor tuning)
Yes recap is correct. There is a hardware limit implemented in the Prius hardware, therefor there is no further (configurable) current limit on the control board itself.
ZooKeeper wrote: Sun Sep 19, 2021 6:18 pm Watts in ~= Watts Out???
Yes that would be possible, for display purposes at least.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply