• Hi Gordon!
    Q2 pulls up the USB_DP to VDD according to the USB_DISC signal from c13. Is It for charging accums with embedded controllers, or someth else?
    Thanks!

  • Hi,

    Just for others, @Andrey is talking about the schematic on http://www.espruino.com/EspruinoBoard

    The arrangement is because you want to be able to swap from battery power to USB power. While I could use a diode between the battery and voltage regulator (like is done for USB), that would introduce (at minimum) a 0.3v voltage drop - which isn't good for running off of 3.7v Lithium batteries.

    Instead the FET is used so that when USB is unplugged it turns on and there is no voltage drop.

    On the new Pico board I've also connected that transistor to a pin on the Espruino, allowing you to use it as a powered output (or to force the battery to be charged from USB!).

  • Ohh, sorry Gordon, I meant Q1 (not Q2) transistor.

  • Ahh ok - basically in order to tell a PC when a device is connected you need a pull-up resistor. The transistor allows you to switch that on and off, so the board can disconnect itself. It's more useful when it goes to sleep, and then it can effectively tell the PC it's been unplugged.

    Newer STM32 chips have it all built-in I think, but the F103 doesn't and needs it externally.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

What's the function of transistor Q2 in Espruino scheme?

Posted by Avatar for Andrey @Andrey

Actions