Automatic soap dispenser

Hey hi guys. I was planning to make a automatic soap dispenser with nano. So I tried using servos to push the knob of a normal soap dispenser down but that is taking a lot of current. So is there any other way I could push that knob down?
Thanks!

Do as it us done in the 10 USD Banggood dispensers, add a little pump inside and detector.

But like a pump won't be strong enough to lift the liquid up right? Also, I want something that I can just add in to the soap dispensers. I don't want to alter the soap dispenser

Maybe you could use a mini linear actuator? That would probably be strong enough and might have a better form factor, but I don't know how you plan to set this up. I found this on amazon... it might be a little overkill but hopefully it'll give you an idea of what I mean.

Additionally, if the strength of the dispenser knob becomes an issue, maybe you could try swapping the spring inside (if it has one) for a weaker one?

1 Like

Based on what specs should I use an actuator? I found this in amazon, will this work?
https://www.amazon.com/Uxcell-a14092600ux0438-Actuator-Solenoid-Electromagnet/dp/B013DR655A/ref=mp_s_a_1_8?dchild=1&keywords=linear+actuator+for+arduino&qid=1624034848&sprefix=linear+actuator+for+ar&sr=8-8

I would pass on the solenoid. Doubtful if it would push the skin of a rice pudding!
If you require help, it would assist the forum members if you gave some details:
Program & schematic that you are using.
The battery that you are using will not take any prisoners, it will just decapitate them if anything goes amiss.
Good luck...............

@notrauma is right. The solenoid you selected is rated for 40g... roughly 0.088 pounds. That is probably not enough :slight_smile:. If you have a scale at home, I'd try measuring the strength of the dispenser knob and make selections on a motor/actuator based on that.

Is there any way i can measure the strength of the dispenser knob?

To get a rough approximation, I'd say to put a plate on the top of the knob and put random stuff on the plate until the knob is pushed down. Then measure the weight of the stuff you put on the plate. That's pretty crude, but it'd probably work well enough to allow you to get a motor that'd suffice.

Here's another idea that might work:
If your scale has a flat top (probably does), push the top of the dispenser against the scale until it pushes in and soap comes out. Then record the weight measured by the scale. Make sure that you aren't putting the weight of the soap dispenser on the scale, though (or put the weight of the dispenser on the scale and subtract the weight off after).

So i tried to put some weights on the knob until it got pushed down. So I am getting around 1100 grams of weight. Is that how much we usually put?
So in this case, what is the best way to push the knob?

Also, I plan to use 4* AA (mostly Alkaline) batteries. In worst case scenario, I plan to use 2* 18650 Batteries(for more power).

If you measured 1.1kg, select something that can push/pull that much, and preferably more! An actuator with a rated strength above that or a servo motor that is strong enough will probably work. Which motor were you using earlier and how strong is it? You may have too long of a lever arm on the servo.

I was using 2* micro Servo 9g motors with 4*AA batteries

And initially, it worked really well but after some time, both those servos couldn't push the knob. I think they are sucking up the battery too fast. What do you think?

Also, as seen in google, the torque of a sg90 servo is around 2kg/cm. So suppose I attach the servo gear to the knob of the soap dispenser directly, it should be pushing it right?

Yeah, I agree. If you have the 18650s at hand, I'd try those.

Sorry, I'm not sure what you mean... can you explain your setup to me a little? I've been assuming you're using a typical soap dispenser where the you push down the dispenser part.

I meant like this-

So the white servo gear touches the knob and then pushes it directly. Is it better like this as in this case the length of the rod(here, the white servo gear) is very small.

If I want to use a pump, what specifications are the best to pump out soap?

Well, regardless of whether you use a rod (which I think may result in a cleaner setup) or push the dispenser directly with the servo arm (as in your picture), you need to make sure that the distance of the effective lever arm doing the action is small enough. sg90 servos have a torque of around 2kg-cm (referring to what you said). Thus, they can apply a force of 2 kg to an object attached to a 1cm long lever arm. 2kg is dangerously close to 1.1kg, even with two servos... you'll really need to make sure that your servo arm is ~1cm (or shorter) if you don't upgrade your servos.

If you're using servo motors, I think that's the main issue to look into. I'm not sure about a pump, however... for a small soap bottle like the one you're using, I think that'd be a bit much. Undoubtedly, the setup would be more tricky (you may have leaks and the tubes involved in the pumping mechanism, which I assume you'll have, will be tricky to cover up for aesthetic pleasure in the final product).

If I were you, I'd stay away from the pumps... stick with the servo motors, maybe upgrade to a 20kg one (that is overkill, but something stronger than 2kg) and design a nice way to hold everything in place.

If I push the dispenser lever directly with the servo arm(whose length is about 2.5cm), it should give me a torque of about 1.8kg right?
Also, suppose I do upgrade the servo to MG996R. Will that work? It's torque is around 9 kgs. But won't it also consume more current than 2 mg90 servos. In that case, will 4 AA batteries be sufficient?

Nope, you'll have 0.8kg (give or take a few, depending on the angle of the lever arm). 2 * (1/2.5) = 0.8kg (moment arm physics).

I would have much more confidence in this motor, so yes, I'd use that if you have one at hand. Once again, however, make sure that you lever arm is short enough so that the 9kg-cm torque actually pays off.