As the title says, when my Arduino is hooked up to a battery the screen displays nothing but white boxes. I know my wiring is correct because when I plug it into my computer, as you can see, the screen properly displays my pedometer count, and it also updates as it should when I move (not pictured).
Any idea why I'm not getting a proper display when hooked to a battery? Is it possibly because the battery port is faulty?
This is a link to my google photos because for some reason this site doesn't allow newcomers to upload more than one photo to a topic.
Why would the voltage of the battery have anything to do with it when I'm drawing from the 5V port on the arduino? This was the recommended battery given to us for this project from a professor, and the other teams in class have been able to get it working just fine, so why would it be different in my case?
No no, I wasn't trying to be rude, I'm sorry. I was genuinely wondering why/if that would matter for my case if it didn't for others. The only reason I could think of is if the battery plug-in port was not functioning properly, but is there another reason why it wouldn't work? I've checked on many other forms about the white boxes appearing, but none of them had mentioned the battery itself as a problem.
(I'm also relying on the voltage to power my motion sensor, which is drawing from the 3.3V port)
For instance using the words "9v battery" in the search box one could find lots of reasons why this may be a bad idea.
9V smoke detector batteries cause numerous issues with these kinds of projects. I just do not use 9V batteries, my experience has shown them to be very unreliable with these types of projects. I tend to go down a list of things that I'd address before moving onto the next thing. I saw on one of the images a 9V battery being used. To me, if it is not now a source of problems it will soon be a source of problems. White out LCD's blocks can be a power supply issue or connection issue. Seeing a 9V battery in use and white blocks on the LCD, I went to power supply issue. On the other hand, it could be how the pot is wired or how the breadboard is being used.
I honestly didn’t even know what that device was called until this very moment; the instruction in this class has been rather subpar.
I put it on there cause I thought it was the part that was being used by an example diagram for LCD connections I found online. Really not sure if it even does anything; I’ll try to rebuild the system again later this afternoon without it, unfortunately I can’t check right now.
It look like you have a contrast issue.
If all the pixels are always on or always off, then the contrast voltage needs adjustment.
If you were to look at the voltage on pin 3 of the LCD, I'm betting you will see a difference in voltage between when the board is powered by the battery vs the computer.
Likely the final supply voltage (VCC) to the board is different between the two different sources of power.
This difference in supply voltage (VCC) can cause a difference in the voltage being provided to the LCD contrast Vo input (LCD pin 3)
Try measuring VCC and LCD pin 3 (Vo) on the LCD to see if they vary between the two power sources.
You could see if disconnecting Vcc from the one leg of the pot makes any difference.
Due to the way the LCD is designed, it really isn't needed and my cause some upward bias differences when used with slightly different supply (VCC) voltages.
Well my best guess is battery. Figure it this way, it works when powered off the PC USB port. Assuming you are powering the display off the Arduino 5.0 volts. When you use the battery I assume is connected to the external DC in connector things don't work. The external DC requires greater than a minimum of 7 volts. If the battery is, as mentioned a PP# 9.0 volt alkaline battery you really can't get much current before the battery voltage drops. Also can't rule out a possibly poor connection in the battery path. Would be nice if you could look at battery voltage under load and also look at the voltage to your display.
A 9V battery really isn't designed for high current applications. Typically they are used for supplying 50mA or less to the load. The Arduino will draw that much just by itself, and the backlight on that display will probably require about the same amount of current as the Arduino. It's entirely possible you are drawing too much current from the battery. When that happens, the battery voltage drops. If it drops enough, the Arduino can no longer provide the required 5V, most likely causing it to crash.
One solution that works for me is to replace the 9V battery with a set of four AA batteries in series. That's what I use on a unit that has the Arduino, a GPS, and an LCD display. I get ten hours or so of operation out of a set of four AA batteries.
Another option would be to pick up one of those USB power bank batteries for charging phones. Even a small one will run your setup far longer than a 9V battery will, and they can provide a lot more current than your Arduino will need.
Thanks for the response! I’d bet that’s my exact problem, as the other solutions present here haven’t worked; I’ll let the professor of my class know that this is an issue for future semesters.
Why assume or guess?
Why not take actual measurements of the VCC voltages and the Vo voltage for the two different power sources?
That way you will actually know.
Like I said in post post #10 measure the voltages of VCC and Vo
You measure between gnd and VCC and gnd and Vo (pin 3 on LCD)
Did you ever try disconnecting the VCC leg of the pot? to see if it helped reduce the contrast issue between the different power sources?
You may also seem some differences in VCC when using different computers or USB power supplies as they all won't be supplying 5v. Some may be a bit lower and some a bit higher.
Hopefully if over 5v not to much over 5v but I've seem to cheap Chinese USB power adapters put out some crappy voltages - sometimes noisy to the point of causing things to not work properly or sometimes too high like 5.5v
Also it depends on the UNO board design (it has varied through the years). Some of them end up clipping / lowering the USB voltage a bit in their control circuitry so you won't get quite the same voltage on VCC as the voltage from the USB. i.e. your VCC may be a bit lower than the USB power voltage.
You can also see contrast differences depending on the temperature.
If quite cold vs warm/hot the contrast setting may need to be adjusted.
Another interesting thing is if you are outside.
The contrast can go wacky (change quite a bit) when the sun is low in the sky say nearing sunset and can vary depending the orientation of the lcd relative to the sun.
i.e. if sun is low in the sky and you hold the LCD parallel the ground, the contrast may change quite a bit if you rotate the LCD 90 or 180 degrees while keeping the LCD parallel to the ground.
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project See About the Installation & Troubleshooting category.