Go Down

Topic: Is my LCD 16x02 I2C broken? (Read 188 times) previous topic - next topic

bogdan94

Hello everyone,
I recently got a problem with my lcd. It worked perfectly with the arduino powered in my laptop or from a power supply, 12V DC, 1A. Beside the lcd, I had one sensor and some relays connected to my arduino, so while powered from the laptop, it got dimmed sometimes when more relays where on, I assume the laptop can't give enough current for all.
One time I powered the arduino from both sources(laptop + "charger"), and I didn't saw anything wrong, the next time I used the lcd powered from the laptop, one character was flickering and I plugged in the "charger", nothing changed, so I unplugged it and put it back. This time the whole text was gone.
Now I can't see any characters on it, not even the "full" white blocks, just the blacklight.
I tried to move that screw for contrast from the back of the i2c module, but again, nothing happened.

I used a test code, but the text doesn't appear, only the backlight on/off thing.

My question is, do I have to buy another one? Can I throw this away?

Thank you!

Paul__B

Of course, you have in order to test this, stripped it down to only the Arduino board and the LCD, haven't you?  Where something was working and is not now, you need to pull it down and start again from scratch, piece by piece, testing at each step.

That said, I think you had better show us a perfectly focused photograph of your set-up with all wires and parts clearly visible as they terminate on the modules and show that as a link in the text, not an attachment.

The best way to do this is to take it outside in full daylight but not direct sun and use a digital camera at least a metre away from directly above (or very slightly offset to ensure all the connections are able to be distinguished) using the (actual) zoom to just include all parts of the assembly.

bogdan94

The way I connected it was not the problem, because it got like this only by changing the power sources of the board.
Anyway, here it is, just the arduino + the lcd, running this code:
Code: [Select]

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR    0x3F // <<----- Add your address here.  Find it from I2C Scanner
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;

LiquidCrystal_I2C  lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
 lcd.begin (16,2); //  <<----- My LCD was 16x2
 
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.home (); // go home

 lcd.print("SainSmartI2C16x2"); 
}

void loop()
{
 // Backlight on/off every 3 seconds
 lcd.setCursor (0,1);        // go to start of 2nd line
 lcd.print(n++,DEC);
 lcd.setBacklight(LOW);      // Backlight off
 delay(3000);
 lcd.setBacklight(HIGH);     // Backlight on
 delay(3000);
}



pics:
http://img.plici.ro/image/3ER
http://img.plici.ro/image/3Ey
http://img.plici.ro/image/3EU

I hope you can see it clearly. Thank you!

floresta

#3
Mar 28, 2016, 09:04 pm Last Edit: Mar 28, 2016, 09:05 pm by floresta
Quote
I hope you can see it clearly. Thank you!
Can you see them clearly?  If not how do you expect us to?



Why don't you just forget the Sainsmart examples and use a library that works instead?

Take a look at this tutorial: -->  http://arduino-info.wikispaces.com/LCD-Blue-I2C

Don

bogdan94

Actaully I can, there are four wires:
Green-5V/VCC
Blue-Ground
Orange-SCL
Yellow-SDA

That is the library I use, that exemple is from the forum, and when I first bought my lcd, it seemed easier to understand that the one from the library, so I saved it.

I want to say it again, the lcd worked perfectly, not the code, or the library are the problem, neither the circuit. It broke down when the arduino was connected to both the laptop and the external power supply.
Now only the backlight works,I can't see the white pixels anymore.

Thanks.

Paul__B

Can you see them clearly?  If not how do you expect us to?
People don't seem to believe me when I tell them how to take a picture! :smiley-roll:

I don't recall whether that particular module defaults to the backlight on or off, but you need to re-test the operation of the contrast control by connecting power only and not SDA and SCL, looking for the first line of "blocks".  In the absence of a backlight, look at it under a strong light (sunlight will do fine!).

If you cannot view the "blocks" this way, yes the module is broken.  Check soldered connections and the contrast control itself.

bogdan94

When I came home today, it was cloudy and light was poor, but I honestly don't see in which photo you can't see the connections, except the one with the LCD, it is too bright to take a proper photo.

Quote
If you cannot view the "blocks" this way, yes the module is broken.  Check soldered connections and the contrast control itself.
I did that, I can't see that white blocks. I turned the backlight off by taking out that jumper from the back and checked with my phone flashlight.

I guess I will buy another one, maybe this was faulty.

I have one more question, I want to use this LCD for a project that needs to be powered on for days, maybe weeks. What is the lifetime of an LCD like this? Should I make the backlight to turn on/off every few seconds, or so? Should I put a resistor instead that jumper to dim it? Or maybe a photoresistor?

Are this solutions helpful?

I consider to put a photoresistor there to dim the backlight in the night.

Thank you!

Paul__B

A very interesting question.

Supposedly, these LEDs have of the order of 50,000 hours lifetime, which is of course, 28½ years or so.  I do tend to wonder however, as they are fluorescent devices and fluorescent lamps do wear out relatively soon - a year or two of actual use.

But then the UV in a fluorescent (gas discharge) lamp and the plasma bombardment is vastly harsher than in a white LED, so perhaps it is reasonable - other people have stories pro and against.  And the life figures are of course, extrapolated as they clearly have not been tested that long.

It is probable that halving the (maximum) LED current will prolong its life considerably more than a factor of two.  People have tried PWM (which may itself have deleterious effects on the LED for all we know) and arranging circuits to provide multiple or proportional levels.

I find that absurd.  If running from batteries, you certainly would want to switch off the backlight.  On mains supply however, the power consumption (100 mW or less including the resistor) is essentially negligible,  so after setting (limiting) the maximum brightness by replacing that jumper with a resistor, you can provide a resistor from the Arduino Vcc (5 V) on pin 2 to pin 15 or Gnd on pin 1 to pin 16 - depending on which is switched by the transistor and link - to set a minimum brightness and it now switches between that minimum and the maximum by the software control.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy