PDA

View Full Version : Lcd backlight control



Steve2381
06-06-2005, 07:58 PM
Hi all

Anyone got a circuit diagram to control the backlight on a 2x20 Lcd?
I have a pin ready as an output, but the backlight takes a fair hefty load and I am worried my transistor circuit isn't up to it.
I don't really know how to calculate transistors, and therefore I do not want to overload the pin on the stamp.

Thanks
·

Newzed
06-06-2005, 08:45 PM
Backlighting on a 2x20 can draw up to 230ma, dependibng on how hard you drive it.

I made a separate power supply for the backlight, using Vin to the Stamp and a 7805.· The 5VDC is connected across a one-turn 100 ohm pot that handles up to 500ma, with the wiper of the pot going to the A terminal on the LCD.· The K terminal on the LCD goes to ground.· The pot has a 100 ohm· 1/2 watt resistor connectred across it so the resultant resistance is 50 ohms.· The pot will draw about 100ma on its own.

The pot can be replaced with a resistor having a value 0f 2.0 ohms to 4.7 ohms but you lose the variable control feature of the pot.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)
·

Steve2381
06-06-2005, 10:03 PM
I have the Lcd backlight already connected on its own 7805 power supply.
I am looking to actually turn·the backlight·on and off using an output·pin on the stamp as a switch.
Thanks

Chris Savage
06-06-2005, 10:08 PM
Steve,

·· Hopefully your backlight connection involves a resistor.· It's very rare that a backlight runs on 5V.· Most of mine on 4 X 20 displays have required at least a 22 ohm resistor.· In any event you can use a standard 2N2222 NPN transistor to switch the backlight on/off using a signal from a Stamp pin (Serial backpacks I have made in the past do this).· Connect the emitter to ground, the collector to the negative terminal of your backlight and the base to a 220 ohm to 1K (I use 1K) resistor to the Stamp Module's I/O pin.· Making that pin HIGH will turn the backlight on, making it LOW will turn it off.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Newzed
06-06-2005, 10:10 PM
In that case you could use a Stamp pin to turn on a TIP120 - a Darlington transitor.· 5VDC to the A terminal of the LCD, the K terminal of the LCD to the collector of the TIP120.· When the Stamp sends a HIGH to the TIP, it turns it on, taking the TIP collector to logical ground, which completes the LCD backlight circuit.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)
·

Newzed
06-06-2005, 10:13 PM
Forgot to mention - you would need to put a series resistor in the 5VDC to A to limit the current through the backlight.· My backlight runs on a 3.3·ohm resistor.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)
·

Chris Savage
06-06-2005, 10:27 PM
Sid,

·· As I recall the TIP120 also requires a resistor between the BASE and the Stamp Module's I/O pin.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Newzed
06-06-2005, 10:29 PM
True, Chris.· I think I used a 1K.

Sid

Chris Savage
06-06-2005, 10:35 PM
Sid,

·· Yep, that will work.· Just didn't want anyone to fry a Stamp I/O pin.· That wouldn't be good.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Steve2381
06-07-2005, 02:04 AM
Thanks lads

Steve

ellizard
06-07-2005, 02:27 AM
HI Steve2381

I used for the LCD i use on my projects 2 pins of the BASIC Stamp one connected as the other people already told you, the other pin connected to an RC circuit with a photoresistor of 10kohm substituting the resistor, with a simple IF...THEN loop you can switch on the backligthing whenever the ambient ligth is no more sufficient for the correct reading of the display.

I have not now at quick reach the circuit and the snippet code of that function, but if you desire (or anybody else) i will post, (simply give me some days, you know.... the bread must come before the play)



Regards

Stefano