Hardware Configuration - Sensors Page
Overview
The Hardware Configuration page allows you to configure sensor connections for the RBgrid power measurement device. This page manages both required system sensors and additional measurement channels for comprehensive electrical monitoring.
Settings Edit Process
Activating Edit Mode
- Click the EDIT CONFIGURATION button to enter edit mode
- Configurable sensor fields will become editable
- Configure sensor parameters as needed
Saving Changes
- After configuration, click the SAVE button
- The system will prompt for a software reboot to apply new sensor configuration
- Options:
- Reboot now - immediately apply sensor configuration
- Postpone reboot - continue configuring other settings before rebooting
Sensor Categories
Required System Sensors (Non-configurable)
These sensors are essential for proper device operation and cannot be disabled or reconfigured.
Zero-Cross Sensor Required
- Function: Detects AC voltage zero-crossing points for phase synchronization
- Source Type: Fixed GPIO Sensor
- GPIO Pin: Digital input pin (default: GPIO 18)
- Status: Always enabled, non-configurable
- Purpose: Critical for accurate RMS calculations and phase angle measurements
Voltage Sensor Required
- Function: Primary voltage measurement for power calculations
- Source Type: Fixed to ADC Sensor
- GPIO Pin: Fixed to GPIO 35
- Sensor Type: Fixed to ZMPT107-1
- Status: Always enabled, non-configurable
- Purpose: Measures mains voltage for all power calculations
Additional Sensors (Configurable)
The device supports up to 3 additional sensor channels for current measurement or other electrical parameters.
Additional Sensor Configuration
Common Parameters for Each Sensor
enabled
- Type: Boolean
- Description: Enable/disable individual sensor channel
- Default:
false - Effect: Disabled sensors do not consume ADC resources or processing time
source
- Type: Enumeration
- Description: Data acquisition interface for the sensor
- Options:
ADC- Analog-to-Digital Converter (for analog sensors)I2C- Inter-Integrated Circuit bus (for digital sensors)SPI- Serial Peripheral Interface (for high-speed digital sensors)ESP-NOW- ESP32 wireless protocol (for remote wireless sensors)- Default:
ADC - Note: Each source type has specific GPIO requirements and configuration
gpio_pin
- Type: Number
- Description: GPIO pin number for sensor connection
- Available ADC pins:
- GPIO 32 (ADC1_CH4)
- GPIO 33 (ADC1_CH5)
- GPIO 34 (ADC1_CH6)
- GPIO 39 (ADC1_CH3)
- Restrictions: Cannot use GPIO 35 (reserved for voltage sensor)
sensor_type
- Type: Enumeration
- Description: Predefined sensor model/type
- Available Types:
Current Sensors (Split-Core)
- CURRENT_SCT013_5A - SCT-013 5A:1V transformer
- CURRENT_SCT013_10A - SCT-013 10A:1V transformer
- CURRENT_SCT013_15A - SCT-013 15A:1V transformer
- CURRENT_SCT013_20A - SCT-013 20A:1V transformer
- CURRENT_SCT013_30A - SCT-013 30A:1V transformer
- CURRENT_SCT013_50A - SCT-013 50A:1V transformer
- CURRENT_SCT013_100A - SCT-013 100A:1V transformer
Current Sensors (Hall Effect)
- CURRENT_ACS712_5A - ACS712 ±5A Hall sensor
- CURRENT_ACS712_20A - ACS712 ±20A Hall sensor
- CURRENT_ACS712_30A - ACS712 ±30A Hall sensor
Voltage Sensors
- VOLTAGE_ZMPT101B - ZMPT101B voltage transformer
- VOLTAGE_ZMPT107_1 - ZMPT107-1 voltage transformer
Custom Types
- CUSTOM_SENSOR - User-defined sensor parameters
sensor_name
- Type: String
- Description: User-friendly name for sensor identification
- Max Length: 32 characters
- Examples:
"Main Line CT","Solar Panel Current","Heat Pump Monitor" - Usage: Displayed in web interface, logs, and telemetry data
Sensor Source Types Details
ADC (Analog-to-Digital Converter)
- Use Case: Analog output sensors (CT transformers, voltage dividers)
- Sampling Rate: Up to 5kHz per channel
- Resolution: 12-bit (0-4095 values)
- Voltage Range: 0-3.3V
- Channels: Limited by available ADC pins
I2C
- Use Case: Digital sensors with I2C interface
- GPIO Pins: SDA (GPIO 21), SCL (GPIO 22)
- Speed: Standard (100kHz) or Fast (400kHz)
- Advantages: Multiple sensors on same bus
- Examples: INA219, INA226 power monitors
SPI
- Use Case: High-speed digital sensors
- GPIO Pins: MOSI, MISO, SCK, CS (configurable)
- Speed: Up to 80MHz
- Advantages: Fastest data transfer
- Examples: ADE7758, MCP3208 ADCs
ESP-NOW
- Use Case: Wireless remote sensors
- Range: Up to 250m (open space)
- Latency: <5ms typical
- Advantages: No WiFi infrastructure needed
- Configuration: Requires pairing with remote sensor nodes