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