Go Down

Topic: 1602 : problem of brightness ! Please Help Me ! (Read 4031 times) previous topic - next topic


Hi ,i'm using arduino leonardo and i just bought this LCD shield from iteadstudio : http://www.robot-italy.com/en/1602-lcd-shield.html
It worked very well until i tried to change the code and pins from 4,5,6,7,8,9 to A0,A1,A2,A3,A4,A5 and try this analog output pins !
But when i connected pins i forgot to connect pin 5V to 5V and Gnd to Gnd but i did the opposite :'(
So the screen brightness has decreased very much !
And now i can't see message screen very well , but it's here , i see it when changing the message .

So i hope you can help me to increase the brightness :)
PS : i have a variable resistance on shield , i modified it to increase brightness but it wasn't enough to see it well :s
and sorry for my bad english :P

jack wp

This being a shield, that plugs on top of leonardo, how did you change the pins?
Did you change all the pins back to normal, plug it on top of the leonardo, and fix the problem, or still bad?

Do you have a back light lit?


I just connected pins with female to male wires , i didn't plug the shield directly on leonardo .
And i don't know if i have back-light lit but i think yes :s

Any solution ? :D

jack wp

If you don't know if the back light is lit, than, that probably means it is not, and is your problem.
On many board like that, the pin of the shield that plugs into pin 10 is used to control the back light.

You can try running a wire from pin 10 on the arduino board to where it would have been plugged to if mounted as a shield.
good chance that will fix it. If not, you should plug the shield onto the arduino board and see if that fixes it.


I pluged the shield on arduino ! But no changements :s
another solution ? maybe something is burned or broken :/


jack wp

It worked before, but after wiring, maybe reverse wiring, it is not working?
But the characters do change, you just can barly see them. Like if you shinke a flash light on the display you can see the characters.
So, that sounds like either backlight or contrast problem. If the LCD does not light up then the back light is not on.

When you plugged it back on as a shield, I assume you changed the sketch code back to original?
Still no back light?


Yes i did it !  :smiley-roll-sweat:
This is the code :
Code: [Select]
//Sample using LiquidCrystal library
#include <LiquidCrystal.h>
* This program will test the LCD panel and the buttons
* Mark Bramwell, July 2010
// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
// define some values used by the panel and buttons
int lcd_key     = 0;
int adc_key_in  = 0;
#define btnRIGHT  0
#define btnUP     1
#define btnDOWN   2
#define btnLEFT   3
#define btnSELECT 4
#define btnNONE   5
// read the buttons
int read_LCD_buttons()
  adc_key_in = analogRead(0);      // read the value from the sensor 
  // my buttons when read are centered at these valies: 0, 144, 329, 504, 741
  // we add approx 50 to those values and check to see if we are close
  if (adc_key_in >= 755) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
  if (adc_key_in < 50)   return btnRIGHT;   
  if (adc_key_in < 195)  return btnUP; 
  if (adc_key_in < 380)  return btnDOWN; 
  if (adc_key_in < 555)  return btnLEFT; 
  if (adc_key_in < 755)  return btnSELECT;   
  return btnNONE;  // when all others fail, return this...
void setup()
  lcd.begin(16, 2);              // start the library
  lcd.print("Push the buttons"); // print a simple message
void loop()
  lcd.setCursor(9,1);            // move cursor to second line "1" and 9 spaces over
  lcd.print(millis()/1000);      // display seconds elapsed since power-up
  lcd.setCursor(0,1);            // move to the begining of the second line
  lcd_key = read_LCD_buttons();  // read the buttons
   switch (lcd_key)               // depending on which button was pushed, we perform an action
   case btnRIGHT:
   lcd.print("RIGHT ");
   case btnLEFT:
   lcd.print("LEFT   ");
   case btnUP:
   lcd.print("UP    ");
   case btnDOWN:
   lcd.print("DOWN  ");
   case btnSELECT:
   case btnNONE:
   lcd.print("NONE  ");

I saw code contain pin 13 maybe i should activate it !

jack wp

I am not sure what this means?
Yes i did it !
I could guess, but I would probably not guess right. Please give more details in your sentences.


Yes i changed the code to original and i pluged it as a shield on arduino and still no light :s

jack wp

Well, sorry to say, it sounds like it may have gotten burnt out.
You have it plugged in and using same sketch that worked before. but it is not working now? 
May be time to order another one (and be more careful in wiring next time). Sorry, but we have all been there before.


It looks like you have a "White on Blue" LCD. These must have a working backlight for you to be able to see the text on the screen.
Is the white backlight on or not? If it is not on when you simply connected the LCD as a shield without any wires, you probably managed to fry the backlight or maybe a component on the PCB.


A couple of things.
The AVR has analog input pins but doesn't have any analog output pins.
All the AVR output pins are digital and the analog input pins can be used a digital outputs.
The Arduino analogWrite() function outputs a digital PWM signal not an analog voltage.

The shield you have uses analog pin 0 as an input to read the keyboard buttons,
so you shouldn't re-wire the pins use analog 0 as a digital output to drive the lcd
as you explained in your first post.

By hooking up the power backwards it possible that something was damaged on the shield.
It is also possible that if you used A0 as an output and pressed a button, that the A0
pin could have been fried.

A few questions about what you are seeing now:
- Are you saying the EXACT same configuration,
(shield plugged into Arduino), EXACT same sketch that used
to work, now has no or a very dim backlight?

- Is the backlight very dim or completely off?
Turn off the lights to see, if necessary.

It is possible that the backlight transistor was fried.
From looking at your board, it looks like it should be easy to fix.
Can you read the part number of the transistor?
It is next to hole over by the contrast pot.
Also what markings are on the part next to it?
I'm assuming it is a resistor but what are the markings?

Given the lower power backlight requirements of the 16x2 backlights,
there are some options for repairing the board, should it be a transistor issue.
But first we need to know what transistor the board has.

--- bill

Go Up