Vusb protection when powering off external Vin

Started by cornmuffin, January 05, 2024, 08:00:01 PM

cornmuffin

Hi there,

I'm interested in being able to connect the Moteino to an external power source while also communicating via USB. It seems to be advertised that it is ok to connect external power while USB is also connected, which implies there is protection for both the computer's USB port and my external supply (preventing whoever is at a lower voltage from receiving current from the other). However, looking at the schematic for the Moteino M0, I saw that the Vin input printed on the board is actually connected to the VUSB net, which is connected to the USB connector through only a fuse.  There's a diode between the VUSB and VIN nets, but it doesn't really help since the voltage input would be applied at VUSB and not VIN.  So I don't see any protection for either my computer's USB port or my external supply- is that correct?  I can add a diode for my own supply, but was wondering how the computer's USB port should be protected.

Thanks!

Felix

The fuse is for overcurrent, to protect the USB port feom pulling too much current.
The small onboard diode is to prevent current from VIN pin to go into the USB port.
I would however not advise powering it through both sources at a time. It was not designed for that purpose. Usually you provide power either through the battery, or through the VIN pin or through USB (battery is supposed to be plugged in to charge over USB).

cornmuffin

Hi Felix,

Thanks for your response.  From the schematic, it looks like current from VIN pin can go into the USB port, since the pin labeled "VIN" is actually connected to the net "VUSB" and not the net "VIN".  I've looked at this schematic over and over, and it looks like it's simply connected to the wrong side of the diode for the diode to work.

I'm trying to install the Moteino in another system where it'll be powered by a voltage regulator from an external power source.  It'll function independently here most of the time.  However, I'd like to be able to connect a USB to the Moteino to talk to it (for debugging), reprogram, etc while it's still installed. I don't care who powers it, the problem is that I won't be able to disconnect VIN power while I reprogram the Moteino.  Is there a way to make the Moteino work in this application?  I figured 2 diodes would work, but I can't insert one in front of the USB connector. 

Thanks!

Felix

Unfortunately there is no easy way to block one voltage when the other is present. So diodes would be my first thought as well. You may need to hack a cable.