Introduction
The ProtoCentral FDC1004 breakout board uses the Texas Instruments FDC1004 capacitance-to-digital converter to measure tiny changes in capacitance with femtofarad-level resolution. This makes it ideal for non-contact applications like proximity sensing, liquid level detection through tank walls, and touch interfaces — all without requiring direct contact with the target.
The board connects to any Arduino or ESP32 via I2C (just 4 wires), includes an onboard 3.3V regulator, and supports up to 4 independent capacitance measurement channels.
This guide walks you through connecting the board, installing the Arduino library, and taking your first capacitance reading.
Key Features
- Texas Instruments FDC1004 capacitance-to-digital converter
- 4 independent measurement channels (CIN1–CIN4)
- Measurement range: ±15 pF with up to 100 pF offset capacitance
- Resolution: 0.5 fF (femtofarads)
- Output data rate: up to 400 samples per second
- I2C interface (address: 0x50)
- Onboard 3.3V voltage regulator — connect directly to 5V Arduino boards
- Compact breakout with standard 2.54mm headers
What’s in the Box
- 1x ProtoCentral FDC1004 breakout board (assembled and tested)
- Header pins (if not pre-soldered)
You will also need an Arduino Uno (or compatible board), jumper wires, and a USB cable.
Pin Connections
FDC1004 Breakout to Arduino Uno
| FDC1004 Board Pin | Function | Arduino Uno Pin |
|---|---|---|
| SDA | I2C Data | A4 |
| SCL | I2C Clock | A5 |
| Vcc | Power (5V) | 5V |
| GND | Ground | GND |
Note: The FDC1004 breakout has an onboard 3.3V regulator, so you can safely connect Vcc to the Arduino’s 5V pin. The I2C pull-up resistors are included on the board.
Wiring Diagram
FDC1004 Breakout to ESP32
| FDC1004 Board Pin | Function | ESP32 Pin |
|---|---|---|
| SDA | I2C Data | GPIO 21 |
| SCL | I2C Clock | GPIO 22 |
| Vcc | Power (3.3V) | 3.3V |
| GND | Ground | GND |
Tip: The ESP32 has multiple I2C buses. The library supports selecting an alternate bus (e.g.,
Wire1) — see the Advanced Usage section below.
Capacitance Input Channels
The board exposes four capacitance input channels: CIN1, CIN2, CIN3, and CIN4. Each channel measures the capacitance between its input pin and ground. For a basic reading, connect your sensing element (a copper pad, wire, or probe) to CIN1.
Installing the Arduino Library
Option 1: Arduino Library Manager (Recommended)
- Open the Arduino IDE
- Go to Sketch → Include Library → Manage Libraries…
- In the search box, type “Protocentral FDC1004”
- Find “ProtoCentral FDC1004 Capacitive Sensor Library” and click Install
Option 2: Manual Installation from GitHub
- Go to github.com/Protocentral/ProtoCentral_fdc1004_breakout
- Click Code → Download ZIP
- In the Arduino IDE, go to Sketch → Include Library → Add .ZIP Library…
- Select the downloaded ZIP file
Your First Reading
Open the basic example from the library:
File → Examples → ProtoCentral FDC1004 → Measure Raw Capacitance
This example initializes the FDC1004 at 100 samples per second, reads channel 1, and outputs the raw capacitance value over serial.
#include <Wire.h>
#include <Protocentral_FDC1004.h>
FDC1004 sensor(FDC1004_RATE_100HZ);
#define CHANNEL 0 // CIN1 (channels are 0-indexed: 0=CIN1, 1=CIN2, etc.)
void setup() {
Serial.begin(115200);
while (!Serial);
Wire.begin();
sensor.begin();
Serial.println("ProtoCentral FDC1004 - Capacitance Measurement");
Serial.println("-----------------------------------------------");
}
void loop() {
// Configure measurement on channel 0 (CIN1) vs CAPDAC
sensor.configureMeasurementSingle(FDC1004_MEAS1, CHANNEL, FDC1004_CAPDAC);
// Trigger a single measurement
sensor.triggerSingleMeasurement(FDC1004_MEAS1, FDC1004_RATE_100HZ);
delay(15); // Wait for conversion to complete
// Read the result
uint16_t value[2];
if (sensor.readMeasurement(FDC1004_MEAS1, value) == 0) {
// Convert raw value to capacitance in pF
int32_t capacitance = ((int32_t)(int16_t)value[0]) << 8;
capacitance |= (value[1] >> 8);
float capPf = (float)capacitance / 524288.0; // Convert to pF
Serial.print("Capacitance: ");
Serial.print(capPf, 3);
Serial.println(" pF");
}
delay(200);
}
What to Expect
After uploading the sketch and opening the Serial Monitor at 115200 baud, you should see output like:
ProtoCentral FDC1004 - Capacitance Measurement
-----------------------------------------------
Capacitance: 0.234 pF
Capacitance: 0.231 pF
Capacitance: 0.228 pF
With nothing connected to CIN1, you will see a small baseline capacitance from the PCB traces. Bring your finger close to the CIN1 pin (without touching it) and you should see the value increase — this is proximity detection in action.
Advanced: Using Multiple I2C Buses
On boards with multiple I2C ports (ESP32, Arduino Mega), you can specify an alternate bus:
// Use Wire1 instead of Wire
FDC1004 sensor(&Wire1, FDC1004_RATE_100HZ);
void setup() {
Wire1.begin(25, 26); // SDA=GPIO25, SCL=GPIO26 on ESP32
sensor.begin();
}
Troubleshooting
No readings / I2C device not found
- Double-check SDA and SCL wiring (these are the most common mistake)
- Verify Vcc is connected to 5V (Arduino) or 3.3V (ESP32) and GND to GND
- Run an I2C scanner sketch — the FDC1004 should appear at address 0x50
- If using an ESP32 with custom pins, make sure
Wire.begin(SDA_PIN, SCL_PIN)matches your wiring
Readings are stuck at zero
- Ensure you are calling
triggerSingleMeasurement()beforereadMeasurement() - Check that the delay between trigger and read is at least 15ms
- Verify the channel number matches where your sensing element is connected (channels are 0-indexed)
Readings are very noisy
- Keep wires short between the board and sensing element
- Shield the sensing wire if possible (connect shield to GND)
- Increase the averaging by taking multiple readings and computing the mean
- Ensure the sensing element is not physically vibrating
Readings are saturated (stuck at max)
- The capacitance on the channel may exceed the ±15 pF measurement range
- Reduce the area of your sensing element or increase the distance to the target
- Check for a short circuit on the capacitance input pins
Resources
License
- Hardware: Creative Commons Share-alike 4.0 International (CC BY-SA 4.0)
- Software / Library: MIT License
- Documentation: Creative Commons Share-alike 4.0 International (CC BY-SA 4.0)

