The Ultrasonic Sensor [model: HC-SR04] has a transmitter and a receiver
Ultrasonic sensors work like radar: they emit an ultrasonic pulse and wait for it to "bounce" off of a surface and back to the receiving end of the sensor. The delta in time from emitting to receiving provides a voltage reading to the Arduino to be calculated and converted into a distance reading.
Scenario:
The ultrasonic sensor is being used for detecting the distance of the ball.
The reading appear to be accurate from 3-15cm, but beyond that the measurements appear to be drastically inaccurate.
Considering switching sensor technologies from ultrasonic sensor -> Infrared Range finder.
Current workaround:
Limiting the balance range from 2-15cm. This is not sufficient.
The Technology
Scenario:
Current workaround: