XIAO ESP32-C6 PCB Design

I’ll set dedicated 3 A rules for the 5 V and ground paths, create a bottom-layer GND pour while preserving the XIAO antenna keepout, route the board, then iterate on DRC and remaining airwires.
The 3 A net rules and antenna-notched ground pour are in place, and the board passes routing preflight. I’m starting the full route now, then I’ll clean up any remaining connections or violations.
The final connections need short neckdowns at small pads; the original minimum widths were too restrictive. I’m preserving 2 mm preferred power trunks while allowing brief pad-entry neckdowns, then reconnecting the remaining points.
Configured and routed the two-layer PCB:
  • 3 A power rules with 2 mm preferred 5 V trunks
  • Short neckdowns permitted at small IC/passive pads
  • Bottom-layer GND pour with XIAO antenna keepout
  • All nine nets routed
  • Zero airwires, dangling traces, or blocking DRC issues
Suggested next steps:
  1. Review silkscreen and connector labels.
  2. Run a manufacturing-readiness check.
  3. Export Gerbers, BOM, and placement files.
Manufacturing readiness review
Generate manufacturing files
Create bring-up plan
Create firmware guide
U2
U3
R1
Resistance
330Ω
J1
J2
R4
Resistance
4.7kΩ
R2
Resistance
100kΩ
R3
Resistance
4.7kΩ
C4
Capacitance
1000uF
C5
Capacitance
100nF
C3
Capacitance
100nF
U1
C6
Capacitance
100nF

Refine this doc
Ask about this doc
Firmware Getting Started
PlatformIO
platformio.ini

Ini


[env:xiao_esp32c6]
platform = espressif32
board = seeed_xiao_esp32c6
framework = arduino
lib_deps = fastled/FastLED@^3.7.8
monitor_speed = 115200
src/main.cpp

Cpp


#include <Arduino.h>
#include <Wire.h>
#include <FastLED.h>

static constexpr uint8_t LED_PIN = D3;      // GPIO21
static constexpr uint8_t IMU_INT_PIN = D2;  // GPIO2
static constexpr uint8_t SDA_PIN = D4;      // GPIO22
static constexpr uint8_t SCL_PIN = D5;      // GPIO23
static constexpr uint8_t MPU_ADDR = 0x68;
static constexpr uint16_t NUM_LEDS = 40;
static constexpr uint8_t BRIGHTNESS = 96;   // Must remain current-limited
CRGB leds[NUM_LEDS];

uint8_t mpuRead8(uint8_t reg) {
  Wire.beginTransmission(MPU_ADDR);
  Wire.write(reg);
  if (Wire.endTransmission(false) != 0) return 0xFF;
  if (Wire.requestFrom(MPU_ADDR, (uint8_t)1) != 1) return 0xFF;
  return Wire.read();
}

bool mpuWrite8(uint8_t reg, uint8_t value) {
  Wire.beginTransmission(MPU_ADDR);
  Wire.write(reg);
  Wire.write(value);
  return Wire.endTransmission() == 0;
}

bool readAccel(int16_t &ax, int16_t &ay, int16_t &az) {
  Wire.beginTransmission(MPU_ADDR);
  Wire.write(0x3B); // ACCEL_XOUT_H
  if (Wire.endTransmission(false) != 0) return false;
  if (Wire.requestFrom(MPU_ADDR, (uint8_t)6) != 6) return false;
  ax = (int16_t)((Wire.read() << 8) | Wire.read());
  ay = (int16_t)((Wire.read() << 8) | Wire.read());
  az = (int16_t)((Wire.read() << 8) | Wire.read());
  return true;
}

void setup() {
  Serial.begin(115200);
  pinMode(IMU_INT_PIN, INPUT);
  Wire.begin(SDA_PIN, SCL_PIN);
  Wire.setClock(400000);

  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setBrightness(BRIGHTNESS);
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 2500); // LED budget only
  FastLED.clear(true);

  delay(100);
  const uint8_t who = mpuRead8(0x75); // WHO_AM_I, expected 0x68
  Serial.printf("MPU WHO_AM_I: 0x%02X\n", who);
  if (who == 0x68) {
    mpuWrite8(0x6B, 0x00); // PWR_MGMT_1: wake, internal clock
    mpuWrite8(0x1C, 0x00); // ACCEL_CONFIG: ±2 g
  }
}

void loop() {
  int16_t ax, ay, az;
  if (readAccel(ax, ay, az)) {
    Serial.printf("accel %d %d %d\n", ax, ay, az);
    uint8_t hue = (uint8_t)map(constrain(ax, -16384, 16384), -16384, 16384, 0, 255);
    fill_solid(leds, NUM_LEDS, CHSV(hue, 255, BRIGHTNESS));
    FastLED.show();
  }
  delay(50);
}
Final Pin Mapping

Table


FunctionXIAO pinESP32-C6 GPIONet
WS2812B dataD321LED_DATA_3V3_GPIO21_D3
MPU SDAD422I2C_SDA_GPIO22_D4
MPU SCLD523I2C_SCL_GPIO23_D5
MPU INTD22IMU_INT_GPIO2_D2
GPIO21/22/23/2 avoid the module's BOOT GPIO9 and exposed D0/GPIO0 boot-sensitive function. Startup order: serial → INT input → Wire → FastLED/current limit → WHO_AM_I → wake/configure MPU-6050.
  • PlatformIO

  • Final Pin Mapping

XIAO ESP32-C6 LED Controller

XIAO ESP32-C6 LED Controller thumbnail
5 V, 3 A WS2812B controller with XIAO ESP32-C6, MPU-6050 motion sensing, protected power input, and 5 V logic buffering.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$0.32–$0.39

Digi-Key

$5.38

HQonline

$0.13

LCSC

$0.23

Mouser

$5.87

TME

$0.21

Verical

$0.16–$78.58

Controls