Powering through VIN while USB is connected at the same time



  • Hello everybody!

    I am using the LoPy4 microcontroller in combination with Expansion Board 3.0. My project requires occasional serial readings (connection via USB) while the board is being fed by a 1S LiPo. Due to specific requirements, the LiPo battery is connected directly to VIN rather than the onboard PH socket (which I assume ends up at VIN as well).

    I've read about different microcontrollers with the same situation, with some being able and some not being able to handle this scenario, I was wondering whether anyone has info/experience if this works with a LoPy.

    Cheers.


  • Global Moderator

    Hi,
    I would not recommend powering through Vin with a battery and USB at the same time. As the 5V from the USB will start charging your battery connected on Vin. When connecting to the battery terminal, there is a detection circuit that switches the power source of Vin between USB and battery to not put 5V on the battery lines.



  • @Nunya-Bidness said in Powering through VIN while USB is connected at the same time:

    rather than the onboard PH socket (which I assume ends up at VIN as well).

    Actually not, since there is a charging circuitry and a power switch on board. The latter is located between VUSB and VBattery as inputs and VIN as output. Like @jcaron implied, it is not clear whether Vin and VUSB are decoupled. In any case you must avoid that the board is supplied through USB while the battery is connected to VIN. It would be charged with all power the USB port can supply, which may not be good and may overload the supply switch.



  • @Nunya-Bidness You will probably need to use a modified USB cable without power to avoid any issues.

    However, I suppose it's probably best if you have a common ground.



  • @Nunya-Bidness
    I do not know it i understand you correctly.
    But LoPy do not recognize power source, than any should work.
    Only it must have enought power and voltage. If it is above 3.5V and lower then 5.5V and have 0.5 A in peak then i see no problem.


Log in to reply
 

Pycom on Twitter