Trying to use stronger servo on working project, doesnt work

Hey all, Ive currently got a working project, that I am going to make permanent. Part of this project is a servo nailed to the wall, and the one it works with is one of those cheap plastic ones. So, I want to upgrade to a metal one for durability. The current model is the SG90, and I wish to use the LS-009AF. But, when I plug it in, all it does is click a little, then stop. Now, either it works differently, or its because I got it from Fry's (I know, I learned about how bad they are after I bought this. Oops). Here is my code if it helps:

#include <Servo.h>
Servo myservo;

long int Val = 0; //value of pot
long int newVal = 0; //value after math
const int potPin = A1; //analog pin for pot
const int buttonPin = 11;

void setup() {
myservo.attach(9);
pinMode(buttonPin, INPUT); //button output (press button)
//pinMode(potPin, OUTPUT);



}

void loop() {
Val = analogRead(potPin);
newVal = Val * 3520;

while (digitalRead(11) == HIGH) //reads button
{

   delay(newVal); 
   myservo.write(0);  //pulls swich up
   delay(2000);
   myservo.write(180);  //loosens string
   delay(2000);
}

}

What power supply do You use for the servo? My guess is a tiny battory that is not enough.

I have it connected to a seperate 5 volt power supply, but ive tried adding more power to no avail. It merely clicked louder

I doubt this is Fry’s problem...
More likely your power supply or circuit.
Schematic and Photos will help identify the issues.

Sure, here it is. Once again though, it did work with the sg90

ok, looks like it should work...

  1. Edit: oops Why is the GND rail going to D11 ?
  2. What is the servo battery capacity? Maybe worth adding a chunky electrolytic (and possibly diode) on the 5V supply to the ‘duino
  3. Just guessing the servo uses the same control signalling as your SG-99.

edited
added: may be worth redrafting the diagram so wires don’t cross back to over themselves.. quite awkward to make sense.... Arduino 5V is coming from where?
In fact i take back my first comment... power rails are all over the shop.

If it wasn't obvious, im quite the novice to this stuff
My apologies, but how does one go about finding the servo battery capacity? Its not in the datasheet.
In the LS-009AF datasheet, it says "Control system - Change pulse width", if thats related. So, I wanted to compare, but the SG90 datasheet is pretty barebones.
The power is coming from a stripped phone charger, as those output 5 volts. That is then wired back to the Arduino to power it via the 5-volt pin.
Also, about that awful schematic- my apologies, but the incredible, shrewd, smart me seems to have forgotten to save it :o ... oops

SERVO: Pulse width sounds like it’s ok, we can look at that later...
Battery: somewhere will say 5V 200mAh or similar., or on the site you purchased it.

Lost drawing - a good chance to draw it up again!
Start with +voltages at the top, GND at the bottom.
Put the other bits in the middle, with signal flow L-R where feasible.

Here you go- hope its better :slight_smile:
About the battery- im not seeing it- It didn't say on fry's listing or the amazon listing.

Well, let's have a photo of the battery...
I can't imagine someone selling a battery that's not marked - unless perhaps it's reject manufacturing stock.

Your drawing with colour

Redrawn to make sense

Lose the external resisstor, just use INPUT_PULLUP on D11 to detect the switch state
Note +V at the top, circuit activity from L-R

Wait- I may be an idiot- Do you mean the battery powering the whole circut? If so... ouch
Im not actually using a battery, im using a phone charger with the end cut off, connected to a outlet usb port. THIS is rated at 5 volts 1.0 amps

a servo nailed to the wall

Assuming you didn't bash the nail through the workings :wink: the problem may be the fact that the new servo is half as torquey as the original: the SG90 datasheet OP linked says it's 2.5kg.cm, while this data sheet for the new one says it's 1.3-1.5.

Could it just simply be that your upgrade from plastic to metal was actually a downgrade and the servo can't supply enough torque? (What load are you imposing?- I don't think you said.)

Do you mean the battery powering the whole circut? If so... ouch

Not really a problem, but a good reason to draw the schematic properly/clearly !

The battery if it's big enough is no different than the charger/power supply... what is that rated at ?

Ah, I see.
But really, I cant seem to find that anywhere- not on the package, the datasheet, the actual product, the websites that sell it- nothing.

meltDown:
the problem maybe the fact that the new servo is half as torquey as the original: the SG90 datasheet OP linked says it's 2.5kg.cm, while this data sheet for the new one says it's 1.3-1.5.

Could it just simply be that your upgrade from plastic to metal was actually a downgrade and the servo can't supply enough torque? (What load are you imposing?- I don't think you said.)

In the testing bit im doing now, it isnt actually pulling anything. The point of this whole thing is to basically pull the switch for my fan down after a certain amount of time. What your saying would make sense if it was actually pulling something, which it isnt.

Surely the charger has it on the sticker.. ?
plugpack.jpg

plugpack.jpg

I think there may be a misunderstanding here- There is only one thing powering the whole circuit, that being the charger. Ill just write what looks important here "input 100 - 240V - 50/60 Hz 0.15A -- Output: 5V - 1A"
Apologies for the confusion

ok, regardless of the battery (whether you have one or not as drawn, that 5V 1A should be just enough - however if the servo reaches either end, or a heavy load - a small servo can draw two or three times its nominal ‘running’ current.

That ‘pile’ symbol is indicative of a battery. Comprised of multiple cells.

For a small servo with a load, i’d expect a decent regulated power source capable of 2A or greater.

Oh, of course. I thought that symbol just meant 5 volts input power, not specifically a battery. Oops :confused: . In which case, I think I'll just settle with the plastic one.

Thanks for all the help!

...and a more readable drawing!

Yes, that too :slight_smile: