diy solar

diy solar

How hard would it be to build my own ~350W UPS board?

krby

Solar Enthusiast
Joined
Nov 2, 2019
Messages
266
Location
SF Bay Area, CA
I've posted in other threads about a DIY UPS I have working. It's a collection of bought components (some I had on hand). It's an inverter, a charger, and a battery bank. Technically, this is an online double conversion architecture. The inverter is running full time. I've had this running since July, and recently added the "UPS monitoring over USB" functionality with an Arduino so my NAS is notified when AC mains goes away and will shut down gracefully (decreasing the load from 150W to about 55W).


Since this is a passion project, partially for fun, I'm now wondering about consolidating the converter/charger and inverter into a single "thing". An inverter/charger would be ideal, but it doesn't look like there is a big market for <1000W inverter chargers, or really anything that costs less than ~$900. This has me wondering how hard it would be to build a 350W (let's say 25-30A at 12V) UPS unit myself. What do I mean by "build a unit myself"? Anywhere from "design and get a PCB made" to "buy some components" (maybe the pure sine wave inverter, but things like the EGS002 board might make this ok to do myself ? and combine that with my own circuits and MCU and code.


To give some general background on my skillset (since I'm asking if this is "hard"):
  • Very experienced with coding in a variety of languages. Comfortable developing C or C++ on MCUs.
  • I've built a 4.8Kwh / 3000W output "Yetti/Goal Zero" equivalent with the help of these forums. here.
  • Self-taught/Amateur with electronics. I lack instincts like: "oh yea, you need a capacitor here to solve that problem." I know what the basic diode, resistor, MOSTFET, capacitor components are and what they do. Comfortable prototyping on a breadboard and prototyping PCB.
  • Comfortable with batteries and charging of a variety of chemistries. Understand the safety concerns around various battery types (spent a ton of time in the RC hobby with LiPos)
  • Comfortable soldering thru-hole. I've seen instructions for building a DIY SMD oven from a toaster oven. That seems totally within my ability.
  • Very comfortable with CAD and 3D printing, and...embarrassingly I use CAD software for some wood projects, it helps me map out clearances and see how things will fit in the real world space they have to go.
  • Comfortable with being safe working with 120V AC mains and DC up to 48V

I guess the hard requirements for the UPS are:
  • Use my existing two 12V 200Ah AGM batteries, but with code or settings changes, be able to handle other chemistries (looking at existing multi-chemistry chargers, this doesn't seem hard). I have these wired in parallel now, because I had a 12V inverter on hand already. If it makes things easier, I could wire in series. I'm fine with not worrying about balancing them. They're SLAs, there are only two and they spend nearly all of the time fully charged.
  • Ideally recharge the batteries from empty in no more than about 10hrs. So say 40A for a 12V configuration of 20A if I move to 24V.
  • 300W of AC output. More is fine. I currently end up with a spike of about 250W if everything boots at once. Average power ends up being 100-125W.
  • Pure sine wave inverter. I'm powering electronics in my home network rack with this. "modem", router, switch, NAS, etc.
  • Double conversion or standby UPS architecture is fine, but the transfer time has to be fast enough to keep the electronics running. I was using a consume APC UPS before this and that was fine.
  • Configurable/Controllable, and provide USB UPS monitoring to NUT. I've got the USB reporting working already. I assume I'll have an Ardunio-ish MCU and my own code to handle this. For simplicity, I'm start with hard coded settings for chemistry and various voltage and current settings for charge stages. Eventually, I would add a display and maybe an annoying 2-3 button menu interface.
 
Last edited:
I guess I should have said: The other option would be an already built "UPS head unit" type thing that could handle 12 or 24V, was configurable enough for various chemistries, and could handle the >300W AC output. I don't think anything like that exists. I wish it did. That feels like a Kickstarter project!
 
Last edited:
I'm "inverter curious" and have read all about the legendary Warpverter and other projects. My takeaway is that I don't think anyone would recommend building your own inverter for daily use as you describe, unless you were already an accomplished inverter wiz. Or maybe "build it but never run it unsupervised" is better advice?

I attached bigger SLA batteries to my 1500VA Cyberpower UPS and I get great runtimes from the ~10% load that it handles. Its built-in charger is pathetic though and it has no idea how to estimate runtime from a bigger battery. I keep thinking of ways to improve on this without breaking the bank but it's difficult. Seems like the next step up for a UPS is the smallest Growatt AIO (or similar). There is a 24V version and I believe they will function as a standby UPS for about $700 (supply your own battery, it supports multiple chemistries).
 
Convert your network gear to 12V DC.
Ya, that's a thing I've thought about. It's not as trivial as I'd like. I've got two groups of devices
- Things that take DC-in (via wall warts): ISP gateway, router
- Things that have multi-rail AC/DC: NAS and POE switch.

The first group is pretty easy. Just provide DC-DC converters for the needed voltage (probably 5, 9V, or 12V)

The second group is harder. the NAS is effectively a mini PC with a PC PSU providing 3.3, 5V, and 12V rails. I've used DC-DC ATX PSUs so I could probably figure out a way to get that to work with some serious surgery on the NAS case. I haven't investigated the switch at all, I just know it's a pretty standard 1U server rack form factor that takes AC in via a standard PC PSU cord (IEC C13/C14). I don't know what the PSU is doing inside the case, but I wouldn't be surprised if it offers a variety of DC voltages. Switching that over would be a very big project.

That solves my "single box" problem, but doesn't give man an excuse to see if I could build this myself. I guess without an inverter, I'd be building just my own DC charger.
 
Get a used APC UPS in the 1500W range. Lots of people sell for cheap because the lead-acid batteries go bad after like 3 years. These use 24V batteries. They have minimal idle draw. Then hook up as much battery as necessary. Then either plug into wall or if you still want double conversion, get a 120V AC -> 24V DC (adjustable) and set to 27.x depending on battery chemistry.

I have the SMT1500 and just stuck in 10 Ah 24V LiFePO4 battery (https://batteryhookup.com/products/...teries-tested-90-capacity-with-bms-k2b24v10eb). I don't have anywhere near 1500W load (just a 4 bay 1U NAS based on Xeon D - 80W, and a 48 port POE switch - 80W), but should definitely add another battery for less draw per battery.

Since I am using it as an actual UPS, it keeps the battery voltage at 27.3V.

Edit: alternatively, the Victron Phoenix inverter series are <$200 now and use 8-15W idle. Lots in the 200-1000W range, for 12/24/48V. Same idea, just with the inverter instead of the APC SMT.

Edit 2: these both assume you value your time relatively equally as money. If you have more time than money, a DIY setup would be fun. But both solutions I've mentioned above could get you going for $300 or less, excluding cells. Battery hookup is a great way to get cheap batteries. Lots of relatively ready-to-go options on there. Most only require chopping the wires and soldering/connecting/bolting your desired connectors.
 
Thanks for the reply!
To be clear, I am not asking: "Can you help me get to a bigger UPS?" I have something working based on a separate converter/charger and inverter. It's been running since July. I've posted about it in a few threads here. The batteries are sized to power the needed load for about 2.5 days. I even have the "UPS status over USB" bit working with an Arduino with some extra bits so my NAS or other devices can choose to shut down gracefully when the AC mains goes away.

I posted here in the Homebrew > Brainstorming subforum specifically asking about building my own thing more or less from scratch. I don't NEED to do this, I'm just interested if I can, and whether I can assemble parts of it from exiting modules (like the charger and inverter driver boards I have seen).
 
IMO the definition of DIY on this forum is a rather higher level of abstraction than what you’re looking for. Duplos vs Legos

I am also looking for the proper venue for where to dig deeper, and so will follow this thread to see if there are any suggestions.
 
IMO the definition of DIY on this forum is a rather higher level of abstraction than what you’re looking for. Duplos vs Legos

I am also looking for the proper venue for where to dig deeper, and so will follow this thread to see if there are any suggestions.
Heh. Agree. In fact the DIY (putting together lots of components, but not building your own PCB) is my current level of DIY when it comes to electronics. But, I guess I want to "dig deeper" as you say.

So, I guess I'll spew out notes here, but any suggestions or help is appreciated.

I've been doing some research on the principals of the various parts. I'm thinking about it like this:
* Conceptually, a battery charger is just an AC->DC PSU then DC-DC converter. I could buy modules that do some or all of this, or look at constructing it myself. The components of "AC->DC PSU" and "DC-DC converter" don't seem to difficult. I know working with 120VAC is dangerous. If/when I put this together, I'll be careful, ask advice and get this all checked by those I trust to know better.
* For the inverter side, it looks like there are popular inverter driver boards and lots of project that demonstrate how to build a full inverter around them.

I plan to start with just the charger side of things, initial goal is max of maybe 60VDC and 30A of output, but it feels like the biggest factor is what MOSFETS I can get my hands on easily.
 
Last edited:
* Conceptually, a battery charger is just an AC->DC PSU then DC-DC converter. I could buy modules that do some or all of this, or look at constructing it myself.

Check out the Chargenectifier thread. There are pointers to programmable power supply/chargers. They're intended for datacenters and telcos. If it's good enough for that kind of enterprise/carrier class work, it's good enough for you.

* For the inverter side, it looks like there are popular inverter driver boards and lots of project that demonstrate how to build a full inverter around them.
As I said, can't really help. But I did randomly find a very, very good full DIY (like, from transistors and step by step including design and implementation iteration) MPPT writeup on instructables. It is in the 500-750W class IIRC. So maybe there's other people like that.

If you want a super elegant design you would get one that has combined inverter/charger with shared power components. But I don't know if this is compatible with the goal of double conversion to minimize glitching.
 
Check out the Chargenectifier thread. There are pointers to programmable power supply/chargers. They're intended for datacenters and telcos. If it's good enough for that kind of enterprise/carrier class work, it's good enough for you.


As I said, can't really help. But I did randomly find a very, very good full DIY (like, from transistors and step by step including design and implementation iteration) MPPT writeup on instructables. It is in the 500-750W class IIRC. So maybe there's other people like that.

If you want a super elegant design you would get one that has combined inverter/charger with shared power components. But I don't know if this is compatible with the goal of double conversion to minimize glitching.
Thanks! I'll check those out. The varying duty cycle of MPPT feels similar to what is needed for switch mode power supplies. Double conversion isn't required, it's just what I did with external gear because it was easy. If I can find a component that act as a fast enough transfer switch (it's got to be <16ms because that's one cycle at 60Hz, right?) I could do that. This is not production critical gear. I don't need the best possible power conditioning, I would like it to stay up during an outage and I find the project of building this interesting.

Hmm, maybe this thread belongs in the "Danger Zone..." subforum.
 
Last edited:
The varying duty cycle of MPPT feels similar to what is needed for switch mode power supplies.
An MPPT IS generally an SMPS. It just has an extra control loop in it to hunt for the MPP / deal with a flaky power source that is a solar module. In fact they are available in buck and buck/boost topologies just like SMPS.
If I can find a component that act as a fast enough transfer switch (it's got to be <16ms because that's one cycle at 60Hz, right?) I could do that.
If you want to learn, you can try different ways of achieving this. The lowest transfer would be something that stays sync'd with grid at low power (and probably not operating in parallel, for legal-ness and ease of implementation). And then have a hair-trigger reaction to grid glitches to disconnect grid pretty aggressively, possibly allowing for momentary-parallel operation. Probably using an SSR vs a relay would allow the most deterministic switching.
 
Back
Top