I’d like to connect a micro-usb female breakout board to my particle electron so I can charge it inside an enclosure I built for it. I realize that I could use a simple female to male adapter and charge it that way, but I’d actually like to prevent any data transfer through the USB port when charging, meaning I would only hook up the the 5V and GND connections on the breakout board linked above. My question is where to put these on the particle board. I see that there is a VIN pin as well as as the VUSB pin, and I’m not sure which one to use. Will the battery still charge when hooked up to either one?
If you are confident that the breakout board would definitely not output more that
5.0v, you can connect to VIn.
There’s a schottky diode on Vusb and that gives you protection against reverse polarity but at a some of some power loss.
Actually that diode protects the USB from being fed via Vin. So when powering via Vin there is no diode between the pin and the regulator.
But in case you may be powering from USB and Vin at the same time you may want to add your own protection diode to protect your own source against the USB voltage.
I’m not to worried about that, the end user won’t have access to the port on the board and hopefully I’ll be smart enough not to do that when I’m playing with it.