Digilent Pmod ToF (Time of Flight) is a sensor that enables optical distance sensing. The on-chip digital signal processor ISL29501 calculates the time it takes for light emitted by the Pmod ToF to the target and back, which is proportional to the distance to the target. The Pmod ToF can measure distances of up to five meters and up to 16-bits of resolution.
You can add the Pmod ToF to Arduino Robots. Digilent provides a step by step guide to interface Pmod ToF with Adruino Due. The guide includes:
Connect Pmod ToF to Arduino Due
- 3V3 on Arduino to VCC on Pmod ToF
- GND on Arduino to GND on Pmod ToF
- SDA (20) on Arduino to SDA on Pmod ToF
- SCL (21) on Arduino to SCL on Pmod ToF
- 3, or any other digital pin on Arduino to SS on Pmod ToF
- 2, or any other digital pin on Arduino to IRQ on Pmod ToF
- Note: put all four jumpers in place on Pmod ToF
Calibrate the Pmod ToF
Three phases of calibration have to be performed:
- Magnitude calibration:It compensates the emitter currents.
- Crosstalk calibration: It compensates for electrical crosstalk observed by the photodiode.
- Distance calibration:It compensates for variation in delay of the emitter, photodiode, and the ISL29501 that will change the signal path delay.
Take the measurement through Arduino Due
A well-documented Arduino sketch is provided. It includes functions calibrating and initializing the Pmod ToF, taking and displaying the measurement. The distance in meters will be displayed in the serial monitor