ACRouter — Open Source Solar Router Controller
Intelligent AC Power Router for Solar Energy Management
Features • Hardware • Quick Start • Modes • Docs • Contributing
What is ACRouter?
ACRouter is an open-source controller that automatically redirects excess solar energy to resistive loads (like water heaters) instead of exporting it to the grid. It helps you maximize self-consumption of your solar power and reduce electricity costs.
Why ACRouter?
| Problem | Solution |
|---|---|
| Excess solar energy exported to grid at low rates | Route it to heat water or other loads |
| Expensive battery storage systems | Use thermal storage (water heater) instead |
| Complex commercial solutions | Simple, open-source, DIY-friendly |
| Fixed on/off control wastes energy | Smooth phase-angle dimming for precise control |
Typical daily behavior of a grid-connected PV system with a water heater load.
| Parameter | Without ACRouter | With ACRouter |
|---|---|---|
| Daytime solar export | High | Low |
| Self-consumption ratio | ~40–50% | ~70–85% |
| Water heating source | Grid (evening/night) | Solar surplus (daytime) |
| Evening grid import | High | Reduced |
| Battery required | Yes (for storage) | No |
| Energy wasted/exported | Significant | Minimal |
| Grid interaction | Uncontrolled export | Controlled, grid-friendly |
| Overall energy cost | Higher | Lower - reduce 30% |
Features
⚡ Real-Time Power Monitoring
- AC voltage measurement (ZMPT107 sensor)
- Multi-channel current monitoring (up to 3× SCT-013/ACS-712 sensors)
- 12-bit ADC with DMA for high accuracy
- 200ms update cycle (5 updates/second)
🎛️ Intelligent Load Control
- Phase-angle AC dimming (0-100% smooth control)
- TRIAC-based, zero-cross synchronized
- Multiple operating modes for different scenarios
- Anti-flicker algorithms
📱 Easy Configuration
- Built-in WiFi Access Point for setup
- Modern web dashboard (Material UI)
- REST API for integration
- Serial console for advanced users
- All settings stored in non-volatile memory
🔌 Flexible Hardware
- Configurable GPIO pins via web interface
- Support for various sensor types
- Multiple dimmer channels
- Relay outputs for on/off loads
Web Dashboard
The web interface provides:
-
Real-time metrics — Voltage, current, power for all channels
-
Mode selection — One-click switching between modes
-
Manual control — Slider for direct dimmer control
-
WiFi settings — Network scanning and connection
-
Hardware config — GPIO pin assignment without reflashing

Serial console for advanced users
- Real-time metrics display
- Command line for hardware and device parameter configuration
- Operating mode selection

See 🗺️ Commands Complete guide for ACRouter serial terminal and REST API commands.
Hardware
Controller Board
ACRouter runs on ESP32-based development boards designed for AC power control.
| Component | Specification |
|---|---|
| MCU | ESP32-WROOM-32 / ESP32-WROVER |
| CPU | Dual-core 240 MHz |
| Flash | 4 MB minimum |
| WiFi | 802.11 b/g/n |
Sensors
| Sensor | Purpose | Link |
|---|---|---|
| ZMPT107+ Zero-Cross Detector | AC Voltage Measurement & AC waveform synchronization | Guide |
| SCT-013 | Current Transformer (current variation) | Guide |
| ACS-712 | Current Transformer (current variation) | Guide |
Dimmers & Control
| Module | Purpose | Link |
|---|---|---|
| AC Dimmer Module | Phase-angle power control | Guide |
💡 Note: ACRouter is designed to work with hardware from rbdimmer.com and any opens source DIY modules
Operating Modes
ACRouter supports 6 operating modes to cover different use cases:
| Mode | Description | Best For |
|---|---|---|
| OFF | System disabled, dimmer at 0% | Maintenance |
| AUTO | Automatic grid balance (P_grid → 0) | ⭐ Standard solar routing |
| ECO | Prevent export, allow import | No feed-in tariff |
| OFFGRID | Use only solar excess | Off-grid systems |
| MANUAL | Fixed dimmer level | Testing, night tariff |
| BOOST | Maximum power (100%) | Fast heating |
- AUTO and ECO modes are the primary solar routing modes used in grid-connected systems.
AUTO Mode — The Heart of Solar Routing
☀️ Solar: 3000W 🏠 House: 800W ⚡ Grid: -2200W (export!)
↓
ACRouter detects export
↓
Increases dimmer → heats water
↓
☀️ Solar: 3000W 🏠 House: 800W 🔥 Heater: 2200W ⚡ Grid: 0W ✓
Quick Start
1. Flash the Firmware
# Clone the repository
git clone https://github.com/robotdyn-dimmer/ACRouter.git
cd ACRouter
# Set up ESP-IDF environment
. $HOME/esp/esp-idf/export.sh
# Build and flash
idf.py set-target esp32
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
2. Connect to ACRouter
After flashing, the device creates a WiFi network:
| Setting | Value |
|---|---|
| SSID |
ACRouter_XXXXXX
|
| IP Address |
192.168.4.1
|
3. Configure via Web Interface
- Connect to the ACRouter WiFi network
- Open browser:
http://192.168.4.1 - Configure hardware GPIO pins
- Connect to your home WiFi
- Select AUTO mode and start saving energy!
Documentation on GitHub
| Document | Description |
|---|---|
| 📖 Application Overview | Complete documentation |
| 🔧 Hardware Reference | Pin assignments and specifications |
| ⚙️ Compilation Guide | Build instructions and troubleshooting |
| 📐 Architecture | Software modules and API |
| 🎮 Operating Modes | Detailed mode descriptions |
| 🗺️ Roadmap | Development plans |
REST API
ACRouter exposes a REST API for integration with home automation systems:
# Get current status
curl http://192.168.4.1/api/status
# Set mode to AUTO
curl -X POST http://192.168.4.1/api/mode -d '{"mode": 1}'
# Get power metrics
curl http://192.168.4.1/api/metrics
See API Documentation for full endpoint list.
What ACRouter Is Not
- Not a battery inverter
- Not a smart plug or relay controller
- Not a certified grid protection device
- Not suitable for inductive or electronic loads
Safety Notice
⚠️ WARNING: This project involves mains voltage (110V/230V AC)
- Installation must be performed by a qualified electrician
- Always use proper galvanic isolation
- Install appropriate circuit breakers and RCD/GFCI protection
- Only use with resistive loads (heating elements)
- Not suitable for motors, LEDs, or electronic devices
Contributing
We welcome contributions! Here's how you can help:
- 🐛 Report bugs — Open an issue with details
- 💡 Suggest features — Share your ideas in discussions
- 📝 Improve docs — Fix typos, add examples
- 🔧 Submit code — Fork, develop, and create a pull request
Community
- GitHub Issues — Bug reports and feature requests - https://github.com/robotdyn-dimmer/ACRouter/issues
- Discussions — Questions and community support https://github.com/robotdyn-dimmer/ACRouter/graphs/community
License
ACRouter is open-source software. See LICENSE for details.
Acknowledgments
- RBDimmer — Hardware platform and dimmer library LIBRARY
- ESP-IDF — Espressif IoT Development Framework
- ArduinoJson — JSON library for embedded systems
- Community — Contributors and testers
Made with ⚡ for the solar energy community