Servo questions

Hello, I have a bunch of servos MG996R. They all suffer the same fate. When I power it up, it turn for less than a second, then I heard a loud click, then it stopped. When I open it up, the konb on the gear above the potentiometer stuck, as it reaches its limit and never reverse direction. When cause this, what is broken, can i fix it? Thanks.

Seems like you try to send them further than they can go. Simply don't :slight_smile:

Hi,
Can you post the code you are using to control them, and a circuit diagram showing how you have connected them the the controller and power supply?

Tom... :slight_smile:

Thank you for the replaies.
@septillion

septillion:
Seems like you try to send them further than they can go. Simply don’t :slight_smile:

I do not believe I set it out of range.

@TomGeorge
“Can you post the code you are using to control them, and a circuit diagram showing how you have connected them the the controller and power supply?”

There is not much to see in the code. It is simply the sweep.ino program from the out of the box from Arduino IDE, except I changed the 0-180 to 0-90. As for the power supply, I use an external 5V supply, not from the Arduino.

I think the issue is in the tiny cercuit board. Some other MG996Rs would reverse direction when it reaches either 0 degree and 90 degrees, but this bunch don’t.

Did you remember to connect the grounds?

Yea of course.

af1812:
I do not believe I set it out of range.

I like using the knob tutorial to test the physical limits of a servo.
Modify the tutorial to print the value that is being sent to the servo as the knob is turned.
Then run the script.
Move the know back and forth slowly, listening to the servo. The motor sound will change when the physical limit is reached. Note the value being printed at that point. Now move the knob so the servo moves to the other end if its range. Find the value that puts the servo up against the physical limit there, again, using the change in the motor sound at the indicator.

Now you know the values that will drive the servo to the physical limits. Keep the servo commands inside of those limits in the future.

vinceherman:
I like using the knob tutorial to test the physical limits of a servo.
Modify the tutorial to print the value that is being sent to the servo as the knob is turned.
Then run the script.
Move the know back and forth slowly, listening to the servo. The motor sound will change when the physical limit is reached. Note the value being printed at that point. Now move the knob so the servo moves to the other end if its range. Find the value that puts the servo up against the physical limit there, again, using the change in the motor sound at the indicator.

Now you know the values that will drive the servo to the physical limits. Keep the servo commands inside of those limits in the future.

Thanks for your advice. I followed it, use the knob.ino program by adjusting the potentiometer, it can go back and forth base on the adjustment. However, everytime I power up the servo, the motor starts to turn then it hits to the end, than stops, it doesn't reverse automatically until I manually adjust the potentiometer as discribed in th arduni tutorial, do you think it is the cercuit board?

The problem is either in the code you did not post, or you are making the silly mistake of trying to power the servo from the 5V Arduino output.

See "How to use this forum".

You tried the knob tutorial. Good. Did you modify it to print out the values it was sending to the servo? Did you note the values at which the servo would bind up against the physical limits?
What are those values?

Then, when you tried other code, did you ensure that the commands given were within the limits you found using the knob tutorial?

af1812:
Yea of course.

There really is no "of course", as evidenced by the lack of code and schematic.

Did you bother to CHANGE your values? to match what was there during your pot/sweep testing?

Dont use 0
Dont use 180

as your threshold range.. most ALL of these hobby servos DO NOT move throughout the whole spectrum/value range.

Start @ 20 and 160..

I see no code
I see no wiring pics..

So while you SAY or THINK you (may) have done something..... that may NOT be the case.

All GNDs tied together? Arduino , Battery, Servo..etc
Change your threshold values to have a smaller range?

The things you state do not add up if the sweep sketch works without issue.

af1812:
Thanks for your advice. I followed it, use the knob.ino program by adjusting the potentiometer, it can go back and forth base on the adjustment. However, everytime I power up the servo, the motor starts to turn then it hits to the end, than stops, it doesn't reverse automatically until I manually adjust the potentiometer as discribed in th arduni tutorial, do you think it is the cercuit board?

The servo seems to be acting normally. Normal small servos do not reverse automatically when they hit the internal end stop. Perhaps you are confused by the Example program Sweep.ino? In that program, the servo does sweep back and forth, but that's because the program is telling it to do so.

A normal servo will turn to a particular angle, then stop at that angle. Most of the small, inexpensive ones will turn 120 to 160 degrees before they can't go any further. When they get there, they won't reverse and go back.