SEN0291 Gravity I2C Wattmeter not answering on I2C at any address (XIAO ESP32-C3)

Hi all,

I have a DFRobot SEN0291 Gravity I2C Digital Wattmeter (INA219, R010 shunt) that never answers on the I2C bus. I emailed DFRobot tech support on 19/11 but haven’t heard back, so I’m hoping someone here has seen this.

Setup

  • Host: Seeed Studio XIAO ESP32-C3, ESP32 Arduino core 3.3.13
  • SDA = GPIO6 (D4), SCL = GPIO7 (D5)
  • Module powered from the XIAO’s 3.3 V pin, common ground
  • Supplied Gravity lead: D → SDA, C → SCL, − → GND, + → 3.3 V
  • Current path: 12 V → IN+, IN− → 12 V motorised valve (~100 mA). Middle GND screw terminal not connected (12 V negative is already common with the XIAO ground)

Symptom

  • No ACK at 0x40, 0x41, 0x44 or 0x45
  • Full scan of 0x08–0x77 finds nothing
  • SDA and SCL both sit high at idle
  • The valve still runs normally through the shunt

Checks done

  • 3.26 V between VCC and GND measured at the module’s own 4-pin header
  • Continuity from XIAO D4 → module SDA and D5 → module SCL (header pins), no cross-connection
  • SDA/SCL swapped: no change
  • Both address DIP switches fully seated
  • Two different I2C drivers: a software (bit-banged) I2C at ~100 kHz and ~40 kHz, and the standard Arduino Wire library (hardware I2C, 100 kHz). Wire.begin() succeeds; endTransmission() to 0x45 returns 2 (address NACK); full scan finds no devices

Questions

  1. Is there anything about running it at 3.3 V, or leaving the GND screw terminal unconnected, that would stop the INA219 answering?
  2. What pull-ups are fitted on SDA/SCL, and what address does it ship with?
  3. Anything else worth checking before I treat it as a faulty unit?

Photos of the module and wiring attached.

Thanks,
Matt

Hi Matthew
Welcome
Photo of the wiring does not mean much. A schematic or drawing of the wiring would be a lot better.
Accurate please.
Cheers Bob

Hi Bob,

Thanks for the welcome and the advice. Schematic attached. Nets with the same label are connected (● = WAGO splice).

A few points that aren’t obvious from the drawing:

  • The SEN0291’s middle GND screw terminal is not connected. The module’s ground comes through the Gravity lead (− to the common 0V), and continuity from the 12 V adaptor negative to the XIAO GND is confirmed.
  • The XIAO’s 3V3 pin feeds both the SEN0291 and the relay module. With the relay idle, I measure 3.26 V at the SEN0291’s own header (VCC–GND).
  • SDA and SCL run on female jumpers to D4 (GPIO6) and D5 (GPIO7). Continuity from those pins to the module header’s SDA and SCL is confirmed, with no cross-connection. Swapping SDA and SCL made no difference.
  • Both lines idle high. No ACK at 0x40, 0x41, 0x44 or 0x45, and a full scan of 0x08–0x77 finds nothing. That’s with a bit-banged I2C at ~100 kHz and ~40 kHz, and with the standard Wire library at 100 kHz (endTransmission() to 0x45 returns 2, address NACK).
  • Valve current flows normally through IN+ → IN−, so the shunt path itself is fine.

Is there anything in the wiring you’d change, or anything else worth checking before I treat the module as faulty?

Cheers,
Matt

Hi Matthew
Maybe your I2C connections are wrong
I just copied this from somewhere


You might note the SDA/SCL ports on this pin out are GPIO8 and GPIO9. You indicate ports GPIO8 and GPIO7.

Could be your problem.
Cheers Bob

Hi Bob,

Thanks for looking. I think that pinout is for a different ESP32-C3 board (e.g. the ESP32-C3 SuperMini, which uses GPIO8/GPIO9 for I2C). On the Seeed XIAO ESP32-C3 the I2C pins are:

- D4 = GPIO6 = SDA

- D5 = GPIO7 = SCL

That’s per Seeed’s pinout and the ESP32 Arduino core’s XIAO_ESP32C3 variant file (`SDA = 6`, `SCL = 7`). On the XIAO, GPIO8 is D8 (SCK) and GPIO9 is D9, which is also the BOOT strapping pin. (My schematic has GPIO6 and GPIO7, not GPIO8.)

Both the bit-banged I2C and `Wire.begin(6, 7, 100000)` are told to use GPIO6/GPIO7 explicitly, and I’ve confirmed continuity from XIAO D4 → module SDA and D5 → module SCL.

Was your image for the XIAO? If you know of a XIAO-specific gotcha I’d be glad to hear it.

Cheers,

Matt

Hi Matthew

You are right. My old eyesight played its usual tricks. Sorry

Well that is standardisation at its finest isn’t it. As for the particular variant I have no idea. I just searched "ESP32-C3 pinout"and that is what I got.

Leaving the I2C for the moment.
I have not looked closely at the DfRobot SEN0291 connection requirements but the thing that stands out is if the device is reporting Volt, Current and Power it needs to measure Volt and current. To measure Voltage it will need a ground connection which you have not connected.
I could be wrong here but I don’t see how you can measure Volt without this connection. When I get time I will look more closely at this as something does not look quite right with that whole section.
Cheers Bob

Hi Bob,

No worries at all, and thanks for sticking with it.

Good point on the voltage measurement. My understanding is that the INA219 measures bus voltage at IN− relative to its own GND pin, and on the SEN0291 the middle GND screw and the Gravity “−” pin are the same board ground. Since “−” goes to the common 0V (continuity to the 12 V negative confirmed), the chip should already have its reference. I’ll confirm with a continuity check from the middle GND screw to the header GND and to the 12 V negative, and I’m happy to add a wire to that screw anyway.

The bit that puzzles me is that the chip should still ACK its I2C address with nothing on the screw terminals at all, since it’s powered from VCC/GND on the I2C side. It’s not answering at any address, so I’m leaning towards a faulty module, but I’d value your view when you have time to look.

Cheers,
Matt

Hey Matthew,

Welcome to the forums!

One thing I notice in your photos is that there are a few unsoldered pins on the Xiao.

Have all of the pins with active connections been soldered to the board itself? It seems a bit silly to ask, but it wouldn’t be the first time we have seen that cause issues in projects.

Cheers,
Blayden

Hi Matthew
Referring to your SEN0291.
Don’t bother with continuity checks. Connect the Ground terminal to 12V ground. Continuity measurements could read OK as the sensing resistor is only 10mΩ which you might not see with a casual continuity check.
All your connections look OK except for this ground.

Back to I2C.
All the example circuits on the product page connect VCC to 5V. The text says VCC can be 3.3 to 5V. Now this is not from a DfRobot page (Core) and I have not checked. Maybe it does not like 3.3V.

I just had a look at the SEN0291 schematic. It has an on board 3.3V regulator and the I2C works at that voltage so forget about level converters. Even so that converter might produce 3.3V out with 3.3V in. I don’t know and have not looked at a data sheet but it would not hurt to connect VCC to 5V and give it something to do.

That ground terminal connection should be connected to battery / supply and load ground as you don’t want any larger currents finding their way via the IC or you could get all sorts of things happen
Cheers Bob

Hi Bob,

That’s a great catch, thank you. I’d missed the on-board 3.3 V regulator. With 3.3 V going into it, the INA219 is probably getting well under 3.3 V, possibly below its 3.0 V minimum, which would explain it not answering at all.

I’ll move the module’s VCC to 5 V (the XIAO’s 5V pin) so the regulator has some headroom. Then connect the middle GND terminal to the 12 V supply ground, as you suggested. I’ll then go about reconnecting SDA/SCL to the XIAO, check they sit at about 3.3 V on the module side with VCC at 5 V, since the ESP32-C3 pins aren’t 5 V tolerant.

I’ll report back once it’s done.

Cheers,
Matt