ESP32 TOF400C Time-of-Flight Sensor

TOF400C Time-of-Flight Sensor image

TOF400C

Protocol: I2C

Overview

The TOF400C is a long-range laser-based time-of-flight (ToF) sensor based on the VL53L1X chip from STMicroelectronics. It measures distances up to 4 meters with high accuracy and is ideal for robotics, navigation, and presence detection applications.

About TOF400C Time-of-Flight Sensor

📏 TOF400C Sensor Overview

  • Range: 0cm to 400cm (Max)
  • Interface: I²C digital communication
  • Resolution: 1mm accuracy
  • Field of View: 27°
  • Operating Voltage: 3.0V to 5.0V
  • Typical Current: ~40mA
  • Infrared Wavelength: 940nm
  • Advanced Filtering and Timing Budget Control

Check Other sensors modules based on VL53L1X Time of Flight Sensor:

Where to Buy

TOF400C Time-of-Flight Sensor

Starting from

4.80$ per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Range 0cm to 400cm
Blind Zone 0–4cm
Resolution 1mm
Voltage Range 3.0V to 5.0V
Current Consumption ~40mA
Interface I²C
Wavelength 940nm
Field of View 27°

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • VIN: Power supply (3.0V – 5.0V)
  • GND: Ground
  • SDA: I²C Data
  • SCL: I²C Clock
  • INT: Interrupt output
  • SHUT: Shutdown (active low)

Wiring with ESP32

Wire the TOF400C to an ESP32 or compatible board using I²C:

  • VIN → 3.3V or 5V
  • GND → GND
  • SDA → GPIO21
  • SCL → GPIO22
  • INT → Optional
  • SHUT → Optional

Troubleshooting Guide

Common Issues

📡 Sensor Not Responding

📉 Distance Readings Unstable

⚠️ Reads Max Distance Constantly

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🏠

ESPHome Example

YAML
🐍

MicroPython Example

Python

Conclusion

The ESP32 TOF400C Time-of-Flight Sensor is a powerful distance sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.