Using the cheap HC-SR04 ultrasonic sensor and an Arduino nano we can build a low cost sensor array for robotics. The Arduino code will poll all the sensors and send byte packets via serial interface with the index and the distance to a Python app to process.
For measuring the distances we use a sonar technique to calculate the time of flight of the sound. The HC-SR04 is very inaccurate for distance measurement but can be used as a cheap low level fail-safe system for proximity object detection in order to avoid hitting obstacles during navigation.
The main benefits of using an array of sensors versus using one sensor and one servo to sweep is accuracy and no delay to measure positional distance of a huge area in front of the array. Currently using an array of 5 sensors we can poll all of them several times per second without any interference. Also having extra mechanical complexity like a servo will make the hardware more prone to failure.
Comments