Arduino becomes unidentified after connecting servo signal cable

Hello everyone,

I'm using win7 64-bit and Arduino IDE 1.0.1-rc2 because 1.0.1 didn't want to cooperate with mine OS (after a unusually long boot of IDE I got a "An error occured while starting the application." error).
I'm trying to make a project which constains moving servo and using Serial communication but for now I've simplified it to the blink example which I've expanded by adding 1 servo (code below).
I managed to install the arduino drivers (I've tried both - RC2 and official drivers and the problem repeats in both situations) and I got the Communication port (COM3) in my device menager (the arduino microcontroller).

Here's my circuit:
Servo connected to arduino 5V (red) and ground(black). signal cable (yellow) connection problem described below.

Here's my problem:
when I connect servo signal cable to the pin I've declared in servo.attach() function (8 in this case) several things occur:
-the OS keeps playing the standart device pluged in and device unplugged sounds in random sequence (for example: plug in 4x, unplugged 2x, plug in... ). This happens as long as the servo signal cable is connected and stops the moment I remove it.
-the communication port (arduino) is not visible in device manager of my computer, and the list refreshes all the time (new device found, device unplugged).
-from time to time I get "Found new device" notification but it says that Unknown device has been connected (looks like the servo wanted to add it self as a new device but no new device is shown in device manager)
-the Arduino IDE Tools > Serial port menu is not available
-no new messages in Serial monitor are shown
-I'm not able to upload any new programs until I disconnect the servo signal cable
-the servo moves as I specified in the code

What may cause that kind of behaviour? How to fix this?

My arduino test code:

#include <Servo.h>

Servo servo;
void setup() {                
  pinMode(13, OUTPUT);     
  servo.attach(8);
  servo.write(90);
  Serial.begin(9600);
}
void loop() {
  servo.write(90);
  Serial.println("90");
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  servo.write(45);
  Serial.println("45");
  delay(1000);      // wait for a second
 }

The Arduino can't provide enough power for itself and a servo. Use an external power supply for the servo. Connect the grounds of the external power to the Arduino ground.

Arduino can't provide that kind of power? I won't check that until tommorow but it's hard to belive in for me. Especially that the specification of the servo (HS 645MG) says that it operational voltage is between 4.8V and 6V (changing the torque respectively) and the servo moves as it's supposed to: the problem is that it blocks the serial communication.

Any other suggestions?

it's hard to belive in for me. Especially that the specification of the servo (HS 645MG) says that it operational voltage is between 4.8V and 6V

Voltage isn't the issue (well, not directly), but current is.

gr4jp3r:
Arduino can't provide that kind of power? I won't check that until tommorow but it's hard to belive in for me. Especially that the specification of the servo (HS 645MG) says that it operational voltage is between 4.8V and 6V (changing the torque respectively) and the servo moves as it's supposed to: the problem is that it blocks the serial communication.

Any other suggestions?

What is happening is that the Arduino is repeatedly power cycling because it cannot provide enough power for itself and the servo. When the Arduino loses power, it loses all communications with the serial port. The MORE SERIOUS problem is that YOU WILL DESTROY the Arduino if you keep treating it like this.

You don't HAVE to believe what those of us with DECADES OF EXPERIENCE in electronics tell you about this. You don't have to believe what those of us that have used Arduino for YEARS tell you about this. Your choice.

Since you are so certain that NONE OF US know what is happening, let me just leave a couple of things here for you:

From the Arduino website:

DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA

From the ServoCity website regarding the HS-645MG:

Current Drain (4.8V): 8.8mA/idle and 350mA no load operating
Current Drain (6.0V): 9.1mA/idle and 450mA no load operating

Now I'm just a simple man, but in MY WORLD a device (the Arduino) that can provide 40ma is NEVER GOING TO FUNCTION PROPERLY when trying to power a device (the HS-645MG servo) that requires AT LEAST 350ma when operating. That means that the servo requires 8.75 times MORE current than the Arduino can provide.

But hey, it's your right not to believe this. PLEASE let me know once you have managed to change the laws of physics so that your hypothesis will work.

Now I'm just a simple man, but in MY WORLD a device (the Arduino) that can provide 40ma is NEVER GOING TO FUNCTION PROPERLY when trying to power a device (the HS-645MG servo) that requires AT LEAST 350ma when operating. That means that the servo requires 8.75 times MORE current than the Arduino can provide.

To be fair to the OP, I don't believe (I hope) that it was ever said that the servo was being supplied from an I/O pin, I assumed that the supply was coming from the supply rail.
Maybe the OP can post a schematic.

A basic servo wiring setup.

@kd7eir
I don't get what your problem is, I don't want to know. I don't want to start an argument either. Please, next time, if you're going to write something like this: don't. I think no one needs info given the way you did it. You're just ruining the joy of using Arduino.
I wrote that it's hard to belive in for me because I used few servos with an arduino before and never got any problem with that, never said that what dxw00d wrote is not possible.

Nevertheless, I would like to thank everyone for their anwsers.