Go Down

Topic: Choosing the right NPN Transistor (Read 352 times) previous topic - next topic

BartArien

Hi,

I am having trouble choosing the right NPN transistor. I want to turn on a LCD display with voltage of 5v and current of 150 mA).
The arduino output pin is 5v with max current of 15mA so i figured out the best way is use a NPN transistor but how do i choose the right one?

Can i use for example a NPN C1815 with a voltage of 50 and current of 150?

Regards
Bart

larryd

#1
Apr 17, 2019, 10:14 pm Last Edit: Apr 17, 2019, 10:15 pm by larryd
Use a P channel MOSFET high side switch.
Or
You could use a low current relay driven by your transistor.

https://www.jameco.com/z/NA-5W-K-Fujitsu-5-Volt-178-Ohm-Double-Pole-Double-Throw-Relay_2202360.html 






No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Paul__B

The right NPN transistor is usually a FET.  :smiley-lol:

But an NPN transistor or N-channel FET must switch the low - cathode - side of your LCD display illumination (the LED itself, not the display driver).

You need to explain what display you are using, and how you propose to connect this.

TimChPi

Hey:
MOSFET act as a switch, where commonly seen NMOS act as a grounding switch - When it is off, the component floats, hence no voltage difference and it is off. When it is on, the component is grounded on GND, therefore creating a voltage difference for the component to be turned on.
So I suppose you can connect everything you want to connect to ground in the LCD to the drain of the mosfet, and use a arduino to turn it on and off.
But if you mean NPN transistors ... there are heaps, to be honest. A good way I usually go when I am finding components is go on the website of a company called RS and use filter to search for desired part.
Hope this helps
Cheers

wvmarle

Switching a display off while the signal lines are still driven can give very nasty effects, including broken I/O pins (on both the display and the Arduino trying to control it). That's something to be aware of.

Many devices have an "enable" pin, which if available should be used instead.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Paul__B

Well, if he ever comes back to explain what he is trying to do (read as: XY problem), we could help him, but it may be just another "one-hit wonder".  :smiley-roll:

Otherwise not worth talking to /dev/null.  :smiley-eek:

BartArien

Trying to avoid the xy problem as Paul mentoined I will try to restate the base question:

 "How to choose the right transistor for controlling object A (which uses more current) through a GPIO  (which can give less current).

I have done some research about the principles of transistors but I am missing some basic info i guess.

If someone knows  a good basic tutorials, please share.

wvmarle

You probably need a PNP one. Or p-channel MOSFET. For high-side switching. Depending on the actual voltages you switch,  you may ALSO need an NPN one.

Which type you need depends on:
- the current switched (you mentioned 150 mA).
- the voltage switched (you mentioned 5V, I assume DC).
- the actual device that's switched (an LCD display, type unspecified).
- high or low side switching, largely dependent on what is being switched, and sometimes on why and when it's being switched.
- what other connections that device has with the rest of the projects (unspecified; presumably data connections as it's an LCD display).

Step 1: decide HOW you're going to switch it (high or low side), and what type of transistor you want to use (BJT or MOSFET usually).
Step 2: open your parts box and see if you have anything that fits the bill.
Step 3: search for suitable part, using e.g. the parts selector of Digikey.
When you settle on a specific part, check the data sheet to see if it really is suitable.

And, as I mentioned already, if that device has an enable pin, that's normally the best way of powering it down.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Wawa

#8
May 23, 2019, 12:01 am Last Edit: May 23, 2019, 12:03 am by Wawa
WHY do you want to switch an LCD display off.
Current draw?
The LED behind the LCD probably uses most of it, so why not just switch the LED off.
The (unspecified) LCD could already have a LED transistor switch buildin.
Leo..

JohnRob

Quote
"How to choose the right transistor for controlling object A (which uses more current) through a GPIO  (which can give less current).
As you have likely read, the in general most folks find an MosFet a more desirable choice than a BJT (transistor).  Why....

  • A Mosfet can mimic a switch to ground with lower voltage across it when on than a transistor.
  • A Mosfet takes nearly no current to control, where as a transistor used as a switch required ~ 1/10 of the current being controlled to be provided from the µP output pin.



So to answer your question, you start with the requirements:

1) how much current do you wish to control.  This will help chose a specific part.
2) are you trying to switch to ground or to +V
3) If trying to switch to +V, is the voltage you are trying to control higher than the arduino voltage?




Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

