Despite the warnings of science fiction and modern movies, robotic technology continues to march forward. Since we’ve accepted our inevitable fate as servants of our robotic overlords, we might as well equip them with more sensors so they can navigate easier.
Ultrasonic sensors are a great way to provide robots with spatial awareness to help them navigate past doors and walls. They’re cheap, reliable, and easy to use. While it would be reasonable to assume that three sensors on the front, left, and right would be enough, this leaves a significant number of blind spots.
The corners of a rover like this ware what really matter and adding three sensors to each will facilitate great obstacle avoidance. Adding 12 HC-SR04 sensors is surprisingly inexpensive while providing great accuracy. The trade-off is that they require two pins each: one for the trigger and one for the echo. The Arduino must also handle the timing for all of this. It sounds like we’re getting close to a solution, but those I/O and timing requirements are asking a lot of a basic Arduino. But this new Tindie item has the solution.
Red Hunter has come up with a module that can connect up to 16 HC-SR04 ultrasonic range sensors to an Arduino using the I2C bus and one hardware interrupt pin.
His original design supported 8 sensors (we covered that one about a year ago), but it would only control two sensors per corner. The OctosonarX2 improves on his original design with the capacity for 16 sensors. A 16-pin version of the chip was available, so it made sense to offer a higher capacity.
The library handles the timing, and the hardware interrupts provide high accuracy results. Red Hunter also tests each unit using an Arduino test-bed and ships with separate pin headers.