Created a 3D pan and tilt scanner using an IR distance sensor, two servos, and an Arduino Uno board and tested it on a cardboard cutout of the letter "L".
I took on the software role in this project while my partner handled the mechanical design aspect.
First, we calibrated the IR distance sensor from a range of 0.25m to 1.5m by recording the voltage it read for a cardboard sheet at distances in intervals of 0.25 m. This data was then processed in MATLAB to create a function for a curve of best fit that represented the distances corresponding to each voltage reading from the sensor.
After calibration, the rest of the code was split into three primary sections:
1. Collecting scan data - C++ was used to code the servo motors to scan the image, starting at the top left and ending at the bottom right. While collection occurred, the pan angles, tilt angles, and the IR sensor voltage readings were printed to the Serial in a CSV format.
2. Converting Arduino data into a CSV - Python was used to read from the Arduino's Serial monitor and store it in a CSV file.
3. Visualizing data from the scanner - Python was used to unpack previously-stored CSVs into a three-dimensional plot representing the letter. The given pan angles, tilt angles, and IR sensor voltage readings were used to calculate spherical coordinates which were then converted to cartesian coordinates representing each point that was scanned.
Team: Aditi Vinod & KD Vo