Projects / I²C extender

30 m Remote Sensor over Network Cable

Put a Qwiic sensor at the far end of the garden, roof or warehouse — up to 30 m away.

Beginner⏱ 1 hour4 ElectroTrical boards

Overview

Normal I²C stops working after a metre or two. The ET-C19 converts I²C into a differential signal that runs up to about 30 m over ordinary CAT5/CAT6 network cable, then a second ET-C19 converts it back. To the software, the remote sensors look like they're plugged in next to the controller.

This build puts an ET-S70 temperature/humidity sensor and an ET-S62 barometer at the far end — for example on a roof, in a greenhouse or in a cold room — while the ET-M02 stays indoors with power and Wi-Fi.

  • Up to ~30 m over CAT5/CAT6
  • Power for the remote sensors travels on the same cable
  • Standard I²C code — no special library
  • Temperature, humidity and pressure at the far end

What you need

ElectroTrical boards

ET-C19 × 2Differential I²C ExtenderOne at each end of the cable
Coming soon
ET-M02ESP32-S3 Dev BoardController, indoors
Coming soon
ET-S70SHTC3 Temperature + Humidity SensorRemote temperature and humidity
Coming soon
ET-S62BMP280 BarometerRemote pressure
Coming soon

You'll also need

  • CAT5e or CAT6 cable up to 30 m (cut one end, or use a patch cable and bare the wires)
  • 3 Qwiic cables
  • Weatherproof box for the remote end

Wiring

Keep each + / − signal on the two wires of one twisted pair — that's what makes the long run work. Doubling up the power and ground wires reduces voltage drop. Addresses: SHTC3 0x70, BMP280 0x77.

Controller end

FromToNote
ET-M02 QwiicET-C19 (A) Qwiic

Cable: ET-C19 (A) ↔ ET-C19 (B), wire 1:1

FromToNote
J4 DSCL+J4 DSCL+Pair 1 (orange)
J4 DSCL−J4 DSCL−Pair 1 (orange-white)
J5 DSDA+J5 DSDA+Pair 2 (green)
J5 DSDA−J5 DSDA−Pair 2 (green-white)
J4 VINJ4 VINPair 3 (blue + blue-white together)
J5 GNDJ5 GNDPair 4 (brown + brown-white together)

Remote end

FromToNote
ET-C19 (B) QwiicET-S70 Qwiic
ET-S70 QwiicET-S62 Qwiic

Build it

  1. 01

    Test on the bench

    Connect both ET-C19 boards with a short cable first and confirm both sensors are found. It's much easier to fix wiring on the desk.

  2. 02

    Set up the Arduino IDE

    Install the Espressif ESP32 package, select “ESP32S3 Dev Module” and set USB CDC On Boot to Enabled. Install the libraries listed above the sketch.

  3. 03

    Run the long cable

    Terminate the network cable into J4 and J5 at both ends exactly the same way, following the colours in the table.

  4. 04

    Slow the bus

    The sketch runs I²C at 100 kHz. On runs longer than 20 m, if readings drop out, lower it to 50 kHz.

  5. 05

    Protect the remote end

    Put the remote boards in a vented, shaded box. Keep the cable away from mains cables where possible.

Arduino code

Written for the ET-M02 ESP32-S3 Dev Board. Install these libraries from the Arduino Library Manager:

  • Adafruit SHTC3 Library
  • Adafruit BMP280 Library
remote_sensor.ino
#include <Wire.h>
#include <Adafruit_SHTC3.h>
#include <Adafruit_BMP280.h>

Adafruit_SHTC3 shtc3;
Adafruit_BMP280 bmp;
bool shtOk = false, bmpOk = false;

void connectSensors() {
  shtOk = shtc3.begin();
  bmpOk = bmp.begin(0x77);
  if (bmpOk) bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, Adafruit_BMP280::SAMPLING_X2,
                             Adafruit_BMP280::SAMPLING_X16, Adafruit_BMP280::FILTER_X16,
                             Adafruit_BMP280::STANDBY_MS_500);
  Serial.printf("SHTC3 %s, BMP280 %s\n", shtOk ? "found" : "MISSING", bmpOk ? "found" : "MISSING");
}

void setup() {
  Serial.begin(115200);
  Wire.begin(8, 9);
  Wire.setClock(100000);                 // long cable: keep the bus slow
  Wire.setTimeOut(50);
  connectSensors();
}

void loop() {
  if (!shtOk || !bmpOk) { delay(5000); connectSensors(); return; }   // retry if the cable was unplugged

  sensors_event_t hum, temp;
  shtc3.getEvent(&hum, &temp);
  float hPa = bmp.readPressure() / 100.0;

  Serial.printf("Remote: %.1f C | %.0f %%RH | %.1f hPa\n", temp.temperature, hum.relative_humidity, hPa);
  delay(5000);
}

Troubleshooting

Sensors missing at the remote end

Check the cable is wired identically at both ends and each + / − pair is on one twisted pair. Test with a short cable to rule out the boards.

Works on short cable, fails on long

Lower the bus speed to 50 kHz, and double up VIN and GND wires to reduce voltage drop.

Readings freeze occasionally

Long cables pick up noise. The sketch's Wire timeout stops it hanging; keep the cable away from mains and motor cables.

Take it further

  • Serve the readings on a Wi-Fi page from the ET-M02
  • Add the ET-S10 soil probe at the far end for a greenhouse
  • Use the ET-A02 I²C multiplexer for several remote sensors with the same address

Turning this into a product?

We design custom boards that combine these sensors on one PCB, with firmware and production.