TOF400C Time-of-Flight Sensor

View on Amazon
Overview
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:
Get Your TOF400C
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
TOF400C Pinout
The TOF400C pinout includes I2C communication pins (SDA, SCL), power supply (VIN, GND), interrupt pin (INT), and shutdown pin (SHUT) for long-range distance measurements up to 4 meters. Based on the VL53L1X chip.
Visual Pinout Diagram

Pin Types
Quick Tips
on VL53L1X Time-of-Flight sensor chip,Long-range distance measurement: 0 cm to 400 cm (4 meters),Resolution: 1 mm accuracy,Field of View: 27°
voltage: 3.0V to 5.0V (onboard regulator),VL53L1X chip requires: 2.6V to 3.5V (regulated on board),I2C address: 0x29 (default),Laser wavelength: 940 nm (Class 1)
consumption: ~40 mA typical,Advanced filtering and timing budget control,Adjustable distance modes: short, medium, long
Pin Descriptions
| Pin Name | Type | Description | Notes |
|---|---|---|---|
1 VIN | Power | Power supply input (3.0V to 5.0V) | Typically 3.3V (VL53L1X requires 2.6-3.5V) |
2 GND | Ground | Ground connection | Common ground |
3 SDA | I2C Data | I2C Serial Data line | Bidirectional data (requires pull-up) |
4 SCL | I2C Clock | I2C Serial Clock line | Clock signal (requires pull-up) |
5 INT | Interrupt | Interrupt output pin | Optional for event-driven measurements |
6 SHUT | Control | Shutdown pin (active low) | Tie high to enable sensor, low to disable |
Wiring TOF400C to ESP32
Connect the TOF400C to your ESP32 via I2C (SDA and SCL pins). This sensor is based on the VL53L1X chip and provides long-range distance measurements up to 4 meters with adjustable timing budgets. Pull-up resistors are typically included on modules.
Visual Wiring Diagram

Connection Status
Protocol
Pin Connections
| TOF400C Pin | Connection | ESP32 Pin | Description |
|---|---|---|---|
1 VIN Required | 3.3V or 5V | Power supply (onboard regulator) | |
2 GND Required | GND | Ground connection | |
3 SDA Required | GPIO21 | I2C data line (with pull-up) | |
4 SCL Required | GPIO22 | I2C clock line (with pull-up) | |
5 INT Optional | GPIO (optional) | Interrupt output for measurement ready | |
6 SHUT Optional | 3.3V or GPIO | Shutdown control (tie high to enable) |
on VL53L1X chip - compatible with VL53L1X libraries
range: up to 4 meters (10x longer than TOF050C)
address: 0x29 (same as VL53L0X/VL6180X)
voltage regulator: accepts 3.3V or 5V input
resistors typically included on module
pin: Tie high to enable, allows multiple sensors on same bus
pin signals when measurement is ready
Adafruit_VL53L1X or Pololu VL53L1X library
distance modes: short (1.3m), medium (3m), long (4m)
timing budget affects accuracy vs speed
nm laser wavelength (Class 1, eye-safe)
ambient light performance than VL53L0X
replace VL53L1X in existing projects
TOF400C Troubleshooting
Common issues and solutions to help you get your sensor working
Common Issues
Issue: Sensor not detected via I²C.
Solution: Check pull-up resistors, wiring, and ensure SHUT pin is high or tied to VIN. Try scanning I²C address.
Issue: Inconsistent or flickering values.
Solution: Increase timing budget in code, shield from ambient light, or use reflective target surfaces.
Issue: Always shows max range (e.g. 4000 mm).
Solution: Ensure target is within FOV and reflective enough. Use long-range mode and increase integration time.
Debugging Tips
Use the Serial Monitor to check for error messages and verify the sensor's output. Add debug prints in your code to track the sensor's state.
Use a multimeter to verify voltage levels and check for continuity in your connections. Ensure the power supply is stable and within the sensor's requirements.
Additional Resources
TOF400C Programming Examples
Ready-to-use code examples for different platforms and frameworks
Wrapping Up TOF400C
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.
Best Practices
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Safety First
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.
Ready to Start Building?
Now that you have all the information you need, it's time to integrate the TOF400C into your ESP32 project and bring your ideas to life!



