Go Down

### Topic: LCD back lighting. (Read 998 times)previous topic - next topic

#### lost_and_confused

##### May 25, 2012, 11:53 am
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.

#### terryking228

#1
##### May 25, 2012, 12:12 pm
Hi,
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

#### lost_and_confused

#2
##### May 25, 2012, 11:47 pm
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.

(http://liudr.wordpress.com/)

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.

#### RandallR

#3
##### May 26, 2012, 07:17 am
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.

#### floresta

#4
##### May 26, 2012, 08:48 pm
Quote
You might need to add a small resistor (100-200 ohms) on the high side somewhere if you need current limiting.

might ?  if ?

Don

#### RandallR

#5
##### May 26, 2012, 10:23 pm
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".

#### lost_and_confused

#6
##### May 27, 2012, 12:55 am
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.

#### RandallR

#7
##### May 27, 2012, 04:02 am
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.

#### lemming

#8
##### May 27, 2012, 05:00 amLast 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.

Go Up

Please enter a valid email to subscribe