Hello All:
I'm new to Arduino, programming and electronics. (Please be gentle).
I searched the forum, and although I found MANY LCD Power issue threads, I could not find my answer.
When I plug my LCD into the Arduino (Pin 8 ) and set it to HIGH it goes on as expected.
But it is not as bright as when I plug it directly into 5V power on the breadboard.
I've tried other pins including PWM pins using an analogWrite.
Yes. Your backlight is probably drawing more current than the Arduino I/O pin can supply. It doesn't matter which pin you try they all have the same limitations. You are overstressing your Arduino and it is doing the best it can to power your LCD backlight. Ultimately you are likely to irreversably damage the I/O pin.
It is generally considered a good idea to limit the current from any single I/O pin to around 20 mA. The absolute maximum allowable current for any one pin is 40 mA and there is also a limit to the total current for various groups of pins.
If this is the case then you should power your LCD backlight directly from the 5V and control it with a transistor driven by an I/O pin if you feel that such control is necessary.
Oh! I was under mistakenly the impression that all of the pins were capable of outputting 5V I have alot to learn but that clears it up for me for now...except now I need to research transistor control of the backlight.
If resistor R8 (or R9) on the back of the 1602 display is "101" - 100 ohms - then you are not overloading the Arduino pins because that value restricts the current to about 20 mA.
It's not a matter of "too much current" at all. The fact is that the Arduino driver does necessarily have some inherent resistance, and can not hold the voltage at 20 mA - you lose at least half a volt (Figure 34-24 in the datasheet) so naturally the LED will be dimmer powering it from a port pin, than directly from 5V.
You might get it a little brighter by controlling it with a transistor or a logic-level FET - if it matters.
It is also worth asking why you feel the need to turn it off.
Note also that Figure 34-24 very strongly hints that the Arduino pins are not intended to source (or sink) more than 20 mA.
Thanks again. My project is a switch controller for my jeep. I was providing an option to turn the light off at night in case it's distracting while driving. (nick.cornaglia)
Your browsers really block all function on that site?
Yes. It's just as Paul described.
It's collateral damage resulting from the defensive techniques required to make sites like this one usable when you have any combination of bandwidth, data cap, and/or latency restrictions.