Shop OBEX P1 Docs P2 Docs Learn Events
Lcd backlight control — Parallax Forums

Lcd backlight control

Steve2381Steve2381 Posts: 94
edited 2005-06-06 18:27 in BASIC Stamp
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
·

Comments

  • NewzedNewzed Posts: 2,503
    edited 2005-06-06 12:45
    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
    ·
  • Steve2381Steve2381 Posts: 94
    edited 2005-06-06 14:03
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-06 14:08
    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
  • NewzedNewzed Posts: 2,503
    edited 2005-06-06 14:10
    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
    ·
  • NewzedNewzed Posts: 2,503
    edited 2005-06-06 14:13
    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
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-06 14:27
    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
  • NewzedNewzed Posts: 2,503
    edited 2005-06-06 14:29
    True, Chris.· I think I used a 1K.

    Sid
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-06 14:35
    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
  • Steve2381Steve2381 Posts: 94
    edited 2005-06-06 18:04
    Thanks lads

    Steve
  • ellizardellizard Posts: 106
    edited 2005-06-06 18:27
    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
Sign In or Register to comment.