Hardware Connection
Overview of RBgrid Sensors Connection
RBgrid sensors and modules are a ready-to-use solution for measuring electrical power using the ESP32 microcontroller.
Main Components
Main Measurement Components
- Microcontroller: ESP32-WROOM-32 or ESP32-WROVER-32 (dual-core, 240 MHz)
- Zero-Cross and Voltage Sensor: zero-crossing and voltage sensor with galvanic isolation from AC mains
- Current Sensors:
- ACS-712 contact sensor with high measurement quality
- SCT-013 current transformer, contactless. Adapter for sensor connection
- Storage memory: memory module for storing settings, statistics data and economics for long-term periods
Connection Diagram
Zero-Cross and Voltage Sensor: Connection to Electrical Grid
ZC&VAC sensor → ESP32
─────────────────────────────────────
GND → GND
VCC → 3.3V
Vsen → GPIO35
ZC → GPIO18
- Perform all work with the voltage disconnected
- Use insulated tools
- Check for absence of voltage with an indicator
Connecting SCT-013 Current Sensors
- Installation on wire:
- Open the SCT-013 sensor clamp
- Clamp ONLY the phase wire (L)
- The arrow on the sensor should point towards the load
-
Close the clamp until it clicks
-
Connection to controller:
SCT-013 sensor adapter → ESP32
─────────────────────────────────────
GND → GND
VCC → 3.3V
SIG → GPIO32/33/34/36/37/38/39
Connecting Additional ACS712 Sensors
To connect ACS712 sensors, use these GPIO32/33/34/36/37/38/39 pins:
ACS712 Module → ESP32
─────────────────────────────────────
GND → GND
VCC → 5V pin
OUT → GPIO32/33/34/36/37/38/39 (available ADC1 pins)
Connecting Memory Storage
For the memory storage module, use the SPI bus:
Memory Module → ESP32
─────────────────────────────────────
GND → GND
VCC → 3.3V
CLK → GPIO14
MISO → GPIO12
MOSI → GPIO13
CS → GPIO15
but you can connect to VSPI and change the settings in the WEB App
Controller Power Supply
Basic Requirements
- Voltage: 3.3V DC
- Current: minimum 500mA (1A recommended)
- Stability: ±1% for accurate measurements
Unstable or noisy power will lead to:
- Inaccurate measurements (reading drift)
- False Zero-Cross triggers
- Controller resets
Use linear regulators or quality switching power supplies with filtering.
First Power-On
Pre-Power Checklist
Common Issues and Solutions
| Problem | Possible Cause | Solution |
|---|---|---|
| No voltage readings | Phase not connected to ZMPT107-1 | Check L and N connection |
| Zero current readings | Sensor on neutral wire | Move to phase wire |
| Unstable readings | Poor controller power supply | Use stabilized PSU |
| Negative power | Current sensor reversed | Rotate sensor 180° |
| No Serial communication | Wrong port speed | Set 115200 baud |
Safety Measures
- Always disconnect power before changing connections
- Use RCD for additional protection
- Do not work with electricity alone
- When in doubt, consult a qualified electrician
Recommended Safety Equipment
- Insulated tools (screwdrivers, pliers)
- Voltage indicator (tester)
- Dielectric gloves
- Safety glasses
- Rubber mat
Conclusion
RBgrid provides everything necessary to build an electrical energy monitoring system. Built-in components and connectors simplify connection, while exposed GPIO pins allow functionality expansion as needed.