3

Arduino | external power supply and USB at the same time

I have got an Arduino Mega 2560 project with many sensor and outputs. Right now I’m supplying it with an external stabilized 5V over the 5V pin (so that I’m using only one power source for all sensor, outputs and Arduino.)

I also have a Raspberry PI connected to the Arduino via USB for flashing and also logging. The Raspberry PI has got an external power supply (and also a board with SSD.)

The problem: If I unplug the RPI external power supply, the Arduino Mega is supplying the RPI with power!!! That’s exactly what I do not want. (Also it’s far too little power for RPI, which isn’t even booting correctly.) Even when I power the Arduino Mega 2560 over the barrel plug (stable 9V), the RPI will be provided with a 5V over the USB cable.

I’m looking in the electrical wiring diagram: I can see the FDN304V The comparison circuit (LM358D) controls this p-channel mosfet FPN340P. But why is it USBVCC connected if the Gate provides 5V over the LM358D?

enter image description here

I saw this interesting articles but I'm a bit confused:

https://arduino.stackexchange.com/questions/893/what-happens-if-i-power-the-arduino-with-both-the-usb-and-external-power-voltage

What happens if I power the Arduino with both the USB and external power voltage simultaneously?

jsotola
  • 1,554
  • 2
  • 12
  • 20
stevo
  • 51
  • 3

1 Answers1

2

Assuming your question is more along the lines of "How to prevent back driving a USB connected RPi through an externally powered Arduino".

Consider cutting the positive power wire in the USB cable connected between the RPi and the Arduino.

As for this specific question:

But why is it USBVCC connected if the Gate provides 5V over the LM358D?

Is it possible you are describing how a N-Channel MOSFET works? The MOSFET in the schematic is a P-Channel MOSFET. The net USBVCC is connected to the net +5V when the P-Channel MOSFET gate is LOW. And is not connected when the gate is HIGH.

st2000
  • 7,513
  • 2
  • 13
  • 19