Servo MG996R fried my arduino nano and let the magic out

Hi

I was just wanting to do some testing with a MG996R servo.

I had a nano connected to it and magic smoke came out.

The servo did work, but it made some grinding sounds which probably means that the timing was out. I was running the sweep sketch.

Magic smoke then came out of the arduino - from the large chip in this photo.

I connected a uno and ran the same sketch and it acted weird so I quickly unplugged it.

Any reason for this?

I did read about putting a CAP betwen 5v and GND.If the Servo Misbehaves | Arduino Lesson 14. Servo Motors | Adafruit Learning System

Chris

Hi,
You used the nano to provide the 5V for the servo, thats a NO NO for any arduino.
Even the smaller servos need more peak current than the controller board can supply to move.

Tom..... :slight_smile:

MG996R servos are big power hungry servos. As Tom suggested, it's not a good idea to power any servos from an Arduino's 5V regulator but sometimes you can get away with it if you use a small servo and you don't drive the servo past its physical limits.

Unfortunately the sweep example uses endpoints which are outside the range of many servos.

I have a couple suggestions (besides not powering a servo from the Arduino's regulator).

Use "writeMicroseconds" instead of "write" (or use microsecond values with "write"). The servo "angle" rarely agrees with the values used with the "write" command so it's really a meaningless number. By using microseconds as the unit at least the number corresponds to some real world value (the length of the pulse). You also get much better precision using microseconds.

Set the servo's position before attaching the servo. This keeps the servo from slamming against an endstop. Use endpoints appropriate for your servo rather than the default values.

I posted a couple links to videos of a recent joystick/servo project here. By controlling the servos with "writeMicroseconds" and ramping the speed of the servo, I thought I was able to smoothly control the servos. I've attached the code I used to a post in that same thread. There's an example of how I think servos should be initialized in that program. The program also shows how to set alternate endpoints when attaching the servos.

Thanks for the help, I did try the CAP and it did make the UNO perform much better.

I will look into your code and the videos - thanks for replying...

Chris

iisfaq:
Thanks for the help, I did try the CAP and it did make the UNO perform much better.

I will look into your code and the videos - thanks for replying...

Chris

Cap or no cap, if you're still powering the servo from the Arduino, you'll fry another Arduino. It MUST have a separate power supply. That's a high-torque (high-current) servo. The Arduino regulator isn't.