Prep the wring from the ultrasonic sensor and servo to the breadboard and Arduino
Upload the code and test it works
Glue popsicle sticks together to make them the correct thickness. Also, one stick was thicker at the top to reach the main base of the pump and thinner at the bottom to attach to the bottle
Fasten popsicle sticks to servo in the correct orientation so it will reach the top of the pump
Secure down wires with tape so nothing becomes unplugged
Position ultrasonic sensor under the bottle of sanitizer and secure it down with tape as well as the wiring
Pray everything stays in place and it works
https://www.instructables.com/DIY-Easy-Non-Contact-Automatic-Hand-Sanitizer-Disp/
Gather all materials needed.
Set up all wiring to and from components (servo and ultrasonic sensor).
Test the wiring and code works before everything is all covered up.
Find or make a flat board slightly larger than all your components when lined up.
Using small pieces of basswood make a box to cover the breadboard and hold up the bottle of sanitizer. Make sure to leave a hole that the ultrasonic sensor can see out of.
Before fastening anything down, mark where you want the bottle of sanitizer to sit on top of the box you just made and make walls to hold in in place.
Secure your box down to the main board using glue, nails or screws.
(Optional) Tape down your Arduino so it doesn't move around white working with other components.
Use any sturdy small piece of scraps to elevate the servo enough so the moving parts don't catch the main board.
Run a string from your servo, through a small straw glued to the pump of the bottle down to the other side of the board. Secure the other end of the string however you like once its pulled tight.
Test!
I had a lot of fun doing this project. I really enjoyed the challenge of making a physical model even though we didn't need to. My group and I worked well together since most of us had worked together before. Additionally, I really enjoy using TinkerCad to make a clean diagram of the wiring. It is much easier than trying to draw it by hand or take a good looking picture of your work.
Although I wasn't able to get a good video of it working before my younger sister tragically knocked it over and broke part of it, this version worked much better and was much cleaner looking than the one I did on my own.