LCD Display not working correctly

Hi guys, I'm totally new to arduino, and currently I'm trying to use the lcd display from the starter kit.

I did the connections and the codes as showed in the article: Liquid Crystal Displays (LCD) with Arduino

But after tried many times, the display keeps giving me strange output:

sometimes I can't even use the potentiometer to control the display contrast, and in most cases the content on the display isn't very steady, it could change after I reconnect the usb wire...

Tbh it almost drives me crazy, and I don't know how to troubleshoot in this case. It could be the problem of the breadboard, wires, lcd display or even the uno itself, but how am I gonna find it out? Hope you could give me some suggestions, thanks in advance!

Welcome to the forum.
I checked the wiring in your photo, and it seems alright.
The potentiometer needs GND and 5V, but it is not connected to 5V.

The display might be broken, the breadboard might have bad contacts or the voltage might be too low.
Breadboards are often low quality. Does something change if you wiggle the wires ?
Do you have a multimeter ? To measure the 5V. Those displays need at least 4.5V.
Try an other USB cable. Do you use a laptop ? Then it might give a weaker USB voltage then a desktop computer.

If the display is broken and you don't have another display to compare it, can you forget about this project and continue with the next project ?
When buying a display, try to buy a I2C LCD display, then only 4 wires are needed (+5V, GND, SDA, SCL).

afbeelding

Thanks a lot for your reply.

The potentiometer needs GND and 5V, but it is not connected to 5V.

Obviously! That's a very stupid mistake, thanks for pointing that out!


But I agree that's not the key problem here, since I think the petentiometer is not a must-have component to make the display work correctly.

It can't be the low voltage, because I connect it to my desktop, I even tried connecting it directly to my charger. Unfortunately I don't have a multimeter now, But I do notice that the content on the display has some slight blinks, so I think it has enough voltage but not very steady. And yes, the content is changing when I'm wiggling the wires, especially those 2 power wires.

After considering all of the questions you mentioned, I think I'd better get another set of components(displays, breadboards, resistors and even a multimeter). Currently I'm just following the projects book from the starter kit, so I didn't think too much. I think my best solution now is to move on and wait for those new components, of course I'll consider about your buying suggestions, thanks again!

There is a Wokwi simulator that can show the LCD display with and without I2C.

Here is your project in Wokwi: https://wokwi.com/projects/328961004262130259.
I changed the color of the wires for the 5V (all red) and the GND (all black).
If you click on the "diagram.json" tab in Wokwi, you can see the definition for the diagram. I think your blue wires are "Cornflowerblue" :rofl:

I forgot to mention that you could have a display which is not compatible.

Please post photos of the back side of the display.

Sorry, totally wrong! :astonished:

The potentiometer must not be connected to 5 V. That is a really stupid mistake propagated by people mindlessly copying one mistake to another, since they do not understand how the display multiplexing works.

If you have the wrong value potentiometer - a 10k, then connecting both ends to ground is the most practical way to obtain close control of the contrast. The correct value would be 1k connected as a variable resistor to ground.

Koepel, have you not been reading the discussions here on the 1602 and 2004 displays?

No, not a mistake at all - you have it perfectly correct. :+1: Hope you did not change it to the wrong connection which will make contrast setting more difficult. :face_with_raised_eyebrow:

Indeed I do. :grin:

Note that the I²C backpack also contains this annoying mistake.

Not a bad idea, but probably will not help.

No, just the display. If you have not got a multimeter yet however, you absolutely must get one. :sunglasses:

I am not sure exactly what is the problem here. We are not seeing the "blocks" of an uninitialised display, and the spurious lines - not proper characters - suggest a display fault.

Without the code, it is difficult to know exactly.

@trimr Sorry that I wrote about 5V to the potentiometer. Paul_B is totally right. One leg to GND and leave the other leg open.

@Paul_B I was helping with the tutorial without thinking :sleeping:
When making this project, I found a bug in Wokwi. I have added another post at the Github Issue right now.

Or if you are using a 10k pot, connecting both legs to ground makes it easier. :grin:

@trimr Welcome To the Community
Can u pls share your code as well as your full and proper Circuit

Firstly, I want to thank you all for the help, it's such a friendly community! :smile:

@Koepel Thanks for the wokwi project you made, it's very nice of you! That's a very helpful simulation tool, first time hear about it.

