Go Down

Topic: Dinamic backlight and contrast on GLCD and LDR (Read 844 times) previous topic - next topic


Mar 15, 2013, 09:41 pm Last Edit: Mar 16, 2013, 09:18 am by ehuntabi Reason: 1
I want the backlight and contrast of my GLCD KS0108 can vary according to the ambient brightness as a LDR. I've searched but have not seen anything that could be used to replace the potentiometer and the resistance limits the backlight.
Any idea?. thanks


You won't need to vary the contrast on inverted displays.
(white dots on dark background)

To vary the brightness of the backlight (which will vary the intensity of the white dots),
you simply need to use a transistor to control the backlight.
You can control the transistor from the Arduino or directly with the LDR.
If using the Arduino, hook one of the Arduino's digital pins that support PWM up to the base
of the transistor.
Then you can use analogWrite() to control the PWM going into the base of the transistor
which will vary the brightness of the backlight.

If you don't want to use the Arduino to control the intensity, you could use the LDR to
directly control the transistory.
You would have to experiment a bit with the resistor divider values,
but you could use the LDR to drive the transistor directly.

Using the Arduino would be a bit more flexible in that you could change the light thresholds
or behavior in s/w vs having to modify the hardware to make those types of changes
if the LDR is being used to directly drive the transistor.

--- bill

Go Up