Introduction: How to Make Automatic Soap Dispenser

About: Hello, I'm a junior creator and I'm 15 years old, I also have a YouTube channel named arduino maker


In this tutorial I will show you , how to make automatic contactless soap dispenser which is fully DIY

if you like it then consider supporting me by subscribing my channel ARDUINO MAKER. So get ready to be inspired.....! you can also watch my youtube video


Step 1: Connections

After getting all supplies you can start connecting all things and securing them by soldering all connections properly. All connections are given above in the circuit diagram

Step 2: Preparing the Soap Dispeser

So, now after completing all connections its time to modify the soap dispenser so we could use it for our purpose

you can modify it by making some holes on the top nozzle as shown in the above picture

Step 3: Glueing All the Components in Right Place

Now, after completing the above steps you can start gluing all the components in place as shown in above pictures

Step 4: Connecting Servo's Saft With the Dispenser

After this you will need a wire or sting to connect the dispenser with the servo's shaft through holes as shown above

Step 5: Programming

Now, upload the code below


Servo myservo;

int pos = 180; void setup() { pinMode(2,INPUT); myservo.attach(3); } void loop() { int hsense=digitalRead(2); if((hsense==HIGH)) { myservo.write(0); } else { myservo.write(180); } }

Step 6: Go and Wash Hands

Congratulations you have mad it successfully so, go and give it a try
thank you for your support...!