Hi, I'm very new at electronics so please bear with me.
I've made a shield for an Arduino Mega 2560 R3 and it doesn't seem to run when powered externally, even though it gets power and reading 5V.
The shield is powered by a 5V power supply (the kind you use for LEDs, 10 amps) directly through the 5V pin and connected to the PC with a USB with no power.
It works fine when connected with the PC using a normal USB, and also works fine using another shield and the same external PSU/powerless USB. This other shield is a proper purchased one.
Sounds like I may have screwed something up in my shield but can't really figure out what it could be. I've read through the forum and there are some suggestions to try either a pull up/down resistor on the RX, or a small capacitor between RX/TX. I haven't tried these as I'm out right now.
The strange thing is that the Arduino did work in my setup to begin with, then it stopped and worked intermittently (had to reconnect with a normal USB/no external power and then reconnect with my setup to get it to work).
Thanks in advance for any guidance/ideas on what to test or pinpoint the issue.
@sterretje Thanks for your reply. Sorry I was out and didn't have access to the schematic. It's basically a breakout board for a bunch of stuff I need to connect to it, mostly switches and a couple of LEDs.
I do have a multimeter I get a stable 5V (a bit more can't remember exactly how much maybe 5.04?) and also 3.29V in the 3.3V pins.
Forgot to mention the Arduino is recognised by Windows but I can't seem to be able to make it run its program or open the serial port using the Arduino IDE.
Here's what I got when exporting, hope that's what you asked? It's a 4 layer, with the top & bottom attached and the other 2 layers being 5V & GND . PCB_Shield_PCB_1_2025-02-18.pdf (649.9 KB)
EDIT: @jim-p, checked the USB cable and ground is still there, only 5v cable not connected.
PSU is one of these:
5V 12V 24V 36V Power Supply SMPS 5 12 24 36 V AC DC 220V TO 5V 12V 24V 36V 1A 2A 3A 5A 10A 20A 30A Switching Power Supply SMPS https://a.aliexpress.com/_mMbB7cR
I don't remember about the cable, made it like a year ago. Will check it tomorrow. For what it's worth, it does work with the other shield and same arduino.
Done some more testing. Tried connecting the 10K resistor on RX and it seemed promising at first, Arduino seems responsive, can upload new sketches to it and did some more testing. I've upload a simple sketch that lights a LED, prints something in the Serial monitor and has a 3 sec delay. Tested it using a normal USB cable with no problem at all.
When connecting the Arduino with the external PSU, it worked fine for 2 or 3 loops and then it stops printing, however the LED keeps looping correctly.
I really have no idea what the problem could be, it seems related to the Serial connection. Any idea will be appreciated.
I now see the problem.
USB communications will not work unless you have USB power, so cutting the USB power wire and supplying external 5V will not work.
However connecting USB power AND external 5V can be disastrous since current can flow from USB to external 5V
So if you want to have USB communications and external 5V, then connect the external 5V through a schottky diode and use a normal USB cable.
Thanks, the part that still confuses me is that obviously there is serial communication though USB. PC recognises the Arduino, I can upload a sketch and it outputs on the serial monitor, though for a couple of loops only.
That will be quite problematic.
There is a USB to UART bridge IC on the board (Atmega16u2). When you supply external power it is unpowered, so you won't have USB communications. However, somehow it's getting some temporary power, maybe from energy stored on a capacitor or some other unknown path, like those resistors you added.
In any case if you want reliable USB communications you need USB power.
Remove any modifications you have made and add the diode.