Display not working correctly with 9V battery, works fine with USB

Hey,

So I recently purchased a 1602 LCD display, and it has been working correctly. I've been using it with my computer, by plugging it into my PC with a USB, but when I plug it in using a 9V battery, which I got from the Elegoo Starter Kit on Amazon, it doesn't seem to be working correctly. The screen just shows very dark blue, and the contrast doesn't seem to be high. I don't know if it's the battery, or something I don't know about that has something to do with power, or something along those lines.

You connected the battery to "Vin" or the "barrel jack", didn't you? :astonished:

The clear blunder is not comprehending what the "Vin" or "RAW" terminal is. The regulator on the Arduino UNO/ Nano/ Pro Mini/ Mega2560/ Leonardo/ Pro Micro has very little heatsink, so will not pass very much current (depending on the input voltage and thus, how much voltage it has to drop) before it overheats and (hopefully reversibly) shuts down. It is essentially a novelty provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

Nowadays, 5 V regulated switchmode packs are arguably the most readily available in the form of "Phone chargers" and switchmode "buck" regulators are cheap on eBay so these can be fed into the USB connector or 5 V pin to provide adequate power for most applications. Unfortunately, many tutorials or "instructables" are seriously outdated or misleading and have not been updated to reflect the contemporary situation.

If powering from batteries, as long as the battery pack cannot exceed 5.5 V, this must be connected to the 5 V pin.

Also, a "PP3" or "smoke alarm battery" would have to be an alkaline type and even then would not power an Arduino project for very long.

Hi,

I should've stated I'm relatively new to Arduino, so the words you're throwing around aren't exactly familiar to me. I also don't understand very much what it is you told me to do. I have my LCD shield on the top of my Arduino Uno, and I plug in the power from the 9V battery through the side of the Arduino. (Where you plug in the battery cord). When it's plugged in I get that screen issue. I was curious if maybe the power supply module would help or something along those lines? I don't know too much on what to do as I said I am very new to this field.

OK, I'll re-phrase my comments. You didn't answer me on your previous enquiry but it seems the shield did eventually work for you. I did mention the nasty problem with this particular shield so I don't know whether you read that or it was also too confusing.

The problem is that the socket for the 9 V battery - which is much the same connection as the "Vin" pin on the board though you are not using that - feeds a very tiny voltage regulator on the UNO. This is OK if you have nothing else connected to the UNO but you have in fact, added something - the LCD "shield". And it is likely that the regulator cannot properly power that as well as the UNO.

I strongly recommend you just forget about that power socket and the regulator, and always power your Arduinos with the regulated 5 V that the processor - and other things - actually runs on. The most practical way of doing that is to use one of the really common and generally cheap "Phone chargers" with a USB socket that provides 5 V- just plug it in with the lead you use to connect to your PC. It only needs to be rated to provide 500 mA as that is as much as the USB connection is intended to handle; it has a built-in "polyfuse" to disconnect the Arduino if you try to draw more than 500 mA.

Another alternative is a "power bank" for re-charging mobile phones, which also provides a good 5 V.

The other thing is that when you say "9V battery", you may mean one of these:

Well, if it is the alkaline version rather than the basic "zinc-carbon" battery, it probably can power an Arduino for a short time, possibly a couple of hours, but not much longer and you are actually wasting a lot of the capacity - using only 5 V that the regulator gives out, from the full 9 V the battery provides. If you must use a 9 V battery, a six-cell AA carrier would be much more practical. For many projects, you can use a three battery carrier to provide 4.5 V, but the LCD requires a regulated and stable 5 V.