Inspired by the recent outbreak of coronavirus, I created a soap dispenser that automatic dispensed soap. I used an ultrasonic distance sensor to sense if someone's hand was under the pump. I then used a micro servo to control the pumping of the soap.
Testing
Final product