Not detecting arduino uno port

Hi,

OS: Windows 10
Board: Arduino UNO

So i am making prject using arduino uno and i had installed arduino IDE onto my windows, for the first 2 weeks it was working fine until for some reason it now no longer detects the port

I tried looking in my device manager for "port" or "other devices" however there is no port tab and arduino doesn't appear on other devices

I have tried to go the arduino IDE menu and click on tool -> ports however it stays greyed out

I have tried using a different cable than the normal USB to Arduino with a printer cable but it has not changed the problem


I can show you the circuit diagram i am using if that helps

And here is the code i wish to upload to the arduino if it helps

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DS1302.h>

// Set the LCD address to 0x3F for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x3F, 16, 2);

// Define your variables
int Hour;
int Min;
int Sec;
int period;
int in1 = 8; 
int in2 = 9;
int activate = 0;

// Create an instance of the DS1302 class
DS1302 rtc(2, 3, 4); // Adjust the pin numbers as needed

void setup() {
    pinMode(in1, OUTPUT);
    pinMode(in2, OUTPUT); 

    // Set the clock to run-mode, and disable the write protection
    rtc.halt(false);
    rtc.writeProtect(false);

    // Setup LCD to 16x2 characters
    lcd.begin(16, 2); // Corrected to include number of columns and rows
    Serial.begin(9600);

    // Get the current time from the RTC
    Time t = rtc.time(); // Retrieve the current time

    // Print the current time to the Serial Monitor
    Serial.print("Current Time: ");
    Serial.print(t.hr);
    Serial.print(":");
    Serial.print(t.min);
    Serial.print(":");
    Serial.println(t.sec);
}

void loop() {
    // Get the current time from the RTC
    Time t = rtc.time(); // Retrieve the current time again in loop
    Hour = t.hr;
    Min = t.min;
    Sec = t.sec;

    // Display time on the right corner upper line
    lcd.setCursor(0, 0);
    lcd.print("Time: ");
    lcd.setCursor(6, 0);
    lcd.print(Hour);
    lcd.print(":");
    lcd.print(Min);
    lcd.print(":");
    lcd.print(Sec);

    // Display Period Number
    lcd.setCursor(0, 1);
    lcd.print("Period No: ");
    lcd.setCursor(11, 1);
    lcd.print(period);

    // Period timing, when bell will ring
    if ((Hour == 7 && Min == 0 && Sec == 5) || 
        (Hour == 7 && Min == 30 && Sec == 5) || 
        (Hour == 8 && Min == 0 && Sec == 5) || 
        (Hour == 8 && Min == 30 && Sec == 5) || 
        (Hour == 9 && Min == 30 && Sec == 5) || 
        (Hour == 10 && Min == 0 && Sec == 5) || 
        (Hour == 10 && Min == 30 && Sec == 5) || 
        (Hour == 11 && Min == 0 && Sec == 5)) {
        
        digitalWrite(in1, HIGH); 
        digitalWrite(in2, LOW);
        Serial.println("motor is running");
        if (activate == 0) {
            period = period + 1;
            activate = 1;
        }
    } else if (Hour == 9 && Min == 0 && Sec == 7) { // Recess break time
        digitalWrite(in1, HIGH); 
        digitalWrite(in2, LOW);
        lcd.setCursor(11, 1);
        lcd.print("Break");
        delay(500);
        lcd.clear();
    } else if (Hour == 11 && Min == 30 && Sec == 7) { // School time over
        digitalWrite(in1, HIGH); 
        digitalWrite(in2, LOW);
        lcd.setCursor(11, 1);
        lcd.print("Over");
        period = 0;
        delay(500);
        lcd.clear();
    } else { // Stop motor
        digitalWrite(in1, LOW); 
        digitalWrite(in2, LOW);
        activate = 0;
    }

    delay(500);
}

I am so confused and would appreciate any help if possible
Sorry for any mistakes

