BartArien:
I am using a standard 2x 16 LCD screen without I2C module as on Assembled Standard LCD 16x2 + extras - White on Blue : ID 1447 : $10.95 : Adafruit Industries, Unique & fun DIY electronics and kits
i want to be able to switch the screen off (with a button) because I only need to check the display once a week
Put the button in the 5 V line?
BartArien:
I found out that with this LCD the LED BACKLIGHT draws 100 mA
That is certainly what the datasheet suggests, and is somewhat unusual. But this display is - according to the datasheet - completely different to the "1602" displays with which we are familiar, to the extent that I suspect the datasheet is nothing more than a very bad counterfeit of a different company's product with many nonsensical errors.
It specifies the "Supply current for logic" as typical 120, maximum 150 mA. The HD44780 chip and presumably its clones, is specified at 150 typical, 300 maximum μA - that is microamps. This specification in the datasheet is surely not correct. Even if it included not only the logic, but the combined current for LED illumination as well, that would suggest the chip is drawing 20 to 50 mA.
It then illustrates the contrast potentiometer as 20 to 50k, and shows it connected to VDD (5 V) as well as VSS (ground). Now this latter is a stupid blunder you will find just about everywhere these displays are cited, so that is not entirely surprising; it means the people publishing devices and projects actually have no idea whatsoever as to how the LCD works (which is explained in the original HD44780 datasheet). The point is that you should not connect the potentiometer to 5 V, only to ground; it must be wired as a variable resistor rather than a potentiometer and as such, its value should be about 1k. If it is 10k and wired as a potentiometer, it will be usable only over one twentieth of its range and a 50k potentiometer will function only at the ground hundredth end of its range; virtually useless, you may as well just connect Vo (pin 3) to ground (which usually works, but not optimally).
What else could possibly be wrong? Well, it cites in "INTERFACE PIN FUNCTIONS" that
Pin 15 LED+ +5.0V Power supply for backlight.
Pin 16 LED- 0V The backlight ground.
... but warns: "NOTE: Do not connect +5V directly to the backlight terminals. This will ruin the backlight."
wvmarle:
Wow, that's a turbo-backlight you got installed! They normally draw only about 10 mA.
Well, no. With the "R8" being "101" or 100 Ohms, it is actually about 24 mA for the backlight. But that is within the switching capabilities of a common Arduino output pin.
wvmarle:
Just about any small signal NPN transistor such as the BC547 will do fine for this application.
Indeed. Once you have figured out the value for the backlight resistor - 0.9V /100 mA = 9.1 (or 10) Ohms - then to control the backlight only you can switch the cathode of the backlight on pin 16 with a common transistor.
With the usual version of the 1602 display requiring only 300 μA plus the contrast ladder, the display logic could be switched on and off directly by an Arduino pin with no trouble at all. If you use the correct wiring of the contrast resistor to ground only, then the 11k contrast ladder will draw only 455 μA, so a total easily less than 1 mA - generally not worth switching off (and so avoiding the dangers of "phantom powering") as long as you switch off the backlight.
But that is not what that datasheet seems to claim. If you have the Adafruit display, you perhaps need to make the measurements yourself to see if the datasheet tells the truth - it should not. Put a 100 Ohm resistor in series with the backlight and see what current it draws and what voltage appears across it.