Go Down

Topic: LCD back lighting. (Read 1 time) previous topic - next topic


I have posted something about this and mentioning a VCO.  But the response for the VCO is opposite to what I want.

As the LDR (light dependent resistor) is in the dark, the resistance goes up.

So with an OP-AMP and feedback, I can get what I want.

But I am stuck on how to use the OP-AMP to drive the LED's.

I am going to run the board on 12v DC - it seems to work.

So with 12v to have the light "bright", I have a resistor of 'x'.  To make the light darker, the resistor value goes up.

Alas LED's are current driven.  So I can't quite change the voltage.

I need a bit of help with building the circuit.

Anyone - please?


How many LEDS? How much power (LED Voltage and current)??  This will affect possible circuits..
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info


Sorry, I was in a bit of a daze when I wrote the post.

It is the 20x4 display as used in a lot of projects.


So how many LED's, how much current:  I am not sure.

Yes, not a good place to be when trying to make an electronic circuit.


I have something like that for one of my projects.
I put the photo sensitive resistor in a voltage divider and feed the midpoint to an analog input.  I now have a number that goes up and down with the light.
I then adjust the range of the values and write it to an analog output port (PWM).  That connects to the base of a transistor through a resistor 1K-2K.  I think it is an NPN on the ground side of the backlight.  Mine works fine.  You might need to add a small resistor (100-200 ohms) on the high side somewhere if you need current limiting.
You can modify the range adjustment to get the lighting response just the way you want it.


You might need to add a small resistor (100-200 ohms) on the high side somewhere if you need current limiting.

might ????  if ????



I don't have one.  I don't know if it is built in or 5V doesn't cause too much current.

So yes "might" , "if".


Yeah, thanks.

Alas you are using the Arduino for the control.

There aren't enough pins for my needs to do that.  So I am using discreet components - thus the OP-AMP.

The LDR drives the input and the output drives the back-lighting of the LCD.


You can set up your op-amp and send the output through a 200 ohm resistor into the backlight.  That will limit you current as the output of the op-amp varies.


May 27, 2012, 05:00 am Last Edit: May 27, 2012, 05:17 am by lemming Reason: 1
You should not have to use an op amp or arduino depending on what you are trying to achieve.

In my car, the backlighting of the control panel dims at night so as not to dazzle the occupants.
On other systems the backlight intensity increases at night and turns off during the day.

I assume that you are after the latter behavour.

I have draw up a rough schematic. Ignore the battery voltage. The voltage should be 5 v.
D1 is you backlight LED. (ignore the "QED123" written next to it).
Check your datasheet for the LCD display and see what the maximum current for the backlight is and using ohms law work out the value of R1. Make sure the current is well below maximum to be safe. I have found that you can be conservative and still have good brightness.

Adjust value R2 to make sure that you completely saturate the transistor at maximum darkness to get maximum brightness of the backlight.

The value of R4 will be dependent on the range of the LDR. Try matching the value of R4 to the maximum value of the LDR to start with and work from there.

Try the circuit using  cheap LED instead of the LCD until you get the values right then put in the correct value for R1 (using Ohms law ) and attach your LCD.

Others feel free to chip in to add your changes/advice.

Go Up