Pages: [1]   Go Down
Author Topic: Dinamic backlight and contrast on GLCD and LDR  (Read 545 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
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
« Last Edit: March 16, 2013, 03:18:17 am by ehuntabi » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No ideas?
Logged

Dallas, TX USA
Online Online
Faraday Member
**
Karma: 63
Posts: 2648
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: