I am now on my 4th LCD, they seem to keep failing or its just me doing something wrong. Using Arduino Mega board, and current LCD is a Adafruit 20x4 white type on blue.
Just to keep things simple I am running the "HELLO WORLD" sketch. I am using pins 7,6,5,4,3,2, I have attached a few photos of what the LCD is looking like with different settings on the potentiometer controlling the contrast.
For power I am using a 110 to 12v source and then through a converter to get 5v that is powering both the Arduino and the LCD. See my Fritzing wiring setup attached.
When I install a new LCD it works fine but after a few days starts to go weird as pictured. Anything else I can look at, I have double checked all wiring, solder points, etc.
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
//const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(7,6,5,4,3,2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
}
I never thought of that. I made the hole large enough so the screen would not touch anything and then used plastic standoffs to keep the "electronics" from touching the plastic enclosure.
I have checked voltages many times, but if its a spike doing it, what can I do?
Just a thought, its says on the regulator/converter output of 5v 15W 3A. If I am going directly from it to the LCD could that be too much watts/amps? Should I be powering the LCD only from the 5v output pin on the Arduino? Would that explain why it works for a few days until it gets fried?
Your images indicate grossly defective LCDs. It looks as if you have been supplied rejects.
Your Fritzing diagram is incomplete. It is not the problem, but an incidental reminder - you should not connect the 10k pot that supplies pin 3 on the LCD, to 5 V - leave that end unconnected.
Do you have a reason why the power supply would be defective and generating spikes?
laughingcamera:
Can having that 5v connected to the pot cause the LCD to burn out?
Not at all. It just makes it more difficult to set the contrast and wastes an extra 500 µA. It was simply a really silly mistake made by designers early in the piece without understanding what they were doing, looking at one early "test" circuit in a datasheet, and then mindlessly copied ever since. Remarkable!
That fault implies either faulty ICs or physical damage to the modules. I can't speak for what happens if you incorrectly initialise the module however - would have to check that out. I think you would have to ridiculously over-voltage the module to have such an effect.
One thing I did notice from your diagram is that you are supplying 5v to the dc input jack. Possibly at the moment the reg is passing voltage through but at say 4.7v due to internal regulator components.
Using 5v at this point shouldn't really work as the dc input jack is meant for 7v to 12v dc.
This gives the necessary voltage overhead for the onboard 5v regulator. It requires a higher input voltage to get a regulated 5v output voltage.
To power the board from 5v you need to use the vin pin near the gnd and 5v pins
I would make the suggestion to try connecting the 5v for the lcd pin 2, to the 5v output of the Mega and also the ground pin to the Mega.
For testing over a few days leave the backlight disconnected. I had one lcd whereby the backlight heated the driver chip up enough to cause half of the display to blank.
If you have measured your 5v please make sure it is the range 4.9 to 5.1v for correct operation without causing damage or getting unknown effects.
It might be a bit hard to see from that cropped version of the Fritzing layout but it is connected to the 12v power supply.
But I am going to move it from the dc input plug to the vin pin.
I will also power the LCD from the Arduino board and not directly from the 5v regulator and see how that goes, but pretty sure I need to use a new LCD, the 5th one
100R would be a more common value for the dropper resistor.
Yes, some modules are shipped with 0R. If you connect them to 5V, they take a large current that will shorten the LED life.
It should make no difference to the LCD operation unless it damages your USB or other power supply.
Most PCs' USB will provide 500mA and more.
It is easy enough to find the dropper resistor on the pcb. Read the value printed on it. If sceptical, measure value with a DMM. Or measure the current taken by the LED with your DMM. 20mA - 50mA would be acceptable.
You can power the LED however you like. Simply put a 390R resistor in your 12V line. Or a 100R in the 5V line (if necessary)
The two displays are essentially the same (one is upside down).
It appears that the main HD44780 controller chip is working properly since the upper left area of the screen is working normally. This also indicates that the wiring is correct.
The rest of the screen, controlled by the other four auxiliary chips is not working properly.
These two photos are probably pictures of the same device. Do the other devices, especially the one from Adafruit, show a similar condition where the upper left 16 locations work properly and the others fail?
I suggest you remove all the extraneous components and wires, remove the display from the enclosure, use a wall-wart type power supply for the Arduino and LCD, and try again with the Adafruit display.
Stick with the program in your original post since it does not make any changes to the screen after the original message is displayed. This is a good technique for troubleshooting.
Yes, all the LCDs showed the exact same failure patterns after a few days. The two photos are the same screen, the Adafruit currently install in my enclosure.