Arduino Nano acting weird when powering through USB

When I connect my Arduino nano with an external power supply, it is working fine. I have a RTC chip and clap switch that are both connected to the external power supply. However, when I put a usb cable from my computer in the Arduino nano instead of the external power supply (RTC chip and clap switch are still on external power), the arduino works, but it can't read the RTC chip anymore and the values from the clap switch are all super weird. When I switch back to external power, the arduino is able to read the RTC chip and values from clap switch are fine. How is this possible? Arduino is working, but the values from RTC and clap switch are weird when the arduino is powered from USB.

When I connect my Arduino nano with an external power supply, it is working fine. I have a RTC chip and clap switch that are both connected to the external power supply. However, when I put a usb cable from my computer in the Arduino nano instead of the external power supply (RTC chip and clap switch are still on external power), the arduino works, but it can't read the RTC chip anymore and the values from the clap switch are all super weird. When I switch back to external power, the arduino is able to read the RTC chip and values from clap switch are fine. How is this possible? Arduino is working, but the values from RTC and clap switch are weird when the arduino is powered from USB.

Did you connect the ground of the external powersupply to the ground of the arduino ? When you plug it in the computer, the arduino doesn't have the same ground as the external PSU.

Hope this helps :)

I tried to connect the GND port of the arduino to the ground of the external power supply, but I still had the same problem. I also tried to connect the Vin port to the external power supply. Then the arduino works if the USB is not plugged in, but when I plug in the USB cable, it starts acting weird again :frowning:

Probably a gnd problem. You failed to show your setup, so can’t really help you.

Could you try powering the arduino with a USB charger so see if it does the same thing as if it's plugged in the computer ? That way, we will see if the problem comes from the arduino or the computer.

How is this possible? Arduino is working, but the values from RTC and clap switch are weird when the arduino is powered from USB.

It is possible if you wire it up wrong.

DON'T CROSS POST!!!!!!!!!!!!!!!!!!!! http://forum.arduino.cc/index.php?topic=500719 I HAVE REPORTED THIS THREAD TO THE MODERATORS

Threads merged.