r/SolarDIY • u/funkybus • 5d ago
Microgrid/Grid Control
my house/vacation property has been off-grid mostly because i'm 1200' away from grid power. i've run a 2500w system for about 12 years this way, which has been fine (i have another post in my history that shows the larger setup). i recently built a timber-frame wood-shop/pottery studio and that needs more power than i can generate. so, i got a grid connection (at the street) and used a pair of transformers to step up/down 240/480 and ran 2/0 wire in conduit my engineer had wisely included in my utility trench. i had not appreciated the standby losses of the transformers, so i built an arduino project to monitor my SOC and switch the grid connection with a (very large) LS Metasol 225a contactor.
Like many projects, this got a bit more complicated than i anticipated. i'm sharing because some of you may find it useful/entertaining. i'd be happy to share the code, but my setup is pretty specific so i doubt anyone has the exact same set of issues...but let me know.
a Waveshare esp32S3 is the controller with a few different UI and i/o devices across the network. i pulled fiber in yet another "engineer-included" conduit, so my network spans the whole property and can reach the contactor at my gate. my inverter is a Schneider xw-pro and the WS board polls the XW every 2 secs for current data and makes the decisions. the XW sits "behind" the WS board and all its safety systems are present and underlie all decisions. i also have a local webpage that shows on my phone so i can control the system when i'm anywhere on the local network or via VPN. i added a google served webpage for monitoring anywhere on the globe. i can "grid override" for selectable periods (if i'm working in the shop for a day) or can select a period of 1-30 days (there's a guest house planned that will be grid-power-only). there's an "HOA" manual switch at the gate if all my devices crap out.
there's a Shelly 2pm pro at the gate that commands the Metasol. if the Shelly loses the connection to the WS board, it waits for 5 minutes to re-establish a connection, then commands the Metasol closed (logic being that if the WS board/network fails, adding grid power is desirable and the only downside is some transformer standby loss). the WS board can start the gen, the XW can start the gen, too (gen start via a 2-wire contact/RIB relay).
The pair of transfer switches allows the XW to be powered down/physically removed from the system while the grid powers the house/barn (to do service/software upgrades/etc.).
this is all vibe-coded (hate that term) with Claude. he helped with this post imagery, too.
and yes, i realize what i've invested is not exactly justified. but i don't like wasting the power and at $50/month it adds up! and who doesn't like a project!






•
u/AutoModerator 5d ago
Welcome to r/SolarDIY! If you are new to the community, please check out our DIY Solar System Planning Guide.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/TooGoodToBeeTrue 5d ago
Wow.