New use case: 230V AC from a few V DC

User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

New use case: 230V AC from a few V DC

Post by johu »

Got some new code for you: https://github.com/jsphuebner/stm32-island

So I did the obvious: hook up a 40V battery to the Prius Gen2 DC input, run the boost converter to give us about 300V DC and then run two phases at 50 Hz to give us 230V AC. Feed all that through a filter and run your appliances on it :)

I tried:
- an 850W coffee machine - check
- a jigsaw - check
- angle grinder - check

The most drop was caused by the coffee machine, 210V but I think thats because the battery pack couldn't keep up. The DC bus is PI controlled while AC is not controlled.

Video coming soon.

This is running on a Prius Gen2 board as is. To run it on a Gen3 Prius board you'd need to wire the buck/boost converter to the STM32.
The point is obvious: you can use MG2 to run your motor and MG1 to run your power tools. Or to make coffee.

I will change to layout to have TIM4 run the boost converter and therefor have TIM1 available to also make 3-phase AC.
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: New use case: 230V AC from a few V DC

Post by ZooKeeper »

AWESOME!

Now we have recycled Toyota gear with bi-directional power! For those of us poor saps in the 'States, I suppose we will just need to keep an eye out for the 120/240vac appliance variants ;)
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by Jack Bauer »

Should be possible to set the dc bus to about 170vdc then you get 120vac. and at 60hz of course:)
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by Jack Bauer »

Gahhh! and of course I gave away all my gen2 inverters:)
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: New use case: 230V AC from a few V DC

Post by Dilbert »

Jack Bauer wrote: Thu Jan 21, 2021 8:26 am Gahhh! and of course I gave away all my gen2 inverters:)
I have a spare if you want one!
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

Jack Bauer wrote: Thu Jan 21, 2021 8:26 am Gahhh! and of course I gave away all my gen2 inverters:)
Yes, they all magically turned up here :) But you can eventually pull the same trick with the Gen3.

Video rendering.

What I've learned today: don't connect more brittle electronics to it. Blew the fuse in my laptop power supply. Screwless, pita to open :roll:

So robust output filtering is a must, ya know common mode chokes and such.
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: New use case: 230V AC from a few V DC

Post by ZooKeeper »

Jack Bauer wrote: Thu Jan 21, 2021 8:26 am Gahhh! and of course I gave away all my gen2 inverters:)
I have one, but shipping across the pond would be more than it's worth.

Oh, a quick read of the labels suggests much of the "120v" stuff I have will run on 50 or 60 Hz :D
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: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

You can set it to any frequency anyway, allowing up to 65 Hz :)

Anybody know their way around inverter filtering? I.e. making a clean sine wave from a PWM synthesized one? The Leaf input filter board only created a lot of heat when I tried to use it. And the little EMI filter wasn't much help either. Even my HP bench meter sometimes conked out just from MEASURING the output!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by Jack Bauer »

Yeah most emi filters will be a)useless and b)melt down when you hit them with that much fast pwm:) Need a nice slow L-C filter to remove the high freq components. Presume you are doing svpwm on the output? See page 41 here :
https://web.wpi.edu/Pubs/E-project/Avai ... _final.pdf
I'm going to need a hacksaw
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by celeron55 »

A spare prius boost inductor and cap as filter? Would handle a lot of power.

EDIT: Of course, doing modified sine wave allows not using filtering. Works nice for the laptop but is a bit hard on the fridge compressor.
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by collin80 »

johu wrote: Thu Jan 21, 2021 4:50 pm You can set it to any frequency anyway, allowing up to 65 Hz :)

Anybody know their way around inverter filtering? I.e. making a clean sine wave from a PWM synthesized one? The Leaf input filter board only created a lot of heat when I tried to use it. And the little EMI filter wasn't much help either. Even my HP bench meter sometimes conked out just from MEASURING the output!
Yeah, been there, gotten the T-Shirt. I too have caused meter glitches while measuring a noisy output from a test inverter. It's quite exciting. Filtering the output does seem to require a large amount of capacitance and inductance. And, joy of all joys, inductors for this use can be really big. I admit, it's kind of a black art to me. I wish I knew how to do it better.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

celeron55 wrote: Thu Jan 21, 2021 10:54 pm A spare prius boost inductor and cap as filter? Would handle a lot of power.

EDIT: Of course, doing modified sine wave allows not using filtering. Works nice for the laptop but is a bit hard on the fridge compressor.
Prius inductor should certainly be up the job.
Modified sine wave means square wave, right? Meh.
What I do remember though is that you can actually just pulse one leg and the other one just switches on every half cycle. Then there should only be switching noise on one leg.
collin80 wrote: Fri Jan 22, 2021 2:32 am Yeah, been there, gotten the T-Shirt. I too have caused meter glitches while measuring a noisy output from a test inverter. It's quite exciting. Filtering the output does seem to require a large amount of capacitance and inductance. And, joy of all joys, inductors for this use can be really big. I admit, it's kind of a black art to me. I wish I knew how to do it better.
Yes for 1 MW solar inverters that part literally weighed a ton. For our application Prius inductor should do :)

Now, early forum release:
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by Jack Bauer »

motor run caps are ideal for this sort of thing and quite cheap
I'm going to need a hacksaw
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by arber333 »

Mhm... :twisted: so if i would use "HV car battery" + "Prius gen3 inverter" + toroidal 3x common mode choke inductor + 3x foil caps = i would be able to boost 3x 400Vdc from the car?
How would i separate phases, by 120deg?

Where would i put N line at HV battery MINUS? That is actually important for household appliances. I bet we could use a 3phase toroidal transformer with 3x primary and 3x secondary wired in star.

I could use inductor like this: https://www.alibaba.com/product-detail/ ... 26452.html
Of course DIY wound :).

There is a possibility to use 3x single inductors from 10kW 3phase UPS stations if you can get your hands on them. They are Litz wire inductors usually 5kW capable each...
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

So, as most of you already knew: more filtering - more better.

I added a twin inductor that I found in the Nissan PDM (I think it was part of the boost stage) to the output path. And a 15u cap. Also kept the EMC filter. Immediately the voltage drops from 245 V to 210V (290 V on DC bus) denoting that we are pretty close to a clean sine wave (which would be 290/sqrt(2)=205 V).

I don't have the equipment to scope it but I bravely connected my old laptop to it and it ran just fine. Also ran a 2 kW hair dryer. That pulls 55A from my poor test pack and also runs well. It does reveal one weakness: Even though the bus voltage is kept pretty much constant, the AC voltage sags quite significantly to 180V AC.

One way to cure this would be measuring the AC voltage and controlling it, another would be measuring AC current and increasing bus voltage with current draw. Advantage of the latter: no extra hardware needed.
Attachments
IMG_20210123_184708.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by Jack Bauer »

If I'm remembering this most 230vac stuff is specced +10/-15% so dc current monitoring might just work. If we want to go doing crazy stuff like running single phase induction motors it might prove a problem I guess....
I'm going to need a hacksaw
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

I'm sure you will be the one to find this limit. Or Jon Volk :D
Of course you can set the AC voltage to 240V idle. I think my setup is also limiting performance. Boosting 40V to 300V isn't great to begin with and under load the batteries sag to 33 V. I see 1870W going in but only 1100W coming out. Just under 60% efficiency.
Attachments
udc_idc.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by collin80 »

johu wrote: Sat Jan 23, 2021 6:50 pm I'm sure you will be the one to find this limit. Or Jon Volk :D
Of course you can set the AC voltage to 240V idle. I think my setup is also limiting performance. Boosting 40V to 300V isn't great to begin with and under load the batteries sag to 33 V. I see 1870W going in but only 1100W coming out. Just under 60% efficiency.
60% isn't that bad though. In terms of "is it production ready?" well, no. But, getting 60% and having stuff work would suggest that you're getting close. Getting to super high efficiency would require calculating the proper L/C values and none of us has done that for this task. So, 60% with "what I had laying around" sounds pretty good to me. I have every confidence that calculating the proper values would increase efficiency. It's likely it could be pushed upward to something like 85-90%. Really, I'm very interested in your results and excited to hear that it seems to have worked.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

I think I will poke around some more. Will increase the input voltage and see what that does to efficiency.
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: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by johu »

So, played a bit more. I cleaned up the wiring, most of all removed the crocodile clips.
Bottom line: the higher the load, the lower the efficiency. That is probably down to the filtering inductance being too high?
Also the higher the input voltage, the better the efficiency. Best figure was 91.8% while making 422W AC. Couldn't test the full 2 kW because then my power supply overloaded.
Attachments
eff.png
eff.png (11.01 KiB) Viewed 7556 times
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: New use case: 230V AC from a few V DC

Post by ZooKeeper »

I had planned to use the VOLTswagen Squareback as a backup power source, now it can be a fully integrated one!

Fantastic!!!
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
slow67
Posts: 151
Joined: Thu Jan 30, 2020 6:52 pm
Location: Texas
Been thanked: 1 time

Re: New use case: 230V AC from a few V DC

Post by slow67 »

johu wrote: Tue Jan 26, 2021 3:18 pm So, played a bit more. I cleaned up the wiring, most of all removed the crocodile clips.
Bottom line: the higher the load, the lower the efficiency. That is probably down to the filtering inductance being too high?
Also the higher the input voltage, the better the efficiency. Best figure was 91.8% while making 422W AC. Couldn't test the full 2 kW because then my power supply overloaded.
The efficiency of the boost converter should be on the ORNL website. IIRC, the highest efficiency was when it didnt boost or buck.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: New use case: 230V AC from a few V DC

Post by EV_Builder »

If we want a proper sinus and the math done for us, wouldn't it be an idea to just hookup a UPS without batteries?

We then need to down convert to the lead batteries voltage and turn it on...

Not as fun though right?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
ianhora
Posts: 6
Joined: Fri Aug 12, 2022 11:51 pm
Location: Australia
Been thanked: 1 time

Re: New use case: 230V AC from a few V DC

Post by ianhora »

Hello Johannes,
Will your Prius Gen 2 controller board drive a Camry Hybrid AVV50R inverter?
Have you modified it to make 3-phase AC?
Where does one get the 3-phase neutral from (or the single phase neutral, for that matter)?
Thanks for a great set of videos.
Regards,
Ian
User avatar
Peter
Posts: 310
Joined: Fri Dec 14, 2018 9:07 pm
Location: North West Lancs, UK
Been thanked: 8 times

Re: New use case: 230V AC from a few V DC

Post by Peter »

Wow, do Costa go through all this technology just to make a coffee, no wonder its £3 a cup :-)
Post Reply