Switching/Powering a High Currrent High Vf backlit LCD

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

I've got a backlit LCD with the following specs, If=300ma, Vf=4.2V-4.5V. My power supply is 5V and I'd like to keep it that way. Now if I use a simple 2.7ohm resistor to limit current everything works fine. The problem I'm having is what's the proper way to switch the backlight on and off.

The transistors I've tried don't seem to work because the Vce(sat) (seems to be around >=.6V for all the ones I have) is high enough to affect the current (and taking worst case scenario of 4.5 Vf the .6 V Vce(sat) would make it not work at all).

I think the same type of situation would happen with a MOSFET, though someone please correct me if I'm wrong.

So my question is what's the best way to tackle switching this load on/off? Do I bump up the source Voltage to 6 or more V (in this case that resistor starts getting more and more wasteful)? Do I look for some exotic darlington transistor with a really low Vce(sat)?

I apologize in advance if this is a stupid question, I probably should've paid more attention in those EE classes. :oops:

Thanks,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note: I'm a complete a total electronic idiot and a newbie, so don't try to find anything extremly valuable in what I say...

I just had a look at exactly the same problem you have, where I have a LEd backlight that sucks >100mA, so I can't PWM it from a pin. It works fine with a serial resistor directly on Vcc, like yours.
As it turns out, it seems I should be fine by using a NPN but using the (-) of the backlight on the transistor, that way, the voltage drop of the LED 'helps' the transistor switch when driven by the full VCC of the MCU pin.

Of course this is a completely wild guess from someone who is just watching his first transistor.. So I just barely understand what the hell it's supose to do :D

I'm trying tho :D

Attachment(s): 

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd try a 'logic level' n-channel MOSFET or one of the 'intelligent low side switches' like e.g. the IPS1011 (there's no Vcesat, just a drain/source resistance which can become very low - a couple of milliOhms, depending on type) and use Buserror's circuit with an additional 100 Ohms resistor in the gate line. MOSFET equivalent pinout to bipolar transistor: drain = collector, source = emitter, gate = base, a 'high' on the gate will switch on the LED, the bigger the device is (= current capability) the lower Rdson will be typically.

Andreas

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm I tried the NPN and the 100R on the MCU pin, and it works (when I toggle the base, the LCd backlight turn on/off... however I get about half brightness on the backlight...
What is the use of the 100Ohm resistor ? Isn t it that resistor that somehow inflences the collector/emitor path ?

Sorry if it's a silly question :D

Edit: I get 3V between the 2 led backlight PIN, instead of the 5V I'd hope for...

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 100 ohm resistor in the base is needed to limit the base-current. However, that 100 ohm is far too low.
Use an appropriate NPN-transistor, like the BC639.
Use 3k3 in the base, connect the emittor to ground, connect minus-pin of backlit to a 10 ohm resistor, the collector to the other side of the resistor, and finally the plus of the backlit to +5V.
If you use a PWM-output, like OCR0 or OCR1A, you can control the backlight from zero to max.

Instead of a bipolar transistor, you can use a N-ch Fet, like the BS170 as well. Simular connection setup, but reduce the 3k3 to 470 ohm. (connection scheme as Alenze posted; with 100 ohm you exceed the max output-current of the AVR. 470 ohm will be fine)

With a backlight that consumes 300 mA, make sure your 5V power supply is capable of delivering that current.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

buserror wrote:

What is the use of the 100Ohm resistor ? Isn t it that resistor that somehow inflences the collector/emitor path ?

Let me try to answer this and hopefully not get too much wrong. The Transistor isn't only a switch, its a current controlled amplifier. What this means is the current at the base affects the current at the collector. What you need to look at is a hfe value which you multiply by the base current to get > then the collector current that you want.

Unless you are using a big power transistor with a low hfe 100ohm would probably be way more current then you need (you'd be wasting power).

buserror wrote:

Edit: I get 3V between the 2 led backlight PIN, instead of the 5V I'd hope for...

Are you sure you are calculating the value of the backlight resistor correctly? This was confusing to me at first, without the transistor in place you'd calculate it like this
(Vcc - Vf)/I (where Vf is the forward voltage drop for the LED backlight, should be in the datasheet somewhere).

in my case its (5 - 4.2)/.3 = ~2.7ohm

With the transistor in place things get a bit more complicated since you have to worry about the Vce(sat) voltage. It seems like most of my transistors have Vce >= .6.
(5 - 4.2 - 0.6)/.3 = ~.666ohm (which is my problem, specially since both Vf and Vce can and do vary, so this particular circuit wouldn't work in my situation).

Anyways assuming you have a lower Vf I'd say double check the resistors on the base and collector and you'll be fine. But I am a not even close to any kind of expert on this. :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paul, if you get Vce sat = 0.6 V, that means that the transistor is not fully open. Hfe varies per transistor and depends on Ic-current as well. So you cannot use Ic = Hfe * Ib. In applications like this, you must drive the hard enough to get the transistor in saturation. Ic=300mA mwans @Hfe=100, 3mA in the base.

I took 10 ohms, as it's the only current limiting factor. But I am too carefull, I guess.

What type of transistors are you (Buserror and Paul) using ?

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alenze wrote:
I'd try a 'logic level' n-channel MOSFET or one of the 'intelligent low side switches' like e.g. the IPS1011 (there's no Vcesat, just a drain/source resistance which can become very low - a couple of milliOhms, depending on type) and use Buserror's circuit with an additional 100 Ohms resistor in the gate line. MOSFET equivalent pinout to bipolar transistor: drain = collector, source = emitter, gate = base, a 'high' on the gate will switch on the LED, the bigger the device is (= current capability) the lower Rdson will be typically.

Thanks for the suggestion of the IPS device I'll take a look at it.

For the plain MOSFET I've got a few questions.
1. What's the point of the resistor on the gate line? I thought that the MOSFET devices where voltage controlled and as such didn't need any kind of high current. I'd expect to just have to stick in a high value resistor between the Gate and GND and then just connect the Gate pin directly to my Micro.
2. Is there a Vds analog to the Vce that I have to worry about?
3. Any suggestions for an appropriate MOSFET device, hopefully something I can grab from ebay? (Every time I order from digikey I get in trouble :twisted:)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. The inputcapacitance of a Mosfet varies between 800 pF and 5000 pF. If you pwm it, each time that a level-transistion takes place, the AVR has to charge or discharge that capacitance.
A resistance from gate to ground shouldn't be necessary here. Except during ISP. During that time, all pins of the AVR are configured as inputs. 10 - 100k is sufficient to keep the fet off during programming.
2. The BS170 has a Rds_on of 5 ohms. But it's a nice small one, and can do the job. That answers question 3 too. FDS6612 is one more possible candidate.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
1. The inputcapacitance of a Mosfet varies between 800 pF and 5000 pF. If you pwm it, each time that a level-transistion takes place, the AVR has to charge or discharge that capacitance.

Ah gotcha. I wasn't worried about PWM at this point, but that makes sense.

Plons wrote:

A resistance from gate to ground shouldn't be necessary here. Except during ISP. During that time, all pins of the AVR are configured as inputs. 10 - 100k is sufficient to keep the fet off during programming.

Yeah that's what I was thinking was needed, again not considering PWM.

Plons wrote:

2. The BS170 has a Rds_on of 5 ohms. But it's a nice small one, and can do the job. That answers question 3 too. FDS6612 is one more possible candidate.

I was looking at the BS170 but isn't 5ohm for Rds way too much for my case and the max current too low? FDS6612 seems to only be available as a SO-8 part which is kind of a hassle.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Paul, if you get Vce sat = 0.6 V, that means that the transistor is not fully open. Hfe varies per transistor and depends on Ic-current as well. So you cannot use Ic = Hfe * Ib. In applications like this, you must drive the hard enough to get the transistor in saturation. Ic=300mA mwans @Hfe=100, 3mA in the base.

I took 10 ohms, as it's the only current limiting factor. But I am too carefull, I guess.

What type of transistors are you (Buserror and Paul) using ?


I've tried a few diff ones but the latest one is a 2N6427 (darlington NPN). I've tried driving with various different currents. For this one without a load the Vce is ~.5V and it goes up from there. Are you saying it should be higher or lower (I'm thinking it should be higher)? However anything higher then a .1 V is going to be a problem, which is why I think the standard transistor is a no go for my circuit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A darlington is a bad idea for getting a low Vce
because the base-drive of the main-transistor
is derived from its own collector-voltage.

So the collector has to stay a little bit "high"
to have base-voltage.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, like Ossi says, a darlington is out of the question here. Vce sat ~= 0.9V min.

Paul, the BS107 was a unlucky pick ... you're right, the 5 ohms is too much.
The FDS6612 is smd, but quite easy to use, even on a Veroboard. I posted a picture in the ConstantCurrent thread ... but as that's a huge thread .... it will be hard to find ;) But several logic-level Nch fet's are mentioned in there. So you can give it a try ...

Nard

For the bipolar candidates: a transistor in saturation has a Vce of appr. 0.2V. It should work fine. The BC640 is small, PTH and can handle 1A.

The tricky part is here that the backlight-voltage is so close to Vcc. Maybe the unregulated voltage can be put to use ?

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The mistery deepens ! :D

Well I replaced 100 by a 3K9 I had lying around, and no backlight....
So I added the 10ohm on the GND pin, and no more backlight...

That was bizare, so instead I removed the 10, and replaced the 3K9 with it, out of wild experiment spirit :D
Ping! Miracle, Backlight and a lot more than what I had originaly with the 100, but less than 'full'.
So, out of spike, and regardless of my respect for the help I was given up there, I removed the resistor and used the skematic as I posted it up there...

And bingo, full fat backlight.

Oh, the transistor I'm using :
http://uk.farnell.com/jsp/search...
2N3904 — ON SEMICONDUCTOR — TRANSISTOR, NPN TO-92
* TRANSISTOR, NPN TO-92
* Transistor type:Small Signal General Purpose
* Transistor polarity:NPN
* Case style:TO-92
* Voltage, Vceo:40V
* Current, Ic max:0.2A
* Power, Ptot:500mW
* hfe, min:100
* Current, Ic hFE:10mA
* Voltage, Vcbo:60V
* Current, Ic @ Vce sat:10mA
* Current, Ic continuous a max:0.2A
* Current, Ic fall time measurement:10mA
* Pin configuration:b
* Pins, No. of:3
* Temperature, full power rating:25°C
* Time, fall @ Ic:250ns
* Transistors, No. of:1
* Voltage, Vce sat max:0.2V
* ft, min:300MHz

I don't /know/ exactly the the circuit that is controling the backlight on that LCD, maybe it already has something on that makes these resistors unnecessary ?

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
* Current, Ic max:0.2A
So with 300 mA, you're over the limit of the 2N3904. I suggest you also re-check the pinning of the transistor.

No resistor in the base may damage the AVR.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mine is rated at 100mA, I think it's Paul's that needs >300mA.. so far it's been running fine, I triple-checked the datasheet and the wiring, all seems good.
I have a photodiode on an ADC pin already, I'm going to drive the backlight PWM with it next.

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This really is a job for a MOSFET, not a bipolar transistor. The collector current (300mA) is uncomfortably high for a single stage. Gain (hfe) falls sharply at higher collector currents, and that data-sheet gain of 100 may be only 20 at 300mA, requiring 15mA or more base drive from the AVR. That's pushing it a bit. Also, check the data sheet Vce(sat) - the 'on' state voltage drop. The 2N3704 data sheet gives 0.5V..1V at 100mA and it will undoubtedly be higher at 300mA. A cheap logic level MOSFET will easily do an amp with a voltage drop in the order of 0.1V. I would use a 10k resistor to ground, to make the backlight default off when not being driven, and no series resistor to the AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well it turns out that what I was experiencing was my transistor being blown. Casper on IRC #avr explained the details, and why.
I think that the transistor was blown to start with, but now the full backlight is running happily with a 1K resistor on the base. Victory at last :D

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peret wrote:
This really is a job for a MOSFET, not a bipolar transistor. The collector current (300mA) is uncomfortably high for a single stage. Gain (hfe) falls sharply at higher collector currents, and that data-sheet gain of 100 may be only 20 at 300mA, requiring 15mA or more base drive from the AVR. That's pushing it a bit. Also, check the data sheet Vce(sat) - the 'on' state voltage drop. The 2N3704 data sheet gives 0.5V..1V at 100mA and it will undoubtedly be higher at 300mA. A cheap logic level MOSFET will easily do an amp with a voltage drop in the order of 0.1V. I would use a 10k resistor to ground, to make the backlight default off when not being driven, and no series resistor to the AVR.

Yes I think you are correct, I've switched over to a 2N2222A driven by a 20mA current and my current limiting resistor to 1ohm to compensate for the Vce (seemed to be about .44V). This works but the transistor gets awfully hot. If I understand the math the power dissipation should be ~.15W which is well within the .5W the transistor can withstand, but maybe I missed something. Anyways I agree that the entire thing is getting uncomfortable.

So now I guess its time to do a bunch of research to find the right/available MOSFET. :o

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does anyone have any opinion on using the following mosfet

FQP30N06L < $1 each from digikey
http://www.fairchildsemi.com/ds/FQ/FQP30N06L.pdf

Total overkill but I think it should work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That should work fine. You could also go with something like the FDV303N 30V ~700ma 100mv RDSon
Cost at Digi-Key ~.33 cents each. Its in a SOT-23 package, but they are fairly easy to manage having only 3 pads.