When you plug in USB, that'd take over - so the voltage on the pins marked 'Bat' will be 4.7v (5v minus the diode's voltage drop). Then when you unplug it, the battery voltage will take over (with no diode voltage drop) giving you 4v.
The pins marked 'Bat' are different to the JST connector though. Basically the 'Bat' pins are the voltage after it's been through the smart switchover between USB and battery - so only connect a battery via the JST connector. If you connect it to 'Bat' then it'll get charged up to 4.7v (which is almost certainly not what you want :) )
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Hellis,
When you plug in USB, that'd take over - so the voltage on the pins marked 'Bat' will be 4.7v (5v minus the diode's voltage drop). Then when you unplug it, the battery voltage will take over (with no diode voltage drop) giving you 4v.
The pins marked 'Bat' are different to the JST connector though. Basically the 'Bat' pins are the voltage after it's been through the smart switchover between USB and battery - so only connect a battery via the JST connector. If you connect it to 'Bat' then it'll get charged up to 4.7v (which is almost certainly not what you want :) )
There's more info, including a circuit diagram, under the 'power' heading on this page.