I got a kick of this build. It does work thought.
https://www.instructables.com/id/Automatic-Soap-Dispenser-Using-Arduino/