Power / battery / sleep #5070
Replies: 1 comment
-
Posted at 2015-10-14 by @gfwilliams Hi,
Yes, it should do that automatically.
Absolutely - just make sure you connect the battery using either the JST connector that you can solder to the bottom, or via the
Nope, it's actually fine. The GPIOs keep working (including pullups/etc) - just use the button like you would do normally and it'll keep working with deep sleep.
Absolutely - in fact that's the best way of doing it.
It might not be quite 3.3v because of the circuitry in the IC, but it'll be close. Also you'll only be able to draw around 20mA from it. If you're using the 3.3v you could draw near 400mA (for short periods of time).
Only thing I'd say with that is But that's often fine - the STM32 will run down to something crazy like 2 volts, so you've got a lot of time below 3.3v before you have problems. Posted at 2015-10-14 by Moray Really helpful answers and everything is really thought through on power. Now officially an Espruino fan-boy! Since I live in Oxford you'd better be careful I don't start stalking you :-> Posted at 2015-10-14 by @gfwilliams :) Thanks! Have you ever been to the IoT Oxford or JS Oxford stuff? I'm not going to the JS Oxford one tonight, but generally I have been trying to go the events that they do. Posted at 2015-10-14 by Moray I know quite a few people from JSoxford mostly the White October crowd - I've worked with Ben Foxall a few times. However only recently am I doing more JS myself at work. Good prompt about the IoT group, I've signed up for that and expect I'll see you there some time. It was partly fringe involvement in the Oxford Flood Network (I offered to host a sensor and relay its data) that got me into this though my current project has nothing to do with that. Posted at 2015-10-16 by Moray Just a follow-up question on deep sleep - if 3.3v pin and GPIO pins stay on during deep sleep, presumably I am better powering sensors from a controllable GPIO pin so as to minimise draw during deep sleep, something like the code below. For larger stuff that needs more current than a controllable pin can supply, presumably I need a transistor connected to 3.3V, the controllable pin and common ground in order to switch them off during deep sleep?
Posted at 2015-10-20 by @gfwilliams Yes, that's a good idea. For maximum power saving, actually turn the pin into an input with However I'd look at the datasheet for the device to make sure. Some of them can be put into low power modes using software, so you could save a bit of wiring :) Just so you know - |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-10-14 by Moray
I'm new to battery-powering. A few questions I hope you can help me with
The docs say that the Pico will not enter deep sleep while on USB power. Will it wake from deep sleep when USB power arrives, or can it be configured to do so?
If I comnect both battery and USB I presume this is safe but will there be zero draw from the battery while USB is connected?
Next two questions are probably electronics ones which I am again new to:
When deep sleep is entered, sounds like 3.3V output on the Pico will be off. Therefore to create a "wake on push" button, I would plan to wire the button directly between battery and a pin I can monitor, but I am unsure how to wire this so that it won't interfere with the "normal" circuit.
Lastly, if I want to use both VBat and 3.3V outputs, can the circuits share the same ground? I would assume not, but maybe it is safe to ground through another pin set to 0v? And if I just set a pin to 1 using digitalWrite, I assume that is a 3.3 v output, and if so how does it differ from the main 3.3V output, other than that the latter is always on?
Saw the very helpful tip on another thread about measuring incoming battery voltage through E.getAnalogVRef in another thread - thanks Gordon.
Beta Was this translation helpful? Give feedback.
All reactions