New arduino stops working overnight

Hi,

I recently got an Arduino Mega 2560 for Christmas. It's dark blue, so I assume it is a clone. On the same day, December 24th, I started trying to make some projects and continued until today. Yesterday was the last time it worked. It was perfectly fine, but out of nowhere, it stopped working. I don't know what the problem is. Maybe when I was going to sleep, I disconnected the additional plug, not the USB, but the one for wall adapters. There was a 9V battery adapter attached. Now, the Arduino IDE can't detect any signs of the Arduino Mega. I tried everything and even ordered an Arduino Nano to rewrite the firmware.

Any ideas on how I could make it work properly again? Maybe I am creating a discussion for a topic that is already here, but I couldn't really find it.

Thanks to everyone who will share some tips or solutions to make it work again.

Not really, as we don’t have enough information about your setup. What was running when it failed? Please post the code you were using, and we’ll take a look.

It could also be a hardware issue. To help diagnose the problem, please provide:

  1. An annotated schematic showing all hardware components, including resistors, capacitors, etc.
  2. Links to the technical documentation for the hardware devices.
  3. Details about any LEDs that are on or blinking, labeled clearly (e.g., Tx, Rx, etc.).

With this information, we’ll be better equipped to assist you.

i had a last code (or i have, idk if it was deleted somehow), that was turning on a relay from ir receiver:

#include <IRremote.h>


const int RECV_PIN = 11;
const int RELAY_PIN = 7;

void setup() {
  Serial.begin(9600);
  IrReceiver.begin(RECV_PIN, ENABLE_LED_FEEDBACK);  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, LOW); 
}

void loop() {
  static unsigned long lastReceiveTime = 0;

  if (IrReceiver.decode()) {
    Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX); 
    
    if (IrReceiver.decodedIRData.command == 0x43 && IrReceiver.decodedIRData.address == 0x0) {
      digitalWrite(RELAY_PIN, HIGH); 
      lastReceiveTime = millis(); 
    }

    if (IrReceiver.decodedIRData.decodedRawData == 0xFFFFFFFF) {
      lastReceiveTime = millis();
    }

    IrReceiver.resume();
  }

   if (millis() - lastReceiveTime > 107) {
    digitalWrite(RELAY_PIN, LOW); 
  }
}

i'il draw a schematic

Great that should get you an accurate answer.


I had this connection, on time, when it last worked. On the end of the yesterday, i plugged of the 9v battery, which was the power supply for the board. Today, with same connection, i plugged the board back to pc, and pc hasn't detected any board, or even in device manager, nothing.

and when i try to connect the board to pc, pc wont play any sound of plugged device

Hi @lubajz. It is possible for a short or external circuitry connected to the Arduino board to cause it to no longer produce a port.

Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Make sure there isn't any conductive debris (e.g., strands of wire or component leads) on the board or on the surface the board is sitting on.

If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Disconnect any shields, modules, external circuitry, etc. from your board.
  3. Connect the Arduino board to your computer with a USB cable.

Now check to see whether a port is shown for the board in Arduino IDE's Tools > Port menu. If it does, you know the problem was caused by the external circuitry. You can then focus your attention on identifying the specific problem with the circuit and resolving it.

Should not connect the USB while supplying external power unless both potentials are the same.

What was attached to the 9 volt battery adapter?

my computer doesn't recognize the arduino at all, not even in device manager, nowhere

oh, i didn't know that, i had connected 9v battery and usb cable, is there any option to fix this, there is burned some fuse, or diode, something?

9v battery

if the arduino cant detect any signs of ur arduino mega you can do this:

  1. the 9v battery has fried your arduino mega but this possibilty has a low chance.
  2. you can burn the bootloader and if the led blink then there is probably not any problem with your hardware.
  3. check if there is this error 'the system cannot find the file specified'.

I haven't tried flashing the bootloader yet, I'm still waiting for the arduino nano to arrive so I can try it

Verify your computer USB works with anything that creates a system chime.
Verify your USB cable works.
Test your "bad" board with the good USB cable in "this" computer and another computer - listen for system chime.

What do you find?

Did you plug it in the barrel jack or VIN port Correctly? And you shouldn't connect barrel jack or VIN to power supply while usb is in. If it stop working, try disconnecting everything and connect it, if it's not working, you either broke the usb port (PC or mega) or cable. And is your communication chip CH340 (rectangle) or ATMEGA8u-16u(square)? If it's rectangle it means the 340 chip might be broken here, if it's square you might've broken everything. Does your Arduino L led blink when you press reset? I had an original Uno break on me (the atmega8u-16u) but the 328(The main chip) was fine, if it's an original or a clone with atmega8-u or 16-u and it has one extra icsp looking port which is the programmer port, you miight get away with Serial or FTDI programmer

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