English
English
简体中文
日本語

Unit AMeter ESPHome Component

The Unit AMeter component reads current measurement data over I2C.

1. Component Overview

Item Information
Product Name Unit AMeter
SKU U086
Main Function DC current measurement
Communication Interface I2C
Default I2C Address ADS1115: 0x48; EEPROM: 0x51
ESPHome Components ads1115, template
ESPHome Version Requirement /

2. Component Description

Including Official Components

Unit AMeter uses the official ESPHome ADS1115 sensor to read differential voltage, reads EEPROM calibration parameters through I2C Device, and converts the result to current using the Template sensor.

Unit AMeter configuration example:

  1. First configure the base ADS1115 component:
yaml
1 2 3 4 5 6 7 8 9 10 11
ads1115:
  - address: 0x48

sensor:
  - platform: ads1115
    multiplexer: "A0_A1"
    gain: 0.256
    sample_rate: 128
    name: "Unit AMeter A0_A1 Ref"
    id: diff
    update_interval: 10s
Notice
Unit AMeter uses only the AIN0 and AIN1 channels, so up to three multiplexer values can be used: "A0_A1", "A0_GND", and "A1_GND". For current measurement, only A0_A1 is used in the current calculation.
  1. Configure EEPROM calibration parameter reading and create a current entity with the Template Sensor. The following sensor entry must be merged into the same list as the preceding ADS1115 entry:
  1. When reading the EEPROM, update the EEPROM_REG address in the lambda expression according to the ADS1115 gain value:
c++
1 2 3 4
// In the lambda expression
// Update EEPROM_REG whenever gain is changed
// For example, when gain is 0.256
const uint8_t EEPROM_REG = 0xF8;
ADS1115 Gain EEPROM Data Register Max Input Current (theory)
6.144 0xD0 -
4.096 0xD8 -
2.048 0xE0 -
1.024 0xE8 -
0.512 0xF0 10 A
0.256 0xF8 5 A

The recommended gain value is 0.256, providing 0.3 mA resolution. Only one of AIN0 or AIN1 can be measured at a time; do not connect inputs to both channels.

Warning
The product is designed for a measurement range of ±4 V and includes a fuse. A current above 4 A triggers the fuse. Do not input current outside this range, and avoid operating with no load to prevent damage. The EEPROM (0x51) contains factory calibration parameters; do not write to the EEPROM, or the calibration data may be overwritten and measurements may become inaccurate.

3. Reference Example

After adding the component to the Dashboard, you can view sensor data in Home Assistant.

Page Tools
PDF
On This Page