Maybe you fried something by connecting 5V pin to 6V battery...
Is Arduino still running the previous program correctly?

Did you try with some other device, if it gets detected when you connect it to that laptop usb-port?

I've moved your topic to a location on the forum that's more suitable to upload and board detection problems.

If Windows does not detect your board

  1. Bad connection.
  2. The IC closest to the USB port is malfunctioning. It looks like a 16U2 in which case you can try to re-install its firmware using e.g. Atmel flip.
  3. USB port on the PC malfunctioning.

I have had the "NO BOARDS FOUND" problem a few times but have not managed to make it happen in a controlled way so that I could report it for investigation and fixing

Closing all instances of the IDE and restarting it seems to put things right until the next time

Did your board also not show up in your operating system under those circumstances? I seem to remember that you're using Windows.

I am using Windows and the board COM port is visible to the OS as normal, at least as far as I remember. I cannot ever remember seeing the "NO PORTS DISCOVERED" message but then again I usually have at least 3 boards, programmers or USB to Serial adapters plugged into USB most of the time

Even if the port was not visible in the OS the IDE should still offer a choice of boards that meet the search criteria in the board/port selection dialogue

OP's board does not seem to show in device manager.

I never use that dialog but decided to test it and I can select a board (I did disconnect my boards). One just has to type (part of) the name.

It is the typing part of the name and being offered matching boards that sometimes fails for me. As I said, I have never been able to reproduce the problem on demand

I suspect that @regalornit may have two separate problems. One related to not seeing the ports (if they were ever created) and the other, which is my problem, of sometimes not being offered boards that match the search

It is a while since I last had the problem and it is possible that I am actually offered matching boards but when selected the "NO BOARDS FOUND FOR" appears

I will make careful notes next time it happens

I encounter the 'NO BOARDS FOUND FOR ""'problem the second time I attempt to use the "Select Other Board and Port" dialog.

Once you type a query in the search field, it will show results. And if you then delete the query it will show the full list of boards as expected.

I don't remember encountering this problem historically, so I suspect it is a regression introduced in a recent version of Arduino IDE (e.g., 2.3.5/2.3.6).

Note that the 'NO BOARDS FOUND FOR ""'problem is not caused by a lack of ports. The screenshot @regalornit shared just happened to illustrate both problems. I think the primary problem they are having is the fact that their board is not producing a port (which we can see is not caused by a problem in Arduino IDE since Device Manager also doesn't discover a port).

You may find the apps listed on my page here will be helpful - especially USBLogView

That bug seems to be tracked here:

I have tried using another arduino entirely and it does recognize so it does seem that the problem lied with the arduino, however i will still ask if there is anyway to fix it or prevent it from happening again

@kmin That could be the case as the previous program no longer runs, i have tried using two AA batteries instead however the LCD does not light up fully. What battery should i use instead?

@UKHeliBob @sterretje I do apologize but i had given the incomplete image as I can serach up the board yet it does not appear automatically

@johnerrington Thanks for the infromation however it does not seem to be the issue at hand as both of my usb ports seem to be 2.0 which have 4 pins

thanks for the help so far, sorry for any inconveniece

Hi @regalornit. It is possible for a short or external circuitry connected to the Arduino board to interfere with its ability to produce a serial port.

Try this experiment:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Disconnect all external circuitry, etc. from your board (this includes the display and motor driver I can see in the picture you shared).
  3. Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board.
  4. Make sure there isn't any conductive debris (e.g., loose beads of solder, strands of wire, or component leads) on the board or on the surface the board is sitting on.
  5. Connect the Arduino board to your computer with a USB cable.

Now check to see if the board is producing a serial port. If it does, try uploading a sketch to the board. Does the upload succeed?

This experiment will determine whether the problem was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

There are many options.
For example you could use 5xAA (7.5V) and power arduino through VIN pin. Then power your display and RTC? from arduino 5V pin.
Powered like this your motor would get ~6V, verify the voltage range of it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.