Ball contact sensor

In previous years our robots have been able to detect balls in a very reliable manner with the help of specialized IR sensors, made by Neonode, zForce Air (see TDP). Unfortunately, over the years these have broken down and are no longer being manufactured.

Hence there was a need for a different ball sensor method. Instead of choosing once more for an IR-based solution it was decided (initially as a compromise, but later on as a feature!) to use the encoder that is attached to the dribbler motor. Since 2022 - 2023 our dribbler motors have encoders that provide 1024 ticks per revolution (see datasheet). Now we can check whether the dribbler makes contact with the ball, since the speed from the dribbler bar will slow down.

Implementation

The implementation of the specific dribbler sensor function can be found on GitHub. This page describes the idea and logic behind it.

The first thing that has to be determined is the speed from the dribbler bar over time, is it increasing or decreasing? Once the speeds starts to decrease we have to figure out whether we've turned off the dribbler motor or whether we have a ball. In the case we still send a speed to the dribbler bar, we assume that we have the ball.

In the case that we have lost a ball we have to make sure that our speed returns to the speed that we've had before we received the ball (minus a small error margin).