LCD Backlight Proper Wiring


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Limiting resistor

    I just got off the phone with New Haven display and they said that it is typically going to draw between 120 and 150ma for this backlight. He also said that on the back if R7 has a resistor then I don't need a current limiting resistor just hook up 5vdc to it and I will be fine. So I guess that answers that?
    Thanks
    David

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    In this day and age, any B/L drawing more than 25mA is pretty poor design!!! You need that Transistor (or spare driver on a ULN2004 or similar if you're also driving relays and things)... but then that simplifies your B/L software...

    Backlight var PortD.0

    .. ..

    High Backlight ' Turn ON B/L
    Low Backlight ' Turn OFF B/L


    You can also run the B/L through a spare Hardware PWM Channel... then you can vary the Brightness (as you can with Contrast) to the Users comfort preference. This is handly... B/L's wear out and age (especially the White LED types which tend to be driven at their extreemes)... if normal operation is about 40% of PWM, as it ages you can just increase the Brightness. Typically, white LEDs start to deteriorate after 2-3 years of continuous use... the Punter sends the unit back for repair because it's looking a bit 'dull', you increase the PWM up to 60% (via a secret software SETUP) and charge a few $$ for the repair... geeze... how many money-making business ideas can a girl give out on a public forum...

  3. #3
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Much thanks...and a follow up question(s)

    Melanie, Thanks for the great tips. I think I am just going to add a couple
    2N2222's to my circuit to take care of the relays I am drving and the LCD backlight for now. I see on rentron.com he's using the 2N2222 with a 10k resistor as a relay driver so I would assume that driving the LED for the backlight the 2N will work just as well. The specs say it will drive up to
    600ma so I should be good to go with those, see any problems with that? So let me ask a stupid question. As long as whatever device I am going to drive stays within the boundaries of being able to be driven by TTL signal I'm ok coming directly off a pin on the pic, perhaps I may need a pull up or pull down resisitor but I won't be overdrawing current that could damage the pic correct? Now for the really stupid question which really shows my lack of electronics knowledge the relays I am going to be driving are +12vdc. It's ok to mix that +12vdc through the 2N2222 to drive those right? If that is so stupid you don't want to answer I will understand.

    Thanks
    David

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    A ULN2004 has 16 pins and is one component. (of which 60% will remain unused and available for future expansion.

    Two Relays need (a) a Transistor each (3 pins), (b) a Base Resistor each (2 pins), and (c) a Diode across the Relay coil to surpress the back-emf each (2 pins) each. The LED will require a Transistor (3 pins) and a Base Resistor (2 pins). That's eight components and a total of 19 wires to solder (and a lot more money!). So make work for yourself...

    You don't need a pull-up or pull-down Resistor if your PICs initialisation is quick enough... but if you're sloppy, those Relays will need a pull-down (two more components and another four soldered joints).

    The 12vDC current path goes through the Transistor and not through the PIC. The PIC is just driving the Transistors Base (through a limiting Resistor). The next question you haven't asked yet is the value of the Base Resistor. Well, how much current do you want the transistor to draw through the Emitter/Collector junction. 10k may well be good enough for your Relays which are probably around 30mA each, but you may need a lot lower value for 120mA of Backlight.

    The plain vanilla 2N2222 has a gain of 100 (Datasheet). So a 10K Resistor at 5v will draw 500uA through the Base multiplied by the device gain is good for upto a 40-50mA load (simplified explaination but will suffice here). A 120mA load will require about 1.5mA through the Base... well you can do the math...

  5. #5
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default I like soldering (not!) Good advice thanks.

    Melanie, I think you're going to have to start to charge tuition... I realize we've gone beyond a question regarding a general pic question I hope you don't mind the follow up. If I just asked you for the value of the base resistor I would not end up learning anything it would just show I am lazy and I am not.

    Ok so let's say I just want to drive the backlight and go with a 2N2222 to accomplsih this. If I review the data sheet and the calculation I've looked up to calculate the needed base resistor I get: (Sorry if my symbols aren't exactly accurate. Hfe and Vbe from the datasheet)

    Ib = Ic / Hfe = 120ma/100 = .120/100 = .0012
    Rb = (Vdc - Vbe ) / Ib = (5 - .6 ) / .0012 = 4.4/.0012 = 3666 = 3.7k

    If I add in a 30% extra 5 - .6 / .0012 * 1.3 = 4.4/.0015 = 2933 or approx 3k on the base resistor.

    Did I get close?
    Thanks again for your advice and assistance.
    David

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Yes, you're good to fly solo on that one.

  7. #7
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Good news

    Quote Originally Posted by Melanie View Post
    Yes, you're good to fly solo on that one.

    I couldn't have done it without you! Thanks very much for getting me pointed in the right direction.

    David

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. Easy LCD BackLight
    By Melanie in forum Schematics
    Replies: 0
    Last Post: - 17th October 2004, 13:18

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts