Hello!
I was trying to get started with my 16x2 LCD Display which I connected to my Elegoo Mega2560 R3.
I used a 10k potentiometer to dim the display if needed, but even if I bypass it and hook the third port on my display directly to ground it doesn't get any brighter.
I tried two different displays and rearranged the wiring in every way i could think of, still no increased brightness.
The display does show Hello world and counts the seconds since the last reset, so the code seems to be working.
This is the code I used to try it out:
[code]
/*
LiquidCrystal Library - Hello World
The circuit:
* LCD RS pin to digital pin 7
* LCD Enable pin to digital pin 8
* LCD D4 pin to digital pin 9
* LCD D5 pin to digital pin 10
* LCD D6 pin to digital pin 11
* LCD D7 pin to digital pin 12
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
lcd.begin(16, 2);
lcd.print("Hello, World!");
}
void loop() {
lcd.setCursor(0, 1);
lcd.print(millis() / 1000);
}
[/code]
I know that there's been similar posts but all I've found were without solution that worked for me.
nikolajbozicevic:
Yes, I think the backlight functions correctly. I removed the red wire going to pin 15, that didn’t change anything unfortunately.
That was a trick question!
If you disconnect pin 15, you have no backlight at all, so apparently your backlight is not functioning.
So now we need to know what you are actually doing with this project, especially since you say "rearranged the wiring in every way i could think of".
I think we best need a photograph. Note to take a photograph, you must take your setup outside into full daylight (but not direct sun) and have it perfectly focused and no less than 4 Megapixels in resolution. Not in a dark room and any blur renders it useless.
nikolajbozicevic:
Hey!
Yes, I think the backlight functions correctly. I removed the red wire going to pin 15, that didn’t change anything unfortunately.
Then I guess is a yellow/green type display. With a blue display you would not even have seen "Hello World". You could also try simply putting power to pins 15 and 16 only (polarity sensitive) to see if the backlight responds.
Your breadboard appears to be one with split power rails because the coloured lines are broken. Look near pin 30.
You have to bridge these.
But I was clearly wrong about the colour of the display. It must have been a very faint image you saw.
6v6gt:
But I was clearly wrong about the colour of the display. It must have been a very faint image you saw.
It is a very faint image! If you bring the photo to full resolution, you can indeed see the image.
Thank you Nikola for posting a proper photograph.
Yes, the problem is the split power rails of the breadboard, pin 15 is not actually connected to anything.
While you are at it, remove the red wire connection of the potentiometer to 5 V - this is a longstanding and stupid mistake that continues to be published in circuits using this display. Use that wire to connect the two halves of the positive power rail but you also need to bridge the two halves of the ground as this is presently bad for the display as it is only grounded through pin 5!
6v6gt:
Your breadboard appears to be one with split power rails because the coloured lines are broken. Look near pin 30.
You have to bridge these.
But I was clearly wrong about the colour of the display. It must have been a very faint image you saw.
Paul__B:
It is a very faint image! If you bring the photo to full resolution, you can indeed see the image.
Thank you Nikola for posting a proper photograph.
Yes, the problem is the split power rails of the breadboard, pin 15 is not actually connected to anything.
While you are at it, remove the red wire connection of the potentiometer to 5 V - this is a longstanding and stupid mistake that continues to be published in circuits using this display. Use that wire to connect the two halves of the positive power rail but you also need to bridge the two halves of the ground as this is presently bad for the display as it is only grounded through pin 5!
Thank you so much! And also, how obvious… Display works perfectly now!
I disconnected the red wire going to 5V from the potentiometer - nothing changed. Is there a reason circuits for this display keep getting published like this?
Again - thanks for your help!
nikolajbozicevic:
I disconnected the red wire going to 5V from the potentiometer - nothing changed.
The correction spreads the range of useful contrast setting over a wider span of the potentiometer. You will have noticed that it only works near one end - the ground end. If you actually connect both ends of a 10k potentiometer to ground, it makes the setting even more readily adjustable (because you sort of turn it into a 2k5 variable resistor).
nikolajbozicevic:
Is there a reason circuits for this display keep getting published like this?
Yes.
People copy circuits having absolutely no idea whatsoever of how the thing works. If it works, albeit in an odd fashion - they accept it. And the 10k potentiometer does work, it is just difficult to use. The I2C "backpack" modules have taken to using 10 turn pots to spread the narrow adjustment range at one end to a wider turn of the screw.
Paul__B:
The correction spreads the range of useful contrast setting over a wider span of the potentiometer. You will have noticed that it only works near one end - the ground end. If you actually connect both ends of a 10k potentiometer to ground, it makes the setting even more readily adjustable (because you sort of turn it into a 2k5 variable resistor).
Wow, I just connected both ends of the 10k potentiometer to ground and am fascinated - it makes total sense, but I never would've thought about it that way.
Thank you for helping me!