Arduino Nano doesn't consume enough power to keep portable power bank on.

I have a project where i created a portable speaker using an arduino nano and DFPlayer mini. This gets fed by a portable power bank (the usb-type that you use for phones), and has a wire that goes from the bank and splits into the Vin of the arduino and Vcc of the DFPlayer. Ground as well of course. I chose not to feed it through the usb port on the arduino because there is a rocker switch in between the power bank and arduino/dfplayer to manually control the flow of power. There is also a 100uF capacitor.

If the volume is too low, apparently the arduino+dfplayer doesn't draw enough power and the power bank will automatically turn itself off.

Everything is already wired and soldered, so is there anyway on the software side to increase power consumption (maybe inversely related to the volume level), so that it pulls enough power to keep the power bank on?

Wellcome into the boat. I experience the same situation. Another project using the same, an UNO, an LCD and a GPS chip works well. This project having no GPS, only a low power temperature sensor, switches off like You describe it. I will try to add a resistor connected between Vcc, +5, and GND to increase the power consumption enough to inhibit this cut off.

I have the same sort of power bank (PB). I found, through experimentation, that if I draw less than 25mA from the PB it would turn off after about 10 seconds. And if I draw 30mA for a short time it will keep the power on. I put an LED (you could just use a resistor from Vcc to ground) and current limit resistor on an output pin. The LED draws 20mA. I set up a timer that would, every 8 seconds. output a 20 millisecond (and 20mA) pulse through the LED. That will keep the PB turned on, but waste very little current.

gF, I agree. Just got hold of the current consumption of my GPS, some 40 mA.
Just adding a resistor of some 100-125 Ohm between Vcc, 5V, and GND ought to fix it. I'll try it tomorrow.

Railroader, are you going to try the timed pulse method that I outlined? If so, let us know how it works. I would like to know if the method works for power banks other than the one that I have.

Pulsing a load every 8 seconds for 20ms, as groundFungus explained, does not seriously decrease battery charge.
A fixed resistor does (400x more).
Different powerbanks have different cutoff currents, so need to experiment a bit.
Could use two or more Arduino outputs with 220ohm resistors to share the load if needed.
Leo..

Ya, a simple led being pulsed would probably work well, but for my purposes i can't add anymore hardware. Everything is already soldered and there's no room right now to put in more components. Unfortunately during my tests, i didn't test it on very low volume, so this problem didn't arise during tests.

So is there any native function/process that i can activate in the code to make the nano consume more power? Like the opposite of sleep?

Can You add just a simple resistor, 100 -220 Ohm, 1/4 anywhere in Your project You are home free.

I'm not currently in my workshop (and won't be for a month), but i could see if this town has a local electronic store. This is a gift to a family member that i'm hoping to give them in a few days.

There is already a 220ohm in there as part of the circuit. The circuit is similar to the attached image. Is there anyway i could use what i currently have?

Maybe there's something i could code so that the DFPlayer can consume more power? I'll look into the library

try turning on LED on pin 13. That might do it.

Or as suggested blink it once in a while... whatever time you need to keep the bank going.

The picture shows an UNO; not Nano. Maybe a minor question. That resistor is a part of some circuitry, a pot or something. Do You use that item with the white arrow on it? If not, You can reconnect the left end of it to GND.

@wolframore
I'll try that.

@railroader
Ya, that's not my exact circuit, just a photo i found online that was convenient to show what's going on, i do use a nano. That a rotary encoder that also has push button feature. Everything in my project is wired how it's shown in that picture, except with digital pins 2,3,4.

Try the diode blinking first. If it doesn't help solder a resistor on the Nano board to increase power consumption. Eventually to a program controlled output for pulsing.

Turning on the pin 13 LED doesn't seem to do the trick.

One thing i've noticed is that when supplying power through the usb port, the power bank will stay on, but if you supply power through the Vin pin, then the power bank will turn off.

In that case, is it a voltage issue? Does the supply power through Vin drop the voltage at all?

So can you just power through the USB port?

Switching the power input from Vin pin to 5V pin fixed the problem. The volume can be 0 and the nano will stay on.

wolframore:
So can you just power through the USB port?

I could, but i also want to use a switch, so putting a switch in the middle of a usb cable is a bit more of a hassle than just putting one in between the usb power bank and the 5v pin.

Does it stay on if you leave the LED on and not blinking?

If it doesn’t work maybe you need 2 LED and raise the current to 50 mA

Worse comes to worse plug it into USB and put the switch on the cable.

@groundFungus
I just added a permanent resistor of 190 Ohm between Vcc and GND on the UNO board. It has been running for 10 minutes using one type of power pack. I will test using another type of PP and see how that turns out. If it works well I have a load that solves the issue and I can try Your pulsing method. Just wait a Little.