I am sending data from an Arduino Uno to an Arduino Mega via serial communication.

The data is analog value. I'm getting that data and converting it to an int. There is no problem there. However, when I connect the servo to the attached pin, the serial communication on mega becomes disconnected. When I remove the PWM pin, the serial communication is working again. Why does the servo stop serial communication?

Wiring: Mega-- 5v and gnd pins linked to servo ( 13kg/cm ), PWM 2 pin is linked to servo's pwm input, rx2 pin is linked to uno's tx pin

  • 3
    Don't power your servo from either Arduino. May 19, 2015 at 0:31
  • Okey I will try to power servo from somewhere else. But what is the problem? I want to know how does it happen. May 19, 2015 at 10:06
  • 1
    The problem is that the arduino can not supply enough current to drive the motor. So you might blow-up/fry your arduino (too much current through it).
    – Paul
    May 19, 2015 at 14:24
  • 1
    Actually, you are really lucky to have a working Arduino Mega after your experiment. May 19, 2015 at 15:16
  • 4
    Servo current draw varies drastically depending on load and internal control loop behavior which can vary even as the potentiometer and motor age or timing components drift with age or heat. But it is not just the average current that counts - excessive instantaneous current draw can reset or even crash your Arduino's microcontroller. What you are trying to do is really not sound engineering - if you are going to persist in it and insist it is not an issue, then people here won't help you. May 19, 2015 at 18:17

2 Answers 2


If you draw too much current from an Arduino microcontroller it can reset itself (brownout), that results in it not responding. To solve this do not power your servo directly from the Arduino, use an external power supply.


If you are using delay function then I guess the problem is due to that. Just try once using millis function to generate PWM signal at Mega.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.