I designed an ultrasonic sensor based soap dispenser using servo motor and strings to be used. The sonar sensor detects obstacle and then the servo pulls the string which eventually presses the soap dispenser head. It was prepared as a Covid-19 project. The circuit diagram and other details will be merged.
You are welcome to submit Pull Request to add more feature and precision. Thank You.