@groundFungus here's the backside photo:

@Paul_B
Thanks for the explanations on the potentiometer, I checked the value, it's a 10k one. And actually I don't have a second chioce :frowning_face: because that's the only option from the starter kit...
And as for the connection, I don't know how it works here, it seems that I have a wrong connection according to the arduino doc(the link in my first post), and in the arduino projects book it also says one to 5v another one to GND.
image
But I can still control the contrast with both of them connecting to GND, which is confusing... I did some experiments though, and I found that it also works if you connect the V0 directly to GND, so I assume that if you add a potentiometer and only connect one of the out pins to GND, you can also have a closed circuit. I don't know if I understand it correctly.

No, just the display. If you have not got a multimeter yet however, you absolutely must get one. :sunglasses:

I am not sure exactly what is the problem here. We are not seeing the "blocks" of an uninitialised display, and the spurious lines - not proper characters - suggest a display fault.

Without the code, it is difficult to know exactly.

Sure I'll get a multimeter first, I can't troubleshoot without it.
And as for the "'blocks' of an uninitialised display", that's most weird part.
here's what you'll get in most cases:


But if I plug the display in with an angle,

I can accidently get the perfect output:

And the code is also presented in the link from my first post. (Or at the end of this post)

@krishna_agarwal Hi, you can get them from the link from my first post.
Here's the link:

Hi @trimr I suggest you to use a simpler and easier way to deal with LCD. Pls find code as well circuit
This is very very basic and Beginner Code and Circuit u may use this as I think u are a beginner
Attachk 1K Transistor as shown

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
lcd.begin(16, 2);
lcd.print("Hello World");
lcd.setCursor(0,1);
lcd.print("How r U");
}


void loop() 
{

  
}

image

Pls tell that it's work for you or not

Thanks for your reply. I tried it but the result remains the same. I think it's more like a hardware failure rather than the code. The main problem here is I can't get the initial blocks even without connecting input wires. I checked some videos from youtube and I think I should get the initial blocks in the initial state(no code uploaded), but I can't.

Firstly I want to ask that have you attached all the connection right.
And secondly there is an mistake in your circuit image as you shared
image

The resistor in connected o GND make it must be connected To 5V the last 2 pin from the right Pls share Proper Full image of your circuit

Yes, as I say, that error has been simply copied by one "tutorial" after another, and incorporated into the I²C backpacks since it "sort of" works so people think it is OK. But it makes contrast setting more difficult and wastes half a milliamp. That may not seem much to worry about except that the LCD itself uses less than a milliamp and this would be significant it operating from a battery. The backlight of course draws 20 mA.

Not really. You will note if you tried both ways, that the contrast control is much more flexible connected this way. Instead of working only over a very narrow range at one end, it works over a much wider range - at both ends. :grin:
Speaking of confused people,

I don't suggest that. :roll_eyes:

This is the equivalent of turning the potentiometer all the way to the ground end. In general, it will work and is OK to test if you are having problems (as you are), but generally does not provide the clearest display.

So you found that out. :+1:

The contrast is indeed, not your present problem.

And indeed, if that is the display with no code running, the fact that you get only half a line of blocks demonstrates that the display is definitely faulty.

Interesting trick. Don't quite know how or why it does that, but again, the display is definitely faulty. You are getting only the right hand side.

So the verdict is a dead display. I was a bit puzzled with your original picture and thought you had a 2004 display but of course, it is a 1602. On a 2004, the uninitialised display is "blocks" on the first and third line.

So we can forget the contrast setting for the present. The display is unfortunately dead. :dizzy_face:

Pardon us when we ask for your actual code, but we always want to check what is in your IDE, not what the tutorial said because - it isn't always the same. :roll_eyes:

Not sure what you are trying to articulate there, but if you are talking about the resistor in series with pin 15, that is another story. It is unnecessary with AFAIK, all of the currently available 1602 and 2004 modules since "R8" on the back of the module is "101" or 100 Ohms.

Well, it always used to be, but on the one shown in #11, "R7" is now 330 Ohms so the external resistor is even less necessary. I can't quite see what "R8" is doing here, but it appears to add another 220 Ohms also. An extra resistor will not hurt things, it will just dim the backlight slightly and save some current. :sunglasses: