Arduino Uno USB mystery

Hello,

I’ve found quiet a mystery and would like to hear your opinions on the topic.

TLDR: Computers do something on the USB port that interferes with my arduino code in runtime.

The story:

I have an Arduino Uno R4 Minima and a Nano.

The circuit is extremely simple: Jumper wires connect the GND and 5V pins on the two devices plus 1 wire between two Digital pins. Furthermore there is a 2x16 LCD connected to the Uno also with jumper wires.

The task: The Nano sends a simple message via the digital pin (the pin is not serial pin just a normal pin[D6]), the uno receives said message and displays it on the LCD.

I put the codes together and it works fine. Until it doesn’t. You see it only works if the Uno is powered by a computer or laptop. If i try to power it from any other source it stops right after startup.

  • Powering it from my desktop PC → 5 VDC → It works
  • Powering it from my wifes desktop PC → 5 VDC → It works
  • Powering it from my work laptop (turned off but gives off power) → 5 VDC → It doesn’t work
  • Powering it from my work laptop (turned on) → 5 VDC → It works
  • Powering it from 35W charger → 5 VDC → It doesn’t work
  • Powering it from power supply via Vin + GND pins → 12 VDC → It doesn’t work
  • Powering it from a power bank → 5 VDC → It doesn’t work
  • Powering it via power jack → 9 VDC → It doesn’t work

There are no serial dependencies in the code. Not even “serial begin” or print. The weird thing is that from all the PCs and laptops i’ve tried with, only mine has the IDE installed and my work laptop (as always) has most USB rights and everything revoked and it still works when powered via that.

Just out of curiousity, what might cause this?

Please rework your list and include the VOLTAGE being supplied in each case.

There, i updated the list with the voltages.

Thanks! I know my HP laptops turn off the USB when the screen saver blanks the screen. Could that be one of the problems with your laptops?

No, it gives off enough power even when turned off. Basically I can use it as a big clumsy power bank. The LCD init finishes and even the backlight is on max brightness.

Are you absolutely sure that there is a common ground between the UNO and Nano?

Plugging both into the PC USB port would establish a common ground via the PC chassis. The power bank and I would wager the 35W charger are independent ungrounded sources. Not sure about the remaining power sources as I am not sure what they are. If the ground connection was missing, mis-wired or intermittent, then the UNO would be "floating".

Yes, 100% sure. In fact when it is working plugged into the PC only the UNO is connected to the PC. The nano is just “dangling” on the jumper wires.

I also checked the signal on both the Nano an Uno side with a scope and it is being sent correctly, and also arrives at the destination pin correctly. (measured it against their own respective GNDs)

Which pins?

D6-D6 on both devices.

Could you draw the schematic?

Data is A4
Clock is A5
Swapped in the drawing.

Is there any code waiting for a Serial.begin?
Maybe some code left from a previous project.

This suggest that power alone "does not work" , while the PC is off the USB Data is also off.

Nope, no serial dependency at all. Nothing waits, nothing prints.