Split-Brain Microcontrollers: Why One Chip Isn't Enough for Power Control
Saurab Thakur When building a smart home gadget, the temptation is always to use a single, powerful microcontroller to do absolutely everything. You buy a $5 ESP32 chip, connect it to your Wi-Fi, wire it up to your relays, and call it a day.
For a smart lightbulb, that works perfectly. But a UPS Supervisor is not a lightbulb. It is the life-support system for thousands of dollars of server equipment. If the UPS crashes because your router restarted, your servers die.
To solve this, the UPS Supervisor V2.0 uses a radically different approach: the Split-Brain Architecture.
The Problem With “Doing It All”
Microcontrollers are essentially tiny computers. When a single microcontroller tries to serve a web dashboard, talk to a cloud database (like Firebase), read battery voltages, and control physical power relays all at once, it has to juggle.
Imagine a chef trying to cook a steak while simultaneously answering the phone and taking orders at the drive-thru. If the phone call is particularly complicated (like a secure Wi-Fi encryption handshake), the chef has to stop watching the steak.
If the power goes out at the exact moment the microcontroller is busy negotiating an SSL certificate with Google’s servers, the microcontroller might “miss” the power outage for a few crucial seconds. Or worse, the Wi-Fi drops, the chip panics, and it reboots, dropping power to your entire server rack.
We cannot have our power delivery system fail just because the internet is slow.
The Solution: Meet the Brain and the Brawn
To guarantee rock-solid reliability, we split the chef’s jobs into two completely separate microcontrollers. We call them The Brain and The Brawn.
The Brawn: Pure Muscle
The Brawn is an ESP-WROOM-32 chip whose only job is to watch the power and flip the switches.
- It has no Wi-Fi connection. It doesn’t even know what the internet is.
- It never serves a webpage.
- Because it has no network distractions, it runs its hardware checks thousands of times per second with terrifying precision.
If the voltage drops by a fraction of a volt, the Brawn sees it instantly. If you press a physical emergency shutdown button on the front of the rack, the Brawn reacts in microseconds. It is the ultimate, fail-proof guardian of your electricity.
The Brain: The Manager
The Brain is a much more powerful ESP32-S3 chip packed with extra memory. Its job is to handle all the complicated, distracting tasks.
- It connects to your Wi-Fi network.
- It hosts the beautiful, glowing web dashboard you access from your phone.
- It talks to Cloudflare, Firebase, and Sinric Pro.
- It sends Wake-On-LAN “magic packets” to turn on your PC.
The Brain does all the heavy thinking, but it has zero direct control over the actual power relays.
The Data Bridge: How They Talk
So, how do they work together? Through a dedicated, physical “data bridge” called a UART connection.
It works like two people talking through a walkie-talkie. The Brawn constantly reports the status of the batteries over the wire: “Battery is at 13.5 Volts. The grid is online.”
The Brain listens to this data, updates the glowing dashboard on your phone, and makes high-level decisions. If you click “Turn on the Speakers” on your phone, the Brain sends a message over the wire: “Hey Brawn, pulse the speaker relay.”
The Brawn hears the command and flawlessly executes the physical action.
Why This Changes Everything
This split-brain design creates a system that is incredibly resilient.
If your Wi-Fi router catches fire, the Brain loses its connection and the dashboard goes offline. But the Brawn? The Brawn doesn’t care. It keeps happily monitoring the batteries and routing power to your servers as if nothing happened.
If the Brain’s software crashes and it needs to reboot, the power stays on. The Brawn simply holds the fort until the Brain wakes back up and says hello over the walkie-talkie.
By physically separating the chaotic, unpredictable world of the internet from the mission-critical job of electrical switching, the UPS Supervisor achieves enterprise-level reliability on a DIY budget.
Next Steps: Now that you know the hardware secret, let’s look at the software! Discover how the Brain serves an entire, app-like Web Dashboard right from your local network.
Related Articles
From this Series
- 36 Ways to Control Your Homelab: Exploring the UPS Supervisor Dashboard
- Automated Power-Downs: How to Save Your NAS During a Power Outage
- Multithreading on a $5 Chip: How Edge Devices Connect to the Cloud
- Under the Hood: The Physical Wiring of the UPS Supervisor
- How a Custom DIY UPS Solves the Biggest Homelab Headaches
- The Ultimate Smart Dashboard: Taking Full Control of Your Home Server Rack
- Zero-Trust Homelab Security: Unlocking Encrypted Drives with Cloudflare and an ESP32