REV Color Sensor V3 Distance Conversion

Hello, our team is currently trying to use the Rev Color Sensor V3 for distance detection. We’re having trouble converting the raw values of the getProximity() method to a distance in cm. Are there any conversion scales to convert the values? Thank you.

Take a look at figure 10 in the APDS-9151 sensor datasheet. It appears to be non-linear, and also dependent on sensor configuration and the target being measured.

If you only need it to detect that the object is within a certain distance, it would probably easier to empirically determine the threshold. Even if you do need to measure distance, you’d probably want to do a curve fit based on readings from your sensor with the specific item you want to measure.

Thank you. We are able to detect a distance now. However, the sensor updates extremely slowly and only returns values when a physical object touches the sensor. Are there any ways to have more accurate updates on the sensor?

Have you plugged the sensor directly into the onboard RoboRIO I2C port?

If so, do not do this, as it will cause complete system lockups and could lead to the slow reading you’re seeing. Use the MXP I2C port instead. The NavX breaks this out exactly as needed for the sensor, if you have one, otherwise you’ll need a custom jumper cable to match the pins.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.