Arduino Nano Atmega328p freezes and starts lagging and reset-ing after a few seconds running on battery--- it doesn't freeze or resets when ran onUSB

Hi so I am building this rfid door lock system using arduino nano and below is the list of components used in making this project:
Sg90 servo motor for moving the latch of the lock
RC522 RFID Sensor
16x2 Lcd display which is attached to the arduino nano through an I2C module
400 points breadboard
Arduino Nano with ATMega328p (as mentioned earlier)
5v Buzzer
So what happens is that whenever I run it using usb form my pc it runs flawlessly, i have ran it using my phone by using an usb C to usb A converter and it ran very smoothly but whenever i run it using batteries it just starts lagging, freezing, and reset-ing itself i have tried changing the connectors of the batter, the battery itself, etc but nothing has worked, please help, fyi the batteries are of 9v and the rfid has been plugged into the 3v3 and both the servo motor and lcd with I2C has been plugged in the 5v.

-----image of circuit just replace the servo and lcd plugged in vin to 5v

Thanks

The specification of Vin for a Nano is 7V minimum; so you can't feed it with 5V on Vin. Connect the external 5V power supply to the 5V pin of the Nano.

1 Like

Hi, my power supply is a 9v battery and plugged into the vin

So why do you draw a 5V connected to Vin ?

If that battery is a PP3 type, they are useless for Arduino work.

hey so the circuit diagram isn't mine it is from a youtube video according to which i was building the project actually I am very new to arduino and stuff, and thank you so much i just checked the battery is PP3 type, I didnt knew that pp3 batteries dont work but can you tell me which battery to use instead?? and one more thing can I use a normal power bank as power supply by plugging it into the arduino nano's mini usb port and not use batteries??
Below is the battery's image I thought it might help


Thanks

Hey, thank you so much I am very new to the Arduino field so I don't know anything about it, I will try with AA or AAA batteries but can I power my project with normal power Bank also, like by plugging the power Bank into the arduino's usb port???????

Hi, @epic_gaming7
Welcome to the forum.

Hint. When posting schematics, you can get more and accurate information by providing a/some pictures of a hand drawn circuit. That way you can draw ALL your symbols and not be locked into a Fritzy image.

Tom.. :grinning: :+1: :coffee: :australia:

hi, actually the diagram isn't made by me its from a youtube vid so that's why its showing 5v to vin, i was using a pp3 9v battery and it wasn't working, whenever I used the battery arduino used to start lagging and freezing and keep reset-ing it self. I have plugged the servo and the lcd (which is attached to I2C module) to 5v pin on the arduino. So if my power bank can provide 5v steadily so can i then use the power bank by plugging it into the arduino's usb port???????????

Hi @Delta_G thank you so much for your help but there is one thing I wanted to know that can I use a power Bank by plugging it into the arduino's usb port???? My power bank can steadily provide 5v
Thanks

Hi, @epic_gaming7

While it is possible, what will happen is all the current for your hardware will go through the Nano PCB, the power tracks on the PCB will not be capable of carrying that current.
The tracks may overheat and burn out.

Connecting the 5V supply to hardware and Nano is safer this way.

Tom... :grinning: :+1: :coffee: :australia:

You could use something like this Adafruit USB breakout board to supply approximately 5V from your power brick. You would feed the 5V out from the breakout board to the 5V pin of the Nano. You would also power your servo and other 5V parts from the 5V out from the USB breakout board.

1 Like

Hi and thanks Emily but I want to ask something that I will use the usb port on this breakout board and plug it into the arduino’s usb port right?

No, you want to plug your power brick into the breakout board. Then you will use the 5V out from the breakout board to power the 5V pin of the Nano and to also power your servo and other 5V parts from the same 5V out of the breakout board.

Edit:
Think of the USB breakout board as just a convenient way to be able to connect wires to your power bank and use the 5V from it.

Thank u so much Emily

You're welcome.
Be aware that the breakout board that I illustrated has a micro USB connector but that similar breakouts are available with mini USB, USB C, and USB B, depending on what kind of cable you prefer to use with your power bank.

Emily I had a quick small question that can I use something like this:

No, that board is used for building your own power bank. I has the battery charging/protection circuitry built in. You would connect it to a Li-Poly battery via those B+, B- terminals. You want to look for a "usb breakout board."

Hey Emily so what about this can I use this:

If the 5V output is just passed through from the USB connector then yes. You can measure continuity from the connector pin to the 5V output pad with a digital multimeter.

You may be asking about that because you already have one of those modules. In that case, it's worth a try. Look at the schematic if you have it. If you are considering buying one to substitute for a USB breakout board then unless you need the converter for another project, I would advise against it.

Edit:
If you Google "usb breakout board" you will find what I'm suggesting from numerous places including Adafruit, Digi-Key, Mouser, Amazon, etc.

Actually I live in India so it’s very hard to find these breakout boards here like the ones shown on trusted site are very expensive and also they are taking like 2-3 months to deliver so that’s why