- All products
- Sensors & Modules
- Distance + Light
- Distance dToF Imager - TMF8820 (SparkFun Qwiic)
- Distance + Light
Features
- Direct Time-of-Flight Technology: Provides accurate distance measurement by calculating photon flight time.
- Long Range Detection: Measures distances from approximately 10mm up to 5000mm.
- SPAD Sensor Architecture: Uses Single Photon Avalanche Diode technology for high sensitivity.
- Integrated TDC Processing: Provides sub-nanosecond timing accuracy for precise measurements.
- 3 × 3 Multizone Detection: Supports nine independent measurement zones for detecting multiple objects.
- On-Chip Histogram Processing: Reduces processing requirements for the host microcontroller.
- Ambient Light Rejection: Built-in optical filtering improves performance under different lighting conditions.
- 940nm VCSEL Laser: Provides stable Class 1 infrared illumination.
- Qwiic I2C Interface: Enables easy plug-and-play connection without soldering.
- Adjustable Field of View: Supports up to 63° diagonal viewing angle.
- Low Power Operation: Suitable for battery-powered and portable applications.
Principle of Operation
The TMF8820 operates using direct Time-of-Flight (dToF) measurement technology. The onboard VCSEL laser emits short pulses of 940nm infrared light toward the target object. When the reflected photons return to the sensor, the SPAD array detects them and the TDC calculates the exact travel time.

The distance is calculated based on the speed of light and the measured time delay between emission and reception. The sensor internally processes the received photon data using histogram algorithms to improve accuracy, reject noise, and provide reliable distance readings.
The sensor communicates with the host controller through the I2C interface, allowing the microcontroller to read distance measurements, configure detection parameters, and process sensor data for different applications.
Applications
- Camera autofocus and laser distance autofocus (LDAF) systems
- Robotic obstacle detection and collision avoidance
- Presence and proximity detection systems
- Industrial automation sensing
- Safety light curtain systems
- Smart home devices
- Gesture and user interaction systems
- Portable measurement instruments
- Object detection systems
Pinout

| Pin | Function | Direction |
|---|---|---|
| GND | Ground | Power |
| 3.3V | Power supply input | Power |
| SDA | I2C Data Line | Input / Output |
| SCL | I2C Clock Line | Input / Output |
| INT | Data ready interrupt signal | Output |
| GP0/SYNC | General purpose GPIO or synchronization input | Input / Output |
| GP1 | General purpose GPIO | Input / Output |
| EN | Enable control (active high) | Input |
Wiring
The TMF8820 communicates using the I2C interface and can be connected directly to compatible development boards.
| TMF8820 | Arduino / ESP32 |
|---|---|
| 3.3V | 3.3V |
| GND | GND |
| SDA | I2C SDA |
| SCL | I2C SCL |
First Time Setup
- Connect the TMF8820 module using the Qwiic I2C connector or breakout pins.
- Install the required TMF8820 Arduino library.
- Connect the sensor to a 3.3V compatible development board.
- Run an example sketch to initialize the sensor.
- Read distance values through the I2C interface.
- Adjust field of view and measurement settings according to the application.
Specifications
| Parameter | Specification |
|---|---|
| Product Type | dToF Distance Imager Module |
| Sensor | AMS TMF8820 / TMF8821 |
| Technology | Direct Time-of-Flight (dToF) |
| Measurement Range | 10mm to 5000mm |
| Detection Zones | 3 × 3 Multizone (9 zones) |
| Light Source | 940nm Class 1 VCSEL Laser |
| Maximum Update Rate | 30Hz |
| Communication Interface | I2C |
| I2C Address | 0x41 |
| Operating Voltage | 2.7V – 3.6V (3.3V Typical) |
| Standby Current | 8µA |
| Active Current | 57mA |
| Field of View | Up to 63° diagonal |
| Operating Temperature | -30°C to +70°C |
| Board Dimensions | 25.4mm × 25.4mm |
Resources
- SparkFun Qwiic dToF TMF8820 Imager Product Page: SparkFun TMF8820 Documentation
- SparkFun TMF8820 Arduino Library: SparkFun TMF882X Arduino Library (GitHub)
- AMS TMF8820 Datasheet: AMS OSRAM Time-of-Flight Sensor Documentation
- SparkFun Qwiic Connect System Documentation: SparkFun Qwiic Interface Guide
Features
- Direct Time-of-Flight Technology: Provides accurate distance measurement by calculating photon flight time.
- Long Range Detection: Measures distances from approximately 10mm up to 5000mm.
- SPAD Sensor Architecture: Uses Single Photon Avalanche Diode technology for high sensitivity.
- Integrated TDC Processing: Provides sub-nanosecond timing accuracy for precise measurements.
- 3 × 3 Multizone Detection: Supports nine independent measurement zones for detecting multiple objects.
- On-Chip Histogram Processing: Reduces processing requirements for the host microcontroller.
- Ambient Light Rejection: Built-in optical filtering improves performance under different lighting conditions.
- 940nm VCSEL Laser: Provides stable Class 1 infrared illumination.
- Qwiic I2C Interface: Enables easy plug-and-play connection without soldering.
- Adjustable Field of View: Supports up to 63° diagonal viewing angle.
- Low Power Operation: Suitable for battery-powered and portable applications.
Principle of Operation
The TMF8820 operates using direct Time-of-Flight (dToF) measurement technology. The onboard VCSEL laser emits short pulses of 940nm infrared light toward the target object. When the reflected photons return to the sensor, the SPAD array detects them and the TDC calculates the exact travel time.

The distance is calculated based on the speed of light and the measured time delay between emission and reception. The sensor internally processes the received photon data using histogram algorithms to improve accuracy, reject noise, and provide reliable distance readings.
The sensor communicates with the host controller through the I2C interface, allowing the microcontroller to read distance measurements, configure detection parameters, and process sensor data for different applications.
Applications
- Camera autofocus and laser distance autofocus (LDAF) systems
- Robotic obstacle detection and collision avoidance
- Presence and proximity detection systems
- Industrial automation sensing
- Safety light curtain systems
- Smart home devices
- Gesture and user interaction systems
- Portable measurement instruments
- Object detection systems
Pinout

| Pin | Function | Direction |
|---|---|---|
| GND | Ground | Power |
| 3.3V | Power supply input | Power |
| SDA | I2C Data Line | Input / Output |
| SCL | I2C Clock Line | Input / Output |
| INT | Data ready interrupt signal | Output |
| GP0/SYNC | General purpose GPIO or synchronization input | Input / Output |
| GP1 | General purpose GPIO | Input / Output |
| EN | Enable control (active high) | Input |
Wiring
The TMF8820 communicates using the I2C interface and can be connected directly to compatible development boards.
| TMF8820 | Arduino / ESP32 |
|---|---|
| 3.3V | 3.3V |
| GND | GND |
| SDA | I2C SDA |
| SCL | I2C SCL |
First Time Setup
- Connect the TMF8820 module using the Qwiic I2C connector or breakout pins.
- Install the required TMF8820 Arduino library.
- Connect the sensor to a 3.3V compatible development board.
- Run an example sketch to initialize the sensor.
- Read distance values through the I2C interface.
- Adjust field of view and measurement settings according to the application.
Specifications
| Parameter | Specification |
|---|---|
| Product Type | dToF Distance Imager Module |
| Sensor | AMS TMF8820 / TMF8821 |
| Technology | Direct Time-of-Flight (dToF) |
| Measurement Range | 10mm to 5000mm |
| Detection Zones | 3 × 3 Multizone (9 zones) |
| Light Source | 940nm Class 1 VCSEL Laser |
| Maximum Update Rate | 30Hz |
| Communication Interface | I2C |
| I2C Address | 0x41 |
| Operating Voltage | 2.7V – 3.6V (3.3V Typical) |
| Standby Current | 8µA |
| Active Current | 57mA |
| Field of View | Up to 63° diagonal |
| Operating Temperature | -30°C to +70°C |
| Board Dimensions | 25.4mm × 25.4mm |
Resources
- SparkFun Qwiic dToF TMF8820 Imager Product Page: SparkFun TMF8820 Documentation
- SparkFun TMF8820 Arduino Library: SparkFun TMF882X Arduino Library (GitHub)
- AMS TMF8820 Datasheet: AMS OSRAM Time-of-Flight Sensor Documentation
- SparkFun Qwiic Connect System Documentation: SparkFun Qwiic Interface Guide

