The sketch I'm using is Hello World (and plethora of others in attempt to make the lcd light up)
I've been fighting with this LCD to light up as per tutorial is outlined. As soon as I connect any wire to the 5V the Arduino's lights go out. I've been trying countless of other tutorials, tried adding a pen or a 220K resistor both. Nothing.
It wasn't until I came across a random Google image that used three wires connected to the side of the LCD did my backlight turn on. But, that method doesn't really work since I want to show data on the lcd.
I have connected a power supply to the arduino. Arduino lights still turn off.
Specifying exactly which LCD you have including a link to it's datasheet.
Specify exactly which tutorial you are attempting to follow.
Provide a photograph of your setup. We must be able to unambiguously follow each wire from one end to the other.
Provide a copy and paste version of your sketch properly set off by 'code' tags.
Verify that you understand that getting the backlight to function is a totally separate operation from getting characters displayed on the screen.
If the lights on the Arduino turn off when you connect your display then you may very well have the power connections to the display reversed. There are a very few displays with the functions of pins 1 and 2 reversed.
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* 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)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Booger");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
Probably you will not belive this. I have a lcd display just like that one, the only way I got the light to show up was connecting pin 16 (marked K) to +5V trough a 470 ohm resistor and pin 15 (marked A) to 0V.
The only odd thing I have on my setup is the contrast pot, the only I had on hand is a 2 Mohm instead of 10K, but I don't think this have any importance.
Connecting A and K the "right" way doesn't work, no light at all.
Connecting A and K the "wrong" way without a resistor, does NOT work either (but no magic smoke).
This board does have a 101 resistor that looks to be connected between pin 15 and the backlight.
While I'm happy to have it working and can go on with the project, I'd like to know what's happening here.
Go on. You can follow the Backlight pcb traces with your eyes. There should be little more than LED + series resistor.
Your DMM will determine whether the LED Anode is connected to K or to A pin. Your DMM will tell you the value of the Series resistor. e.g. 0R or 100R.
The Contrast pin on most 16x2 displays needs to be "about" 0V. So a 2M0 potentiometer will be ok when it is at the bottom end i.e. about 0R.
I am fascinated by your photo. You could buy a Uno clone and an I2C 16x2 for about $8. Everything would be neat and tidy! You can buy a cheap DMM for about $5.
Yes, I have always suspected that some items on Ebay are cheap because the factory had assembled the LEDs backwards.
My DMM is about that price, I trust it so little that I didn't try... I have a better (and quite old) AMM but you sort of need an engineering degree just to read the scales
Looking at the board it looks to have only 1 resistor valued 100 ohms between the anode and the led pin that's marked as anode. In the silkscreen all looks ok, so I agree with you, the led must have been mounted backwards. If that's the case, I can live with it.
Yes, but it's quite hard to adjust the pot, it's kinda crusty, having spent the last 25 years in a box in the attic, I'm still waiting for more "modern" parts to arrive from ebay.
I may be a noob, but I'm quite lazy too, I don't see the point of having 12 wires where 4 (maybe 6) will do, so I have this on order
it will be a pain to de-solder that pin header .
I have a UNO clone on order too, a pro mini and a couple of ATtiny85 but I quite like the Nano (and it's the only one I have right now).
If I could make the ATtiny to control the LCD, the RTC and the T/H sensor I might even shove this in a project box.
When I bought that lcd I had 0 experience, and didn't knew that there were I2C ones, and I didn't noticed that it was a inverted LCD that totally needs the backlight. Before I got the light working I had to shine a flashlight from the side in order to see that the lcd was actually doing something.
A $5 DMM will be perfectly serviceable. Especially for determining the difference between a 1k0 and 100R. Even easier for the difference between 100R and 0R.
If you can't afford $5, your eyesight can follow copper traces under the solder-mask. It can even read the numbers printed on the SMD resistors.
Your contrast needs to be about 0V. Forget about a pot. Just connect pin#3 directly to GND. It will give you a visible display.
Uno or Nano are easy to use for development. Pro Mini is ok as a final target.