Backlight of 128x64 graphic LCD is not working[SOLVED]

Hello,

I bought a graphic LCD (model: TG12864B http://www.robotistan.com/dosya/Robotistan_128x64GrafikLCD.pdf) and I connected it to Arduino UNO according to following image. After that, data is showed on the LCD but backlight is not working.

Hello,

I bought a graphic LCD (model: TG12864B http://www.robotistan.com/dosya/Robotistan_128x64GrafikLCD.pdf) and I connected it to Arduino UNO according to following image. After that, data is showed on the LCD but backlight is not working.

should pin 20 be connected to GND or to VIN? check the datasheet

robtillaart: should pin 20 be connected to GND or to VIN? check the datasheet

datasheet shows anode on pin 19 and cathode on pin 20 so the wiring is correct.

While the datasheets usually show the maximum current allowed for the backlight (and this one does), what is never clear in the datasheet is whether or not there is already a current limiting resistor on the module. Depending on the module, you may need a much smaller resistor or perhaps even no resistor. If you visually look at the board, you usually can see the resistor if you follow the traces from pins 19 and 20 around to the backlight connections.

Look at your module and see if you see a surface mount resistor on the traces going to the backlight.

You can also use an ohm meter to measure the resistance between pins 19 & 20 and the LCD backlight connections. That will tell you if you have a resistor and what value it is .

But just knowing if there is a resistor and its value, isn't quite enough since the current is also based on the difference between VCC and the forward voltage of the backlight and the datasheet doesn't specify the forward voltage of the backlight. i.e. in order to calculate the current, there isn't enough information.

The best way to check/verify this is to use a meter to measure the current flowing through the backlight and then adjust the value of an external resistor (if necessary) to get the desired brightness without going over the maximum current specified in the datasheet.

Without actually measuring the current, it is pretty much just guessing. I am not a fan of guessing since incorrect guesses can damage things.

If you do want to guess, at least make an educated guess. So time to rev up your knowledge and use ohms law. http://en.wikipedia.org/wiki/Ohm%27s_law

Looking at the datasheet, (look at page 4) you can see that the absolute maximum forward current is 120ma. But you can look below and they give an example using 80ma so we know that 80ma is enough to see the backlight. Then, if you assume that the forward voltage of the backlight is 0 (which is isn't), you can then calculate a resistor value that will be guaranteed to give an actual current that is less than the calculated value. In this case I think we should shoot for between 80 and 120ma.

So going back to ohms law of V=IR

Our "net" voltage of V is our initial voltage of VCC minus our backlight forward voltage So V = VCC - Vf Where VCC is 5 and we are going to assume Vf of zero. and I is 80ma (.08A) or 120ma (.12A)

So for 120ma Then 5 = .120 R R = 5/.120 = around 42 ohms.

For 80ma Then 5 = .08R R = 5/.08 = around 63 ohms.

So even if the module doesn't have an on-board resistor it will be safe to drop down to the 40 ohm range. You could put two, three, or four 220ohm resistors in parallel to reduce it down to 110, 73 ohms or 55 ohms.

But since we used a Vf of 0 and there might be an on board resistor, this still might not work. However, we do know that above 40ohms is safe and will not damage the backlight.

As mentioned above, the best way is to use a meter and then you can actually see what is going on and adjust the value according.

--- bill