I have an ATMega2560 R3 board with an ESP8266 on same board. The project works well while is the board is connected to the computer. But it works only for a certain amount of time when the USB cable is not plugged to the computer and have to reset the board.
I am using the power conector with a separate power source.
I have replaced the board with a new one an it happens the same.
Has anyone experienced the same? How could investigate what is happening if I cannot get any logs from the terminal?
Current draw from the 5V pin might be the main factor. The 5V regulator on the board is not suited for higher currents. The 7V (in your case) difference multiplied by the current of all components is converted to heat and there is not much of a heatsink on that regulator.
If you feed directly from USB (5V), the 5V regulator is not used.
I have attached the Arduino to an actual power source, not the power adapter I was using. The max current I can see is using is 0.12A and the regulator is able to deliver 3.3v and 5v with a max current 1A: AMS1117 LDO Regulator Pinout, Datasheet, Features & Equivalents
Shouldn't be enough?
Maybe the adapter I am using is not ok, right? It provides 12v and 1.5A.
Thanks for the tips. I haven't though that could be overheating the board. But something strange is that I had both the power adapter and the USB cable during night and have been working without any issue.
Anyway, I will try first with an actual power source to reproduce it. If it happens the same I will lower the voltage to confirm that's the issue. If it works then I will buy a smaller power adapter.
I have been trying with a proper power supply at 7v and seems to work better. I have ordered two new adjustable power adapters of a better quality. Let's see how they work.
I will let you know. And thank you for the help so far.