Are you sure it's a 0-5V input and not a direct wiring to the LEDs? Standard LCD offer 2 pins which are directly the anode and the cathode of the backlight led strips. The last one I used had a voltage drop of about 4.5V @ 120 mA.
If it's actually what you've got (or something close), you'd like to power your LEDs by a transistor controled by PWM.
Remember: when it comes to light an LED, you can power directly your LEDs with a PWM signal. But don't smooth it out with a filter since the LED is not a linear device!
How much current does the LCD backlight need?
I think an Arduino pin does not have sufficient current drive - the series R in the lowpass filter will just limit it further.
Sorry, my info was for something else: replacing Contrast pot with PWM. Ideal Contrast voltage (based on measuring pot wiper @ max brightness) = 0.18V -0.22V.
I have never had an LCD that accepts analog 0-5 V input. (Unless you mean a standard lcd that normally uses a pot for contrast). (since wiper voltage IS 0 - 5V)
The OP question is misguided (but not infrequent).
To control the brightness of the backlight, simply feed raw PWM to the LED. This will work just fine, but keep the two wires to pins 15 and 16 together and separate to the other wiring from the Arduino - that is, do not just wire the ground wires to pins 1 and 16 together on the LCD.
Generally, with the values of R8 as "101" (100 ohms) and R9 (if present) as 0 on the LCD module, the LED will draw no more than the 20 mA that an Arduino output is capable of supplying directly.
The contrast control does not require recurrent adjustment, it is "set and forget" (with the possible exception of operation at extremes of temperature).
Hello, I'm thinking of using a simple RC network to adjust the brightness level on an LCD, my LCD has a simple 0-5V input for the backlight.
Are you sure you don't mean Contrast (Pin-3) ?
There appears to still be some confusion about the topic here. The OP's question ( which may have been ' misguided ' was about an LCD he claims accepts 0 - 5V . It is still unclear if he meant the Contrast pin ( which obviously controls Contrast) (which I believe the last post was referring to) OR the Led Anode & cathode ( which aarg was referring to in his comment about PWM, which controls Brightness. The Backlight , like any other led , as aarg has pointed out, can be controlled with PWM. The Contrast pin can be pulled down to 0.2V using PWM but requires the RC filter to prevent flicker. If a pot is not available, a voltage divider with 10k to +5V and 1k to GND and LCD_Pin-3(Contrast) connected in the middle will yield about 0.2V. I am not convinced the OP really want to control the brightness of the backlight, (or the Contrast for that matter). There is nothing really to be gained by either. The contrast should be set once at the optimum and then left alone. The backlight brightness is normally left on or switched on and off for various reasons. (Such as the I2C scanner sketch that blinks it three times when it finds a match. Rarely is there an application where there is anything to be gained by varying the brightness as opposed to switching it on and off at will. I think there are still some unanswered questions here.
I use backlight intensity control for RGB colour control and balancing. It is hard to get good colours using on/off RGB values. Even white isn't a very warm white, I had to find the numbers to create a pleasant shade.
raschemmel:
There is no mention of RGB LCD in the OP's post. Can you give any reason to think the OP has an FGB LCD ?
I think he might only call it a FGB LCD when he is having severe difficulty.
I echo your comments - variable brightness is virtually never required. At most, three brightness levels, or indeed, two of these three are required: Off, On, and dim for night use. Clever use of a transistor could implement all three with one Arduino pin.
Noted that the OP has long ago abandoned this thread and is amusing himself elsewhere.