Pages: [1]   Go Down
Author Topic: Arduino becomes unidentified after connecting servo signal cable  (Read 1409 times)
0 Members and 1 Guest are viewing this topic.
Poznań
Offline Offline
Newbie
*
Karma: 1
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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
 }
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Poznań
Offline Offline
Newbie
*
Karma: 1
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

« Last Edit: October 07, 2012, 10:13:43 am by gr4jp3r » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26332
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 8
Posts: 317
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: October 07, 2012, 03:55:06 pm by kd7eir » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26332
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9631
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A basic servo wiring setup.

Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Poznań
Offline Offline
Newbie
*
Karma: 1
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
« Last Edit: October 07, 2012, 04:40:16 pm by gr4jp3r » Logged

Pages: [1]   Go Up
Jump to: