Badger2040w power on a USB power bank

Hi All,

Question about Badger2040W power options

As I understand the intended power arrangements on this device,

  1. When USB power is connected, the system remains powered up
  2. When a Lipo or AAA is connected, the system powers down, but wakes when a button is pressed. The RTC keeps ticking on some kind of very low trickle charge.

I recently disconnected the Lipo and then connected a USB power bank to my device.

It’s behaviour appeared to be not quite either of these things.

This is what I saw

A) Navigating the device works fine under USB power bank
B) This includes if I leave it sitting for a minute or two, then push the button
C) The power bank seems to have some kind of timeout and eventually goes to sleep
D) Pushing a button on the Badger does not wake the powerbank. Subsequent button pushes have no effect.
E) Pushing the button on the powerbank does wake the powerbank. Subsequent button pushes navigate badger OS
F) Whilst the powerbank was asleep the RTC had kept on ticking, suggesting that the powerbank doesn’t really fully stop providing energy.

I’m interested to know if anyone understands the complexities of this. For a project I am working on now, I plan to use the badger a little bit each day for a year or so in places where there’s no electrical supply. It therefore needs a pretty hefty battery. I also want to use batteries that are proven safe under environmental conditions, so something like an Anker powerbank is a good choice for me.

I don’t want to go near some kind of USB to stl wire, so preference is to plug a power bank in to the USB socket on Badger, then stick it all in a case of some sort. If I could get the button press to wake the powerbank, that would be the best!

Your observations are correct, especially C).

F) is interesting suggesting that the switch-off circuit of the power-bank is not 100%. The RTC only needs some 200nA (when I remember correctly), so this is indeed possible.

Powerbanks are designed to load other devices like smartphones. They are not designed as power-sources for low-energy devices. They have a switch-off circuit which triggers if the current drawn by the smartphone is low. This usually happens when the smartphone is fully loaded.

Tell me more about “I plan to use the badger a little bit each day for a year or so” and I will try to recommend a solution for you. I am working on a similar project (based on a Pico-W + InkyPack, which is about the same as the Badger2040W). See https://github.com/bablokb/pcb-pico-datalogger/blob/main/power.md for some thoughts about power.

Hi @bablokb

Your project is really interesting and the thoughts on power are really helpful.

My project isn’t dissimilar from yours, but rather than being a datalogger based on a sensor it will be a logger which has a GUI and a human entering data manually. For instance the end users might be logging the location of a rare species of plant, or to record daily changes in symptoms of a disease or condition etc.

The main problem it solves is long-term observational data logging in places where opportunities to charge a device are almost zero. For instance, in very remote, low resource settings. I’m testing various power solutions and will be testing in the real world to see how they fare, but was particularly interested in the use of the phone chargers because they are already safety tested, and provide hugely more power than AA batteries.

Ok, understood (and an interesting use-case). I think you first have two things to figure out: what is the duty-cycle, i.e. how long will the system be running when it is running. This will dominate the overall current consumption. This will allow you to estimate the needed capacity.

The second challenge is to find a suitable battery. In your use case, you must use the battery-connector of the Badger2040w, otherwise you won’t be able to operate the system in on/off mode. This is another reason why the phone-charger via USB won’t help you - the Badger2040w would not turn off, so even a large power-bank without internal shutdown-logic would be empty very soon (the RP2040 uses about 25mA at 5V, so you are at 600mAh a day).

Another point to take into consideration: self-discharge. LiPos (and that is what is within these chargers) have a relative high self-discharge rate. Exact figures vary, but typical values are 10% within the first 24h and then 5% per month. So even a big LiPo will be half empty within 10 month.

Have you thought about using normal LiPos combined with a solar-charger? Of course you have to swap LiPos, but that would work around quite a number of problems.

I did some simple maths. Let’s assume you are using the device for three minutes a day on AA-batteries. This will draw 180s * 60mA = 10800 mAs = 3 mAh a day. The 60mA are idle-current according to my tests at 2.7V (a typical level during AA-battery lifetime). Idle-current is IMHO a valid assumption, since in a data-entry app the program usually waits for key-presses without doing complex calculations.

Expected capacity of two AA batteries is about 3000mAh, so one set of batteries should be enough for one year. This is all very simplified, since it does not take into account the current draw in off-state (I did not measure it yet, but I heard something of about 60µA), but there is enough headroom even if you use the device five minutes a day. And you could also take some spare AA with you, they are small and self-discharge is minimal unless you have very high temperatures.

Interesting information. I’ll be following up with some in-depth power tests.

in the meantime I’ve made some new functions which draw some basic charts based on data ingested from a CSV file. Might be useful in your project @bablokb

Best wishes

Chrissy

Bookmarked it. Very nice code, thanks for sharing!