Author Topic: Help using NPN's as switches.  (Read 1520 times)

0 Members and 1 Guest are viewing this topic.

Offline XOIIO

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: ca
Help using NPN's as switches.
« on: March 07, 2014, 09:07:54 am »
Alright, so I have finally decided to start mucking about with transistors, probably something that people learn at the start but I just never bothered to.

Anyways, I am just using it as a simple switch to turn on an LED using a lower voltage source in something I want to change the backlight in. It's backlight is a small SMD one that runs at 1.8 volts, I'm going to use a 3mm one and feed it directly from the batteries (max 3 volts).

On the breadboard I was messing around, through trial and error (and realizing I need a current limiting resistor for the thing to work), got it to switch, no problem, powering an LED from 3 volts, however, depending on the voltage I give it and what voltage I use to switch it, it doesn't work very well. I used a battery pack with 3.8 volts and it worked fine, but if I lowered the power I feed to the LED to 2.8 volts it dims drastically. I tried to switch it with a AA battery feeding the LED 3v, and it was extremely dim. What is the cause of this? I imagine it is maybe due to the current limiting resistor? How do I figure out what value it would need to be? Since this thing is running off two AAA's, I'd like a solution (if possible) that just gives the LED full power when triggered with the 1,8 volts or so, since when the batteries dropped to 2..5v or so the backlight would be nonexistent.

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3953
  • Country: ro
  • .
Re: Help using NPN's as switches.
« Reply #1 on: March 07, 2014, 09:18:20 am »
See this video which explains how npn transistors work and what those specs in datasheet meen and how to select the resistor:



You probably chose a high value resistor which limited the current going from collector to emitter severely.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7587
  • Country: nz
Re: Help using NPN's as switches.
« Reply #2 on: March 07, 2014, 09:40:11 am »
LEDs have a voltage rating, for red leds its around 2V
Transistors, even when switched hard on, have a voltage across them. Usually 0.9V max.

So to run a 2V led using a transistor you need minimum 2V + 0.9V = 2.9V
and that isnt taking into account the need to regulate the current with a resistor.

In order to do current regulation the resistor needs some voltage across it. For a typical 20mA led you want at least 1 volt across the resistor. Anything less than that and you run into problems because the change in led voltage (due to led temperature) causes the current to increase a lot. So your led gets hot and that causes it to draw more current which causes it to get hotter etc..

So.. to run a typical 20mA red 2v led using a transistor the minimum voltage is 2V + 0.9V + 1V = 3.9V

You can run it from less but you need to under-rate the current/brightness to counter the fact that temperature will increase current after switchon.
« Last Edit: March 07, 2014, 09:47:41 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Help using NPN's as switches.
« Reply #3 on: March 07, 2014, 11:19:48 am »
Transistors, even when switched hard on, have a voltage across them. Usually 0.9V max.


A typically figure would usually be about 200mV for a regular npn or pnp switching transistor.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf