Arduino not being detected

Discuss everything related to Arduino - Open-source electronic prototyping platform allowing to create interactive electronic objects.
Abhinav
Posts: 3
Joined: Wed Oct 03, 2012 12:33 pm

Arduino not being detected

Postby Abhinav » Wed Oct 03, 2012 1:12 pm

hi,

i purchased an arduino uno r3 from explore labs...it working fine, but suddenly the device could not be detected. the following error was encountered
"Serial port 'COM6' not found. Did you select the right one from the tool>Serial Port menu?"
The following circuit diagram depicts the last connections made from the arduino


ALso this was the final code used:


(Note: The code was for two motors, but was converted to be used with a single motor, so please ignore the redundancy)
#define motor1pole1 2
#define motor1pole2 3

#define enablePin1 9

#define M1_MAX_SPEED 255

#define motordelay 30
#define debugmotorsec 3000

void setup() {
Serial.begin(9600);

// set mapped L293D motor1 and motor 2 enable pins on Arduino to output (to turn on/off motor1 and motor2 via L293D)
pinMode(enablePin1, OUTPUT);

// set mapped motor poles to Arduino pins (via L293D)
pinMode( motor1pole1 , OUTPUT);
pinMode( motor1pole2, OUTPUT);

motorspeed(0);
}

int mspeed = 100; // pick a starting speed up to 255

void loop() {

// set speed of motor 1 and 2 to same speed
motorspeed(mspeed);

// spin motor 1 only in one direction
Serial.print("MOTOR 1 FORWARD @ SPEED: ");
Serial.println(mspeed);
motorforward(1);
delay(debugmotorsec);
motorstop(1);

// spin motor 1 only in opposite direction
Serial.print("MOTOR 1 BACK @ SPEED: ");
Serial.println(mspeed);
motorback(1);
delay(3000);
motorstop(1);

// stop both motors 1
Serial.println("MOTOR 1 STOP FOR 2 SEC.");
motorstop(1);
delay(2000);

mspeed += 50; // add 50 to speed of motor spin. Max speed 255

// set speed of motor 1 and 2 to same new speed
motorspeed(mspeed);

}

// MOTOR FUNCTIONS

void motorstop(int motornum){
delay(motordelay);
if (motornum == 1) {
digitalWrite(motor1pole1, LOW);
digitalWrite(motor1pole2, LOW);
}
delay(motordelay);
}

void motorforward(int motornum){
if (motornum == 1) {
digitalWrite(motor1pole1, HIGH);
digitalWrite(motor1pole2, LOW);
}
delay(motordelay);
}

void motorback(int motornum){
if (motornum == 1) {
digitalWrite(motor1pole1, LOW);
digitalWrite(motor1pole2, HIGH);
}
delay(motordelay);
}

void motorspeed(int motor1speed) {
if (motor1speed > M1_MAX_SPEED ) motor1speed = M1_MAX_SPEED; // limit top speed
if (motor1speed < 0) motor1speed = 0; // keep motor above 0
analogWrite(enablePin1, motor1speed);

}
Attachments
circuit diag.jpg
Circuit diagram
circuit diag.jpg (102.46 KiB) Viewed 3614 times
Abhinav
Posts: 3
Joined: Wed Oct 03, 2012 12:33 pm

Re: Arduino not being detected

Postby Abhinav » Wed Oct 03, 2012 1:24 pm

i would also like to add to the above post the following points

although the arduino is not being detected however the power led and TX and RX leds are on.
power given to the motor controller (L293d) was 5v and 12v at the power ports.
abhimanyu
Posts: 94
Joined: Tue Oct 18, 2011 9:49 pm

Re: Arduino not being detected

Postby abhimanyu » Thu Oct 04, 2012 7:51 pm

Were you able to successfully run the above code before your Arduino stopped working?
Abhinav
Posts: 3
Joined: Wed Oct 03, 2012 12:33 pm

Re: Arduino not being detected

Postby Abhinav » Fri Oct 05, 2012 5:41 pm

yes we were able to successfully upload and run the code (the code was run without the making the connections to the motor controller and the motor)

another thing i would like to add is that I might have interchanged the 12v and 5v supply voltage to the the motor controller (l293d), but this would have damaged the motor controller and not the ardiuino.
abhimanyu
Posts: 94
Joined: Tue Oct 18, 2011 9:49 pm

Re: Arduino not being detected

Postby abhimanyu » Fri Oct 05, 2012 7:13 pm

Usually, only the Arduino pins which are connected to the Motor Controller (L293D) might have got damaged. There is no protection for high voltage (> 5.5V) on individual digital I/O pins of Arduino. See Method #3.

There might be a possibility that the high current from 12V supply damaged the Logic Level Supply (Vss) pin of L293D, which in turn would have damaged the Arduino's pins (due to internal connections).

For troubleshooting, see if the Fuse on the Arduino board has continuity or not using a multimeter. It should 'beep'.
It is a golden coloured SMD component between the USB Jack and DC Jack marked 'S01N'.

Return to “Arduino”

Who is online

Users browsing this forum: No registered users and 1 guest