Page 3 of 10
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 14, 2020 9:53 pm
by RetroZero
I'm stuck as relays don't close with 12v.
I was going to do the whole test sequence :
Set Charge mode to BOOST and save to parameters.
Set chargemax - rectified ac (320vdc)/220v(max battery pack voltage for prius pack that I want to set to) *100 = %value. From what I understand, this is the duty cycle limit.
CSDN, CPWM(470R), Rev, Fwd & 12v = starting inverter in Charge mode.
CSDN - disconnected and charging starts with PI controler regulating to chargecur value (set up previously)
Note - at the moment, high inrush voltage could possibly cause damage!!
That is where Johannes mentions setting up low PWM in software for initial contact. For now, I will try a dimmer switch and ramp up after CSDN disconnected.
When charging complete, pull CSDN high before switching off inverter..(microswitch to pull relay to ground via resistor & reset CSDN sequence) I would set it to 5 seconds to have enough time to remove plug.
Hope this helps, but I have yet to try it out and confirm.... (disclaimer blabla)

Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Nov 18, 2020 4:29 pm
by johu
Some more progress today.
I added the "chargepwmin" parameter. The PWM will never be lower than that. With that I managed to charge a 12V battery from my 40V power supply without seeing a voltage spike. Also I initialize the PWM shortly before closing the contactor (normally it is initialized 0.5s after)
I set it to 30% because 40/13 is about a factor of 3.
I pulled up CSDN to 12V with 470 Ohm and attached it to the contactor (dcsw) signal. So as soon as the contactor closes, the PWM is enabled - no delay. This works perfectly from my 40V supply but when I tried with 230V AC = 320V DC I just blew the fuse. Of course pwmin lowered to 3%. Some more investigation needed.
Sorry to hear that you contactors don't close on 12V, when do they close?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Nov 18, 2020 7:25 pm
by TheSilverBuick
Any update on this?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Nov 18, 2020 7:41 pm
by johu
Apart from what I wrote 5 hours ago?

Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Nov 18, 2020 9:02 pm
by RetroZero
I am think there's too much current draw on 12v side of my setup. I also need a 'new' k1 relay. I blindly thought it was a 220vac relay until it nicely popped the black smoke. Looking on the back I found a faint sticker 24vac....back to internet shopping.
Thanks for setting up new parameter.
Am I correct in understanding you set pwmin to 3% because you were trying to charge 12v battery from 320vdc(rectified mains)?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Nov 18, 2020 9:21 pm
by TheSilverBuick
johu wrote: ↑Wed Nov 18, 2020 7:41 pm
Apart from what I wrote 5 hours ago?
LMAO! My apologies, I must of been a page behind

Re: Prius Gen2 Adapter Board for CHARGING
Posted: Thu Nov 19, 2020 10:41 am
by johu
RetroZero wrote: ↑Wed Nov 18, 2020 9:02 pm
Am I correct in understanding you set pwmin to 3% because you were trying to charge 12v battery from 320vdc(rectified mains)?
Yes!
Maybe a silly idea in the first place.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Thu Nov 19, 2020 2:18 pm
by RetroZero
No Idea is silly. So if you tried it with 40vdc IN and ramping up afterwards to 320vdc?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Thu Nov 19, 2020 4:27 pm
by johu
Yes
Also the 40V was from a lab supply, so current limited. Any glitch would just go unnoticed.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 3:00 am
by DreaminEV
Can a Gen 2 or Gen 3 board be used for charging across MG1 and used as a mains inverter, 120VAC in the US or 240VAC everywhere, across MG2?
I ask because an EV with two inverters, one to run the car and the other to charge the car and use the HV battery as a back up generator, sounds like a really nice setup to me.
Thoughts?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 8:09 am
by johu
Theoretically yes, but no one dared implementing grid synchronisation/mains inverting.
When it comes to grid free inversion something is planned. I.e. when you connect MG1 to you house hold, open a switch to disconnect from the grid and then start inverting.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 1:17 pm
by DreaminEV
I wouldn’t dare attempt to run an inverter in parallel with the grid. It would be for power outages scenarios similar to what happened to Damien. Completely disconnect from the grid with a breaker and lock out switch, then use an EV as a back-up generator.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 3:05 pm
by Pcstreet
Got my inverter into boost mode no ac connected. Verified this by looking in spot values and it says boost instead of run. Go back to commands and still no pi command to start charge mode will somebody please explain why I don't have this option in the commands thanks Paul
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 5:11 pm
by RetroZero
If I am not mistaken, PI Control is activated automatially when Voltage IN (AC?) AND Chargemax value has been set, along with Charge Mode Activated.
In Johu's example : Voltage IN = 40VDC. Voltage of battery to be recharged = 12VDC. 40/12= 33(%). He selected 30% (to be on safe side?)
So PWM frequency will 'use' 30% of Voltage IN, AND PI control will attempt to maintain CURRENT set in chargecur value.
If no Voltage IN, no PI Control....That's my 2 cents worth.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Fri Nov 20, 2020 7:09 pm
by Pcstreet
Thanks for the reply just watched Johu's video again and he activates charge mode on a separate tablet which is connected to the board by Wi-Fi. The charge mode function is in the commands list the problem I'm having I never get this option in my command list so I can't activate it thanks again Paul.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 21, 2020 7:38 am
by RetroZero
Good attention to detail. Didn't think anything of the Laptop and Phone running at the same time. I assumed it was the Start Inverter and Stop Inverter commands. I will have to go have a play this week-end. I'm sure the enlightened one will reveal some secrets though.
Are you running the latest software?
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 21, 2020 12:32 pm
by johu
I will rename myself to "the one"

I typed "start 3" into the custom command box

3=boost
But later on I used the FWD+REV because only then the dcsw is activated.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 21, 2020 2:40 pm
by Pcstreet
Thanks for the reply Retrozero if it's the start and stop inverter that's all I wanted to know as I could not read what it said on the phone. Please post how you get on. I'm going to download to the lastest firmware tomorrow.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 21, 2020 4:35 pm
by RetroZero
Back to drawing board for me, my contacters require 230vac to activate the relays. I didn't get the 30VAC ones. Will order a Prius battery relay assembly....
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Sat Nov 21, 2020 4:49 pm
by Pcstreet
Sorry to hear that.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Mon Nov 23, 2020 2:02 am
by NiHaoMike
I'm working on a FPGA based controller to run a Prius inverter for zero export inverter operation, but I'm using a Gen3 which allows independent control of the high and low sides so that a high impedance state is possible. Then by alternating H/Z or L/Z, it is possible to source to the positive part of the mains cycle or sink from the negative part of the mains cycle, allowing power injection in a very well controlled manner. The Gen2 doesn't support high impedance which makes control for grid tied use a lot more difficult. I suppose you could add a pair of SCRs in series with the output to enforce a current direction, but just using a Gen3 inverter would probably be more economical.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Tue Nov 24, 2020 10:09 am
by Pcstreet
Seeking verification want to charge 24v battery to 27v Max using 240ac (320vdc)
1 chargemode boost
2 chargecur 5 (5amps is 13amps Max from a 13amp 240ac supply)
3 chargekp 0 (is this value used)
4 chargeki 0 (is this value used)
5 chargeflt 0 (is this value used)
6 chargepwmin 7 ((24vdc battery min)/(320vdc))*100=7.5%
7 chargepwmax 9 ((27vdc battery max)/(320vdc))*100=8.4375%. Once voltage reached will this stop the charging process or do you need to set udcmax to 27 to shutdown inverter
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Tue Dec 08, 2020 2:06 pm
by ZooKeeper
I think I completely misunderstand this process.
Did some testing and with the VCU "off", but the Prius Gen2 inverter "on, I get voltage on the battery DC connections feeding from MG1. Granted this is at low voltage, but interesting. I have equipment on the way to allow higher voltage testing with reasonable safety.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Tue Dec 08, 2020 8:40 pm
by johu
Pcstreet wrote: ↑Tue Nov 24, 2020 10:09 am
Seeking verification want to charge 24v battery to 27v Max using 240ac (320vdc)
1 chargemode boost
2 chargecur 5 (5amps is 13amps Max from a 13amp 240ac supply)
3 chargekp 0 (is this value used)
4 chargeki 0 (is this value used)
5 chargeflt 0 (is this value used)
6 chargepwmin 7 ((24vdc battery min)/(320vdc))*100=7.5%
7 chargepwmax 9 ((27vdc battery max)/(320vdc))*100=8.4375%. Once voltage reached will this stop the charging process or do you need to set udcmax to 27 to shutdown inverter
Sorry, missed that. You have zeroed the PI controller gains so nothing will happen. There is no high voltage cutoff as of now.
Re: Prius Gen2 Adapter Board for CHARGING
Posted: Wed Dec 09, 2020 5:20 pm
by Pcstreet
Thanks for the response Johu. My setup 24v battery to gen3 relay box to main dc power supply inlet on inverter. Put into boost mode with forward and reverse connected to 12v. CPWM + 470ohm resistor to 12v and CSDN pin29 to 12v. No power connected to MG1. Next I thought I would try and disconnect CSDN pin29 and at this point I got buzzing sound either from the relays or the inverter. Also I could smell a burning smell from around the boost reactor so connected CSDN pin29 back to 12v and everything went back to normal no buzzing sound. So I wondered is this normal when no power connected to MG1. I wanted to try charging the 24v battery tommorow but after this I don't want to connect 240vac to MG1 without further advice.