Signal to gnd from digital pin atmega328p

Hello, I need to keep a powerbank alive while I am running my project, I am wondering if this is bad for the atmega 328p pin or if it works fine.

I send out a signal from digital output pin every 4 sec to gnd and that keeps my powerbank alive.

I use a resistor between and 22Ohms works. I am wondering if this is ok to do or if I am going to get trouble after a while.

I use a 10 000mAh powerbank that is 5V and 2.1A output. I am powering atmega 328p and lots of LEDs.

As long as the current is less than the recommended maximum of 20mA (40mA absolute max), you will be OK. 22 Ohm's is definitely too low. 180 to 220 or higher would be OK. Otherwise, if you need more current draw, use a transistor to pass the current. I use the same sort of strategy to keep my power bank alive.

Like this?

Looks good to me.

Thanks for the help, it works now and now I know I am doing it the right way!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.