I am developing a board that will need both USB and battery power options, non switched. I put this schematic together that I think is right, but I want to make sure I'm not going to blow the chip. I'm using an STM32F405 100 pin. The nets in the Power Schematic are VIN (From USB), up to VUSB (goes to PA09 on MCU) and then 3.3V output after the LDO regulator

Is this the proper schematic for a USB / Battery powered MCU? I think with this design I can use either 3, or 4 AAs without having to worry about the excess voltage on the VUSB net. The 3.3v should be protected by the LDO, and each power input from each other by the diodes.

I just want to make sure my placement of the components is correct and will not blow my chip if it's being powered by either, and often times both if I'm programming via USB.

*EDIT Something like this?

*EDIT 2 Here are the updates after comments.

*EDIT 3 VBus directly to VIN. Is this what you meant?

*EDIT 4 This looks a little better I think USB Power

  • \$\begingroup\$ I updated the question with the 1K resistor between the gate of Q1 and VIN. How does that look? \$\endgroup\$ – TyrantUT Jul 9 '16 at 0:19

The circuit looks good and shows a lot of thought went into its design. One thing I would add is a 1K resistor from the gate of Q1 to Vin, mounted as close to the gate as possible. This reduces noise pickup by the mosfet (the gate is very sensitive to HF noise) and protects it against voltage spikes. The gate is protected by built-in diodes but current limiting protects the diodes.


You're quite close -- the regulator will be in dropout at end-of-battery-life with 3 AAs though as 3x0.9V only makes for 2.7V, not enough for a 3.3V LDO. Sticking to 4AAs or USB power is fine though.

Last but not least -- having a TVSS from Vbus to ground as well as TVSSes or clamp diodes for ESD protection on D+/D- is wise.

  • \$\begingroup\$ So remove Q1 and the accompanying resistors. Will that allow the batteries to discharge while powering through USB? My original design had ESD protection on the D+/D- but I removed it. Ill make some adjustments and post another image \$\endgroup\$ – TyrantUT Jul 9 '16 at 0:36
  • \$\begingroup\$ @TyrantUT -- ah, I see -- you want USB to dominate all the time, even if Vbat > Vusb. \$\endgroup\$ – ThreePhaseEel Jul 9 '16 at 0:44
  • \$\begingroup\$ A few more question. What would be a good ESC module to use that isn't dual port? I can only find dual port modules like the IP4220Z6. Also, put 4.7K on the VIN side, then 10K on the ground side? \$\endgroup\$ – TyrantUT Jul 9 '16 at 0:49
  • \$\begingroup\$ Yes, I would prefer USB to power the chip if its plugged in, that way I'm not draining batteries while programming. \$\endgroup\$ – TyrantUT Jul 9 '16 at 0:50
  • \$\begingroup\$ I just made the adjustments. How does that look? \$\endgroup\$ – TyrantUT Jul 9 '16 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.