Hi, I am very new to Arduino and am trying as my first project to build a simple cat food dispenser. I've used fishing wire to attach two ends of a Coca-Cola bottle (with the top chopped off) - one end is static and the other end is attached to the end of a servo spoke, so that when the servo rotates the bottle tips over and cat food can slip out. So far I've managed to victoriously overcome every obstacle I've encountered along the way, except for one: when I add too much food to the Coke bottle, I get a strange behavior where the servo rotates as I tell it to, pulling the string up and down several times through an angle of 35 degrees or so, but when it completes its final turn, it stops (as is supposed to happen) but then starts making a buzzing sound. At this point the distance sensor I've attached to the project (to detect if a cat is close enough to deserve food) stops responding to my hand motions. If I gently push the Coke bottle up with my hand for a moment, relieving the servo of stress, everything goes back to normal (the servo stops buzzing and the sensor becomes responsive again). The question is is there any solution to this problem other than purchasing a more powerful servo? Does this problem occur simply because the servo is under too much load? It seems to me like this is not the case, as it can still rotate the required amount, but simply gets kind of "confused" at the end of its rotation and stalls my program. I believe that before I used a hot-glue gun to glue the servo in place it worked fine, so is it plausible that the heat from the glue on the outside of the plastic (which only lasts a second) caused a defect in the internal electronics? I have literally zero experience with any kind of electronics/mechanics/physical constructions (I am a programmer), and it occurred to me too late that perhaps using hot glue on things which contain electronics is not good practice...
Where is the power from the servo coming from, as it sounds like the heavier load is causing the voltage to drop. The servo should have a separate power supply from the Arduino.
Robin2: Where is the power from the servo coming from, as it sounds like the heavier load is causing the voltage to drop. The servo should have a separate power supply from the Arduino.
Hi, thanks for your response.
The servo power is connected to the Arduino 5V output (on a breadboard) currently... If I understand you correctly, I should attach the servo to a battery instead of to the Arduino. That makes sense actually :) Thanks for the help!
Some time later:
I connected the servo ground and power to a battery, but I haven't yet tested if it fixes the high-load problem because now the servo seems to be stuck on 0 degrees (instead of doing an up-down motion). Any idea why this is? I tested both 3V and 9V batteries with similar results.
EDIT: I think I figured it out... the arduino and battery apparently need to share the same ground.
Are you sure that the servo is hefty enough for the task? A servo operating at or near its limit will probably breakdown after some usage.
it occurred to me too late that perhaps using hot glue on things which contain electronics is not good practice.
I use it all the time. Hot glue is very cold compared to molten solder.
the arduino and battery apparently need to share the same ground
We might call this the 1st Law of practical electronics :)