Getting Started

Getting Started with the ProtoCentral AS6221 Wearable Body Temperature Sensor

Last updated Jun 26, 2026

Getting Started with the ProtoCentral AS6221 Wearable Body Temperature Sensor

Introduction

The ProtoCentral AS6221 Wearable Body Temperature Sensor is a high-accuracy, digital body-temperature breakout built on the ams OSRAM AS6221. It’s designed for human body-temperature measurement in a wearable form factor: the IC is factory-calibrated to ±0.09 °C in the body-temperature band, and its 16-bit ADC resolves changes as small as 0.0078 °C. The digital I²C interface keeps host wiring simple — no ADC needed on your microcontroller.

This is a higher-accuracy, lower-voltage successor to our MAX30205 Wearable Body Thermometer. It ships as a sensor probe on a flexible cable terminating in a QWIIC connector, so you can plug straight into any Qwiic / STEMMA QT host.

Note: This board is intended for research and development purposes only. It is not FDA, CE, or FCC approved for consumer or medical use.

Important — 3.3 V part: Unlike the MAX30205, the AS6221 is not 5 V-tolerant. It operates from 1.7 – 3.6 V. Power and signal it at 3.3 V — do not connect it directly to a classic 5 V Arduino Uno’s logic without a level shifter / Qwiic adapter that supplies 3.3 V.

Key Features

  • ams OSRAM AS6221 digital temperature sensor — factory-calibrated to ±0.09 °C in the body-temperature band
  • 16-bit resolution — 0.0078125 °C per LSB
  • Digital I²C interface — no ADC required on the host MCU
  • Low operating voltage — 1.7 – 3.6 V (3.3 V typical)
  • 8 selectable I²C addresses — 0x48 – 0x4F (default 0x48) for multi-sensor setups
  • Wearable form factor — sensor probe on a flexible cable for direct skin contact
  • Plug-and-play QWIIC — connect to any Qwiic / STEMMA QT board with a Qwiic cable, no soldering

What’s in the Box

  • 1× AS6221 wearable temperature sensor probe on a flexible cable, terminating in a 4-pin JST SH (Qwiic) connector

You will also need a 3.3 V host with I²C — ideally one with a Qwiic / STEMMA QT socket (Arduino Uno R4, ESP32 dev boards with Qwiic, Raspberry Pi Pico, Adafruit Feather, etc.) — or a classic Uno fitted with a Qwiic shield (see Option C). A standard Qwiic / STEMMA QT cable is needed to connect to the host.

Specifications

Parameter Value
Sensor IC ams OSRAM AS6221
Accuracy ±0.09 °C (body-temperature band)
Resolution 16-bit (0.0078125 °C per LSB)
Interface I²C (2-wire), 100 / 400 kHz
I²C Addresses 0x48 – 0x4F (8 selectable, default 0x48)
Supply Voltage 1.7 – 3.6 V (not 5 V-tolerant)
Connector Qwiic / STEMMA QT (4-pin JST SH)
Cable Flexible

Pin Connections

The AS6221 board has only a QWIIC connector — there are no header pins to solder. The sensor’s flexible cable terminates in a 4-pin JST SH (Qwiic) connector. There are three common ways to connect it.

Option A — Board with a built-in Qwiic / STEMMA QT socket (Recommended)

Plug the sensor’s Qwiic cable straight into the socket — no jumper wires, no soldering. This works with the Arduino Uno R4 Minima / R4 WiFi, ESP32 dev boards with Qwiic, Raspberry Pi Pico carriers with Qwiic, Adafruit Feather boards with STEMMA QT, and similar.

ProtoCentral AS6221 wearable temperature sensor plugged into an Arduino Uno R4 Qwiic socket via its flexible cable and 4-pin JST QWIIC connector

Because the host is already a 3.3 V board, the sensor plugs straight into its Qwiic socket with a standard Qwiic / STEMMA QT cable.

Option B — Direct wiring to a 3.3 V host

Use a Qwiic breakout cable (Qwiic connector to male jumper wires) to wire the four lines to your host’s I²C pins:

AS6221 (Qwiic) Host Pin Function
SDA I²C SDA I²C data
SCL I²C SCL I²C clock
3V3 3.3 V Power (do not use 5 V)
GND GND Ground

ESP32 (default I²C0): SDA → GPIO 21, SCL → GPIO 22, 3V3 → 3.3 V, GND → GND.

Raspberry Pi Pico (I²C0): SDA → GP0, SCL → GP1, 3V3 → 3V3, GND → GND.

Option C — Classic 5 V Arduino Uno (R3) — use a Qwiic Shield

A classic Uno (R3 and earlier) has no Qwiic socket and runs its I²C at 5 V, while the AS6221 is a 3.3 V part. The simplest fix is a SparkFun Qwiic Shield (or any equivalent Qwiic shield with an onboard 3.3 V regulator): stack it on the Uno’s headers and plug the sensor’s Qwiic cable into one of the shield’s Qwiic sockets.

ProtoCentral AS6221 wearable sensor connected to a classic 5V Arduino Uno using a SparkFun Qwiic Shield, which adds a 3.3V Qwiic socket so no level shifter is needed

No level shifter is needed. The shield powers the Qwiic bus from its 3.3 V regulator, and I²C is open-drain with the bus pull-ups referenced to 3.3 V — so SDA/SCL never rise above 3.3 V. The 5 V Uno reads 3.3 V as a valid logic HIGH and only ever pulls the line low, so the 3.3 V AS6221 is never over-driven. No soldering, no jumper wires — and you can daisy-chain more Qwiic sensors on the shield’s extra ports.

Tip: To run multiple AS6221 sensors on the same bus, set a different address (0x48 – 0x4F) on each and instantiate one sensor object per address. You can daisy-chain other Qwiic sensors on the same I²C bus as well.

Sensor Placement on the Body

The AS6221 measures the temperature at the sensor probe’s contact surface — not a true core body temperature. Where you place the probe determines what reading you get and how stable it is.

Recommended: Axilla (armpit)

Press the probe firmly into the axilla (armpit), then hold the arm against the body for ~3 minutes. This is the closest non-invasive proxy for core body temperature and gives the most stable reading. Expected range: 36.5 – 37.2 °C for a healthy adult at rest.

Alternate: Forehead

Adhere the probe to the centre of the forehead, just above the brow. Convenient and quick, but skin temperature here typically reads 0.3 – 0.5 °C lower than core. Useful for fever screening with a calibration offset.

Alternate: Inner Wrist

Place the probe against the inner wrist, ideally over the radial pulse area. Best suited to wearable use with a strap or medical adhesive. Wrist skin temperature is more sensitive to ambient air and circulation: 33 – 36 °C is typical, and the absolute number matters less than the trend.

Installing the Arduino Library

Option 1: Arduino Library Manager (Recommended)

  1. Open the Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries…
  3. Search for “ProtoCentral AS6221”
  4. Click Install

Option 2: Manual Install from GitHub

  1. Go to github.com/Protocentral/protocentral_as6221_arduino
  2. Click Code → Download ZIP
  3. In the Arduino IDE, go to Sketch → Include Library → Add .ZIP Library…
  4. Select the downloaded ZIP file

Your First Temperature Reading (Arduino)

Open the example sketch: File → Examples → ProtoCentral AS6221 → Example1_BasicReading

Or create a new sketch with the following code, which prints the body temperature once per second:

#include <Wire.h>
#include "protocentral_as6221.h"

ProtocentralAS6221 tempSensor(AS6221_DEFAULT_ADDRESS);  // 0x48

void setup() {
    Serial.begin(115200);
    while (!Serial) { delay(10); }

    Wire.begin();

    if (!tempSensor.begin()) {
        Serial.println("AS6221 not found on the I2C bus — check wiring/address");
        while (1) { delay(1000); }
    }
    Serial.println("AS6221 detected.");
}

void loop() {
    float tempC = tempSensor.readTemperatureC();
    Serial.print("Temperature: ");
    Serial.print(tempC, 4);
    Serial.println(" C");
    delay(1000);
}

What This Code Does

  1. Includes the libraries — Wire.h for I²C and protocentral_as6221.h for the sensor
  2. Creates the sensor object — at the default address 0x48 (AS6221_DEFAULT_ADDRESS)
  3. Initialises the chip — begin() returns false if the sensor isn’t found on the bus
  4. Reads temperature — readTemperatureC() returns the latest sample as a float in °C (use readTemperatureF() for °F)
  5. Prints once per second — open the Serial Monitor at 115200 baud to see live readings

Using the Serial Monitor

  1. Upload the sketch to your board
  2. Place the probe in the axilla (or against another skin site)
  3. Open Tools → Serial Monitor at 115200 baud
  4. After ~10 seconds the reading should stabilise to within a few hundredths of a degree between samples

Reading Multiple Sensors

For several AS6221 probes on the same bus (each set to a different address), declare one object per address:

ProtocentralAS6221 sensorAxilla(0x48);
ProtocentralAS6221 sensorWrist(0x49);

float t1 = sensorAxilla.readTemperatureC();
float t2 = sensorWrist.readTemperatureC();

Using MicroPython

A MicroPython driver is also available for boards like the Raspberry Pi Pico and ESP32.

  1. Copy as6221.py onto your board (e.g. with Thonny or mpremote)
  2. Run the example below (Raspberry Pi Pico shown — adjust pins for your board)
import time
from machine import I2C, Pin
from as6221 import AS6221

# Raspberry Pi Pico I2C0 on GP0 (SDA) / GP1 (SCL)
i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400_000)

sensor = AS6221(i2c)

while True:
    temp_c = sensor.read_temperature()
    print("Temperature: {:.4f} C".format(temp_c))
    time.sleep_ms(1000)

Troubleshooting

Sensor not found / begin() returns false

  • Check SDA/SCL wiring, or that the Qwiic adapter is fully seated in both sockets
  • Confirm the host is supplying 3.3 V (not 5 V) on the power line
  • Run an I²C scanner sketch (e.g. the standard i2c_scanner example) to confirm the sensor responds at 0x48
  • If another device on the bus already uses 0x48, set the AS6221 to a different address (0x49 – 0x4F)

Temperature reads ambient room temperature, not body

  • The probe needs direct skin contact to read body temperature
  • Allow ~30 – 60 seconds of contact for the probe to equilibrate with skin

Reading drifts continuously / never stabilises

  • Body movement and ambient air change the probe’s environment — hold it still in the axilla and keep the arm clamped
  • Cold or sweaty skin causes a slow rise as the probe warms up; wait ~3 minutes for axilla measurements

I²C bus errors

  • For long cables or noisy environments, add external 4.7 kΩ pull-ups on SDA and SCL
  • Keep the bus at 100 / 400 kHz; very long leads may need the lower speed

Resources

Licenses

  • Hardware: CERN Open Hardware Licence v2 — Permissive (CERN-OHL-P v2)
  • Software: MIT License