One of my tasks for the autonomous robot project was to design and build a IR sensor array that could “sense” ewoks, gaps, black lines, and obstacles on the competition surface. This was the final design that we used on our robot.
The array circuit consists of the ADS7828 ADC (courtesy of Texas Instruments), eight IR LEDs and photo-transistors, and accompanying circuitry. The entire sensor array connects to an I2C bus through two parallel JST connectors, which means that the sensor array has the capability of being daisy-chained. This proved to be a fantastic feature, as one iteration of our robot required 4 arrays, and was only accessible though one connector.
I also had to write a library for the sensor array that could be used by our main processor board (an STM32 development board running the Arduino framework). The library I wrote in C++ contains basic functions for connecting to the array, but also some statistic functions, such as weighted mean, inverse weighted mean, and others. These functions were helpful in writing algorithms to made decisions based off what the sensors are seeing.
You can find the software I wrote, as well as all of the hardware files in the repository: https://github.com/Arrakark/IRSensorArray