STM32F405 with both USB and Battery power

Discussion in 'Power Electronics' started by TyrantUT 1, Jul 7, 2016.

  1. TyrantUT 1

    Thread Starter New Member

    Jul 7, 2016
    4
    0
    I am developing a project that can be run from either USB or Battery power (4 AAs) and I'm having some trouble with the schematics. I don't want to fry the chip since these things are fairly expensive.

    Here are my schematics for the power circuit, and the USB circuit. Any help with this would be extremely helpful, so thank you in advance!

    [​IMG]

    [​IMG]
     
  2. Marcus2012

    Member

    Feb 22, 2015
    349
    26
    Hi

    The 6V from your battery and the following 0.7V drop from D1 will result in too low a voltage for the regulator (which needs an input voltage at least 1V higher than the output). Also I am a little confused where your USB power attaches to your regulator circuit. Your USB power goes to "VIN" but then "VIN" on your regulator schematic then goes into the 5V regulator. This is unnecessary as the USB power is already regulated. USB power can go directly to the 3.3V regulator and so can the batteries and D1. The 1117 regulators have a maximum input voltage of 15V (but check the sheet for the one you have of course :)). No need for the 5V regulator unless you actually need 5V for something.
     
  3. TyrantUT 1

    Thread Starter New Member

    Jul 7, 2016
    4
    0
    [​IMG]
    http://pasteboard.co/8OZGJTUlb.png

    I checked out some other information on stackexchange and I see there is a p-mosfet being used to help control the power input.
    I removed the 5v voltage regulator as you said, and added the p-mosfet (Vishay Si3481DV)
    The VUSB goes into PA9 (AF USB_FS_VBUS)
    This should help account for the voltage drop incoming from USB, but what about from battery? Is the chip able to handle over 5v on the VBUS pin?
     
  4. Marcus2012

    Member

    Feb 22, 2015
    349
    26
    Page 77 of the datasheet states that there is a 4V absolute maximum on VIN. Not sure what the application is for your project but the datasheet seems to mention a VBAT pin for using an external battery and an example power supply scheme is shown on page76.


    STM32F405xx
     
  5. TyrantUT 1

    Thread Starter New Member

    Jul 7, 2016
    4
    0
    I think the VBat pin is used as a backup battery but on a switch circuit. I'm trying to stay away from that.
    I think what would be easier, is to use only 3 AA batteries to keep the voltage to 4.8, which should be OK with the .7 voltage drop of the SC diode. That way the max is not hit on the VBUS pin (PA9) and the 3.3v regulator can handle the rest.

    Or, I could move the VBUS to behind the diode on the USB VBUS input, so that goes directly to VBUS (Since it will only be used when the USB is plugged in anyway). That way there would be no reason for another LDO to regulate. All power will be regulated to 3.3 and reverse current protection would still be in place when both are plugged in at the same time.

    Does that sound right?
     
  6. TyrantUT 1

    Thread Starter New Member

    Jul 7, 2016
    4
    0
    I see most schematics have the VBUS from USB going directly to the VBUS on the STM32F405 on PA9 anyway, so I assume it would be OK. I guess all that is really needed is a 3.3v input, which would be handled be either the batteries (if USB isn't plugged in) or by the USB.
     
Loading...