• A Schottky diode would be better, but it may not be good enough.

    The differences in brightness are what you'd expect given the different voltages I'm afraid. If you're not tied to using a coin cell then you could instead use a LiPo battery - those supply 3.7v(ish) and would provide enough voltage to keep 3.3v on the microcontroller most of the time - plus they are rechargeable :)

    As @maze1980 points out, the diodes aren't the best way to do things, but they are easy! Another thing I do with the Original and Pico boards is the circuit shown here: https://www.espruino.com/Original#power

    Looks compilicated but you only care about the left-hand half. Basically you use a diode for USB where you have enough voltage to spare, and then you use a PFET (a p-channel field effect transistor) across the battery that is controlled from USB power. That way when there's no USB power the battery is used, and when there is, the battery is disconnected and everything is powered through the diode.

About

Avatar for Gordon @Gordon started