Go Down

Topic: Using an NPN 3904 transistor on digital pin (Read 591 times) previous topic - next topic

SouthernAtHeart

I have typically had a 1K resistor in series with the digital pin connected to the base of the transistor. (Like when I use it to control a relay)
In Sparkfun's LCD Backpack Kit there is one controlling the backlight, and it doesn't have any resistor in series between the 3904 and the digital pin.  I'm using part of this schematic in a custom board, and wondering if I should have one.  The 3904 will be doing the same thing--controlling the backlight.
Thanks.

Grumpy_Mike

Quote
I'm using part of this schematic in a custom board, and wondering if I should have one. 
No because that transistor is being used in the common collector mode, sometimes called and emitter follower. This means that what ever voltage is on the base the emitter will be the same but minus 0.7V.

This is a piece of poor design because your LCD back light will only get at most 4.3V. Often LCDs like this will have a small resistor in line with the back light so they are designed to connect directly across the supply. For a proper design you should use a PNP transistor connected in the common emitter configuration with a resistor in the base.

SouthernAtHeart

#2
Nov 13, 2017, 06:41 pm Last Edit: Nov 13, 2017, 06:43 pm by SouthernAtHeart
Hmm, maybe I should backup and first find out about this resistor.  In the past, I've just thrown in something like a 10 ohm resistor. But in this project I'm wanting it to be "top notch" so to speak.  I'll be using a Crystalfontz LCD, and the data sheet is here.  On page 20, it gives the backlight info, stating that the max voltage should be 4.6, & typical voltage is 4.2V.  And at 4.2V the backlight uses 280mA current.  So if I were to connect the backlight directly to the supply voltage (mine being 5VDC), would I use a 2.86 ohm resistor.  Is that right?  That's really small.  I'm not sure I calculated that right.
ps.  in practical terms, what resistor would you use?  I should err on the side of a little less current, or should I shoot for the suggested current, at 280mA?

Thanks again.

MarkT

Depends on the supply voltage and how far out it is or can be.  Measure it and choose on the conservative
side perhaps?  Round up to the nearest E12 resistor value...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Grumpy_Mike

Quote
So if I were to connect the backlight directly to the supply voltage (mine being 5VDC), would I use a 2.86 ohm resistor.  Is that right?
No. The data sheet says maximum voltage is 4.6V so that is what it is.

It looks like the transistor is being used in the emitter follower mode because you get a 0.7V drop and so a maximum voltage of 4.3V. This will work but it is a piss poor design strategy. I have had to clean up from engineers being "clever" a few times when supplies change.

Quote
should I shoot for the suggested current, at 280mA?
No it is not a suggested current, it is what current the module will typically draw with a 4.2V supply voltage. This means the LCD already has some form of current limiting ( probably just a resistor ) inside it already. I would shoot for the voltage of 4.2V but 4.3V looks close enough to me.

SouthernAtHeart

Ok, these Crystalfontz LCDs arrived, and I did some bench testing. 

I connected my 5 volt source to the backlight thru a series resistor, and kept lowering the value.  Here's what I noted:

OHMS, current thru the backlight, voltage at the backlight

24 ohm = 50mA, 3.82V
10 ohm =  108mA, 3.95V
5 ohm = 180mA, 4.07V

I wrote a tech at Crystalfontz who said, "Select the resistor to keep the current at 280ma"
And the data sheet says the typical backlight voltage should be 4.2V, with a max of 4.6V

I don't have any resistors to further text with, only had two 10ohms I put together in parallel.  But at 180mA the backlight seemed well lit.  I'm going to order some 3 ohm resistors, which  I'm guessing will give me 200-220mA current. 

If I figure a .8 voltage drop and 280mA, that'd be .224 watts, so I might go with this 3ohm, 1/2watt resistor

My 5 volt power supply for the end product will be from a Recom power supply that's pretty close tolerance.

Grumpy_Mike

Quote
But at 180mA the backlight seemed well lit.
So keep it at that, there is no point pushing every ounce of brightness out of the LED as the closer you approach the maximum current the less incremental brightness.

Go Up