I am testing my servo,(a Tower Pro SG90 servo) using the knob sketch but the servo just keeps spinning in circles. Anyone know why? Also, when I twist the pedometer it seems to be adjusting the speed the servo rotates, not the position of it.
From the info You give, I've got no clue. Is there any code involved?
Railroader:
Is there any code involved?
Yes, the "knob" code from the servo library.
What you have is a continuous rotation servo, the knob sketch expects a regular one that can go to a position and hold there.
wildbill:
What you have is a continuous rotation servo, the knob sketch expects a regular one that can go to a position and hold there.
Ok, how could I make it work like a regular servo?
Basically, you can't. You will need to get another one.
OK. Thanks for the help.
I just tested another servo (that is the same kind) but it is working like a regular servo instead of a continuous rotation servo. They are both Tower Pro SG90 micro servo 99's. Why are they acting differently?
owen5600:
I just tested another servo (that is the same kind) but it is working like a regular servo instead of a continuous rotation servo. They are both Tower Pro SG90 micro servo 99's. Why are they acting differently?
Either the first one is buggered or goto #3.
Show a link to the first servo purchase origin.
owen5600:
I just tested another servo (that is the same kind) but it is working like a regular servo instead of a continuous rotation servo. They are both Tower Pro SG90 micro servo 99's. Why are they acting differently?
It seems likely that the first one was modified for continuous rotation. This is done by opening the servo, removing the physical stops, and taking out the shaft that drives the feedback potentiometer. The potentiometer is left set at the midpoint. When the 'servo' is ordered to go to a position that is clockwise from the midpoint, it turns the motor clockwise, forever, trying to get the feedback potentiometer to say that the desired position has been reached (which it never will). When the 'servo' is ordered to go to a position that is counter-clockwise from the midpoint, it turns the motor counter-clockwise, forever, trying to get the feedback potentiometer to say that the desired position has been reached (which it never will). If the ordered position happens to match the position being reported by the potentiometer (about midpoint) the motor stops.
Having bought quite a few over the years I have noticed that about 6 months ago there has been a few changes in manufacturing of these.
The immediate tell-tale is that the new servos only have 2 fixing screws, not 4.
The drive shaft dimension is different so new horns are not compatible with the old horns.
The length of the mounting tabs and mounting hole positions are slightly different.
The depth below the mounting tabs is less.
The overall quality has reduced
The same servos are also manufactured as a continuous version, which, apart from the word continuous on the label, look identical.
In my last order of 10 servos, 2 didn't work, one was continuous. And 2 had crunchy gear boxes.
FWIW, the Towerpro website alleges that there are plenty of counterfeits being sold.
wildbill:
FWIW, the Towerpro website alleges that there are plenty of counterfeits being sold.
Indeed. It seems that 'plenty' is an understatement, and 'most of them' would be more accurate. I'm sure this last batch I ordered are counterfeits. It's got to the stage that there are now several 'variants' of an SG90 , one of them being the 'Tower Pro' version. The debate that components may be copies, counterfeits, clones, knock-offs, unbranded, OEM, original, surplus or seconds will continue. The fact is, at hobbyist level buying from a reseller, we are never quite sure of the pedigree of the components we order until they arrive, even then, there's often doubt. Even when using "Reputable Suppliers".
I have used many of the very inexpensive knockoff sg90 servos.
There is an unusual bug or design flaw that some but not all, have demonstrated.
If you give a servo signal within the expected range of about 1000ms to 2000ms, they work perfectly.
But if you give them an unexpectedly low (or high?) signal, something like 700ms, they spin continuously.
I never understood why the default range for servo.Attach() has such a huge range. 544-2400? Something like that.
If you use the optional min and max arguments with 1000 and 2000 values, this odd behavior is prevented.
vinceherman:
....
If you give a servo signal within the expected range of about 1000ms to 2000ms, they work perfectly.
But if you give them an unexpectedly low (or high?) signal, something like 700ms, they spin continuously...
I have used the standard servo library for some time now so I've not noticed this as a symptom of sending a delayed pulse, but I have noticed this in a batch I received that were marked "continuous" occasionally on startup or in the event of a glitch whilst running. These servos don't have a mechanical stop but have an internal potentiometer.
vinceherman:
I never understood why the default range for servo.Attach() has such a huge range. 544-2400? Something like that.
If you use the optional min and max arguments with 1000 and 2000 values, this odd behavior is prevented.
I thought the parameter value for servo.attach() was the arduino pin number? I've never sent it a value below 2 or above 19. Are we talking the same thing - servo.Attach() and servo.attach() or are you using a different library?
The standard servo library attach function has two optional parameters after the pin number. Take a look at the reference.
wildbill:
The standard servo library attach function has two optional parameters after the pin number. Take a look at the reference.
Whale oil beef hooked! So it does. Thank you. I've got a bin full of servos that might be OK after all!.
I will try to change the arguments to see if that helps later. Sorry for the late reply.
Whale oil beef hooked! So it does. Thank you. I've got a bin full of servos that might be OK after all!.
Can you test the servos and tell us if it works?
irenx:
i need some information about your project. please give me explanation. and you can see this article
What part do you need more info on?