Power Bank straight to the Arduino?

62 views
Skip to first unread message

egud...@gmail.com

unread,
Oct 16, 2023, 6:46:30 PM10/16/23
to Crow Box Kit
I was having problems with the power supply/servo, but it worked fine when attached to my computer. I tried a portable power bank  plugged into the Arduino computer port, it also worked fine.  Is there any problem with powering the box through the Arduino with a portable power bank?

Todd

unread,
Oct 16, 2023, 7:09:32 PM10/16/23
to CrowB...@googlegroups.com
As long as the power bank has an "always on" feature, you should be okay.  Most power banks have a low current shut off, so if something isn't actively running current, the bank will turn off until you manually power it back on.

I use this one:
Which powers my box pretty well, and has the added solar for charging if you want.



On Mon, Oct 16, 2023 at 3:46 PM egud...@gmail.com <egud...@gmail.com> wrote:
I was having problems with the power supply/servo, but it worked fine when attached to my computer. I tried a portable power bank  plugged into the Arduino computer port, it also worked fine.  Is there any problem with powering the box through the Arduino with a portable power bank?

--
You received this message because you are subscribed to the Google Groups "Crow Box Kit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to CrowBoxKit+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/CrowBoxKit/2d9c6027-c8e4-4499-9d59-4de76fc55de1n%40googlegroups.com.

Josh Klein

unread,
Oct 17, 2023, 4:25:39 AM10/17/23
to CrowB...@googlegroups.com
Thanks, Todd! Excellent advice.

It's worth checking past messages on the topic; as Todd mentioned most power banks do NOT support continuous current and don't note that fact, so it takes some work to find one that does. 



Michael Kapp

unread,
Oct 17, 2023, 10:52:14 AM10/17/23
to Crow Box Kit
egud...,
The easiest COTS solution is the voltaicSystem battery, especially if you are only trying to power the crowbox arduino/server (and not additional electronics such as cameras). 

There are probably some good DIY solutions using LiPo batteries, but I am not sure how these solutions compare cost wise. 
and

Thanks,
MK

Stephen Chasey

unread,
Oct 18, 2023, 12:35:24 PM10/18/23
to Crow Box Kit
If you have a free pin on the Arduino you can use a transistor and a 47Ω resistor to sink ~100mA for one second every 10 seconds to keep a normal power bank on when it's not using the servo.

Chris Brenton

unread,
Oct 22, 2023, 7:20:36 AM10/22/23
to Crow Box Kit
In case it's helpful, I picked up one of these:

Powers the crowbox for about two days before needing a charge.

HTH,
Chris

Michael Kapp

unread,
Oct 29, 2023, 10:36:31 PM10/29/23
to CrowB...@googlegroups.com
Stephen,
This was interesting and I wanted to try it. I am not the most familiar with circuits, but I gave it a whirl. 
It looks like it actually requires 2 resistors (one to the base 4.7Kohm) and one for the load while on (47ohm, but I had to use 100 ohm for my battery)). 
I definitely could be doing something wrong as I don't have much experience with circuits. 

This Anker PowerCore 5K Portable Charger doesn't turn off with the Crowbox circuit. I guess the threshold is being met here. 
The Most I could find is this bullet point on Ankers Q&A:
  • if the power demand from your phone is small enough, for long enough, then the Powercore will turn itself off at a threshold which is Powercore dependent. In general, the bigger Powercore turn themselves off at smaller demand than smaller Powercore.

I have this RETMSR Portable Charger, Power Bank 30000mAh Battery Pack:
I can't find any documentation about auto shut off thresholds.

I would like to get this 30Ah Battery to work, but I am seeing the battery stay on for less than an hour. 
Without the circuit it turns off at ~40 seconds. So I think the circuit is working somewhat. 

This is essentially the code I added, but it is modified across a few files:
const int transistorPin = 7;  // Pin 7 is the free pin connected to the transistor
unsigned long lastToggleTime = 0;
const unsigned long toggleInterval = 6000;  // 6 seconds

void setup() {
  // ... existing setup code ...
 
  pinMode(transistorPin, OUTPUT);  // Set the transistorPin as an output
}

void loop() {
  g_crOSCore.Setup();
 
  // Check if it's time to toggle the transistor
  unsigned long currentTime = millis();
  if (currentTime - lastToggleTime >= toggleInterval) {
    digitalWrite(transistorPin, HIGH);  // Turn on the transistor, creating a load
    delay(6000);  // Keep the load for 6 second
    digitalWrite(transistorPin, LOW);  // Turn off the transistor, removing the load
    lastToggleTime = currentTime;  // Update the last toggle time
  }
}



I am wondering if it is dipping outside this 6 on / 6 off range because there isn't a RTC? 
The other item I need to address is turning off this circuit if the servo is running. Any advice on how to handle that? 


Any details you can provide me would be greatly appreciated. 
Thank you in advance,
Michael 



You received this message because you are subscribed to a topic in the Google Groups "Crow Box Kit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/CrowBoxKit/ASFTOyeEtEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to CrowBoxKit+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/CrowBoxKit/2efe37d6-6c80-46a8-94de-6f818cee08e2n%40googlegroups.com.


--
Thank you,
Michael T. Kapp
Cell - (856)-628-0497

Stephen Chasey

unread,
Oct 29, 2023, 11:54:19 PM10/29/23
to Crow Box Kit
Hi Mike,

Sounds like you are doing it right - though you may want to sink more current to keep the RETSMR power bank on. 100mA is a typical threshold. Your transistor will need a gain of ~120 or so to sink 100mA with a 4.7K at the base (assuming 5V). With a 100 ohm limiting the current passing through the transistor you can only sink ~50mA, which may not be enough.

I think you can also optimize your current sinking timing as well. On for one second off for ten seconds should work for most power banks without costing too much power overhead. 

I'm not very familiar with the Crowbox code, but you could define a global variable to use as a flag with its value set to indicate when the Crowbox is using >100mA by itself. You can add a line to the routine that starts and stops the servo routine to set this flag accordingly. Your keep-alive loop can check this and do nothing if the servo (or whatever else that consumes enough current) is active.

Steve

Michael Kapp

unread,
Oct 30, 2023, 1:48:33 AM10/30/23
to CrowB...@googlegroups.com
Steve,
Thank you SO MUCH for the quick response. I can't find any specs for battery thresholds so I'll take your word for it. 

So if I use a 47 ohm resistor for the Collector (~106mA) and a 470 ohm resistor for the Base, this should do the trick???? 

I am using the tail end of this video to figure out the math: 

These are the resistors I bought:

I think these are the transistors I got too:

Thanks for your help on this!!!!
Michael

Stephen Chasey

unread,
Oct 30, 2023, 3:10:10 AM10/30/23
to Crow Box Kit
Hi Mike,

The resistors and transistor you have should work. However, the 47 ohm resistor will need to handle half a watt. You have 1/4 watt resistors, so you can use two 1/4 watt 100 ohm resistors in parallel as an equivalent to a 1/2 watt 47 ohm.

Steve

Reply all
Reply to author
Forward
0 new messages