Distance measurement with proximity sensor of Zumo 32u4

Hello,

  1. I want to use proximity sensor to implement obstacle avoidance on a Zumo 32u4. The proximity sensor is not giving the values in terms of known units like centimeter or millimeter. How to measure the distance between the robot and the obstacle with the proximity sensor ?

  2. Is there any software code available to have obstacle avoidance ?

Thanks.

Hello,

The Zumo’s proximity sensors are not capable of true distance measurement. You can get some general idea of where an object is by comparing the signals of the sensors while the various emitters are on, but factors such as reflectivity and the beam width of the IR LED will not allow for true and accurate distance measurements. You might consider using some Sharp analog distance sensors or time-of-flight sensors.

-Derrill

Hello,

Can you please give information on how to connect the “Sharp analog distance sensors” to the Zumo 32u4 ? How to do the wiring and take the values ?

Thanks.

Hello,

You can connect analog sensors like those Sharp sensors to free analog pins of the Zumo 32U4 board. You can see those locations in the “Expansion areas” section of the user’s guide. Analog sensors like those are read using the analogRead() function.

Since the analog pins are used for other functions on the Zumo board, you will need to decide which features are less important to you. You can see how to free up some analog pins under the “Freeing up I/O pins” heading in the “Adding electronics” section of the user’s guide.

-Derrill