Paul__B

Trying to avoid the xy problem as Paul mentoined I will try to restate the base question:

 "How to choose the right transistor for controlling object A (which uses more current) through a GPIO  (which can give less current).
So you are making the problem worse by wanting to generalise.  :smiley-roll:

Start by answering Wawa's questions, and give us Web links to the display you have.

BartArien

I am using a standard 2x 16 LCD screen without I2C module as on https://www.adafruit.com/product/1447
i want to be able to switch the screen off (with a button) because I only need to check the display once a week

I found out that with this lcd the LED BACKLIGHT draws 100 mA

wvmarle

Wow, that's a turbo-backlight you got installed! They normally draw only about 10 mA.

Just about any small signal NPN transistor such as the BC547 will do fine for this application.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Paul__B

I am using a standard 2x 16 LCD screen without I2C module as on https://www.adafruit.com/product/1447
i want to be able to switch the screen off (with a button) because I only need to check the display once a week
Put the button in the 5 V line?

I found out that with this LCD the LED BACKLIGHT draws 100 mA
That is certainly what the datasheet suggests, and is somewhat unusual.  But this display is - according to the datasheet  - completely different to the "1602" displays with which we are familiar, to the extent that I suspect the datasheet is nothing more than a very bad counterfeit of a different company's product with many nonsensical errors.

It specifies the "Supply current for logic" as typical 120, maximum 150 mA.  The HD44780 chip and presumably its clones, is specified at 150 typical, 300 maximum μA - that is microamps.  This specification in the datasheet is surely not correct.  Even if it included not only the logic, but the combined current for LED illumination as well, that would suggest the chip is drawing 20 to 50 mA.

It then illustrates the contrast potentiometer as 20 to 50k, and shows it connected to VDD (5 V) as well as VSS (ground).  Now this latter is a stupid blunder you will find just about everywhere these displays are cited, so that is not entirely surprising; it means the people publishing devices and projects actually have no idea whatsoever as to how the LCD works (which is explained in the original HD44780 datasheet).  The point is that you should not connect the potentiometer to 5 V, only to ground; it must be wired as a variable resistor rather than a potentiometer and as such, its value should be about 1k.  If it is 10k and wired as a potentiometer, it will be usable only over one twentieth of its range and a 50k potentiometer  will function only at the ground hundredth end of its range; virtually useless, you may as well just connect Vo (pin 3) to ground (which usually works, but not optimally).

What else could possibly be wrong?  :smiley-roll:   Well, it cites in "INTERFACE PIN FUNCTIONS" that
Pin 15 LED+ +5.0V   Power supply for backlight.
Pin 16 LED-    0V      The backlight ground.
... but warns: "NOTE: Do not connect +5V directly to the backlight terminals. This will ruin the backlight."

Wow, that's a turbo-backlight you got installed! They normally draw only about 10 mA.
Well, no.  With the "R8" being "101" or 100 Ohms, it is actually about 24 mA for the backlight.  But that is within the switching capabilities of a common Arduino output pin.

Just about any small signal NPN transistor such as the BC547 will do fine for this application.
Indeed.  Once you have figured out the value for the backlight resistor - 0.9V /100 mA = 9.1 (or 10) Ohms - then to control the backlight only you can switch the cathode of the backlight on pin 16 with a common transistor.

With the usual version of the 1602 display requiring only 300 μA plus the contrast ladder, the display logic could be switched on and off directly by an Arduino pin with no trouble at all.  If you use the correct wiring of the contrast resistor to ground only, then the 11k contrast ladder will draw only 455 μA, so a total easily less than 1 mA - generally not worth switching off (and so avoiding the dangers of "phantom powering") as long as you switch off the backlight.

But that is not what that datasheet seems to claim.  If you have the Adafruit display, you perhaps need to make the measurements yourself to see if the datasheet tells the truth - it should not.  :smiley-eek:  Put a 100 Ohm resistor in series with the backlight and see what current it draws and what voltage appears across it.

Go Up