Circuit producing no current out collector on photo-resister transistor circuit

Thread Starter

Tp86

Joined Sep 13, 2023
41
Hi all. I am attempting my first photoresistor circuit with a transistor and Im running into some problems. I am getting 5V across the LED on the electronics breadboard starter kit but connecting the ohm meter in series with the LED and connecting wire I have 0A current. However, I have 0.4mA current coming out of the base. I am not sure why I am not seeing a current gain proportional to my current at the base. Any ideas?

Notes:
- LDR is about 1Mohm when dark, when very high-intensity light the LDR is about 500ohm
- Resistor 1 is 10kohm
- Power supply is set to 5V
- I designed the circuit weird and spaced out like that so I could try replicate drawing to make it easier to see in pictures


IMG20231115221519.jpgIMG20231115221546.jpgIMG20231115221508.jpg
 

ericgibbs

Joined Jan 29, 2010
18,610
hi Tp,
Check the 2N2222 pin layout, also a low value resistor is needed in series with the LED. ~180R to 220R

E
EG57_ 1296.pngIMG20231115221508.jpg
 
Last edited:

MrChips

Joined Oct 2, 2009
30,415
I can see two problems.
The LED needs a resistor in series to limit the current. Try 100-470 ohms.
You have the LED on the emitter leg of the transistor. Try putting it on the collector.
 

MisterBill2

Joined Jan 23, 2018
17,716
It might also be that the LED is connected backward. If you have five volts across the LED and it does not light, it is either reversed or failed.
 

Thread Starter

Tp86

Joined Sep 13, 2023
41
Thank you for the replies guys. First ericgibbs, interesting the document I used for the pin configration is the opposite to the one you found. This makes me very unconfident about finding my own pin configurations. Where did I go wrong here? I'll include a picture of the datasheet I used and it's link.

MrChips you also pointed out I had my transister the wrong way around I cant figure out why my datasheet says different. Yep i omitted the ~250ohm resister in series with LED for simplicity, but in turn it may have cost me more time because

As MisterBill2 as pointed out, the LED has indeed failed - It wont produce any light at all. Perhaps I sent too much current though it at some point? Or maybe I put it backwards when I was playing around with it

With a brand new LED installed the circuit works as intended, it lights up when the surroundings is dark and turns on when surrounding is light. It also works as voltage/current limiting switch with the transistor faced in both directions. Which leads me back to my first question, which actually is the correct diagram for the pin configuration so I can be sure I know which pin connects to the heavily doped emitter?

I think I answered it thought cause I checked the resistance between the pins and the emitter-base in the pin configuration you guys gave me gives less resistance than the base collector, which is correct due to the doping.
Untitled-3.jpg

So why is this datasheet I initially following giving me a different pin configuration?
https://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf
Untitled-2.jpg
 

Thread Starter

Tp86

Joined Sep 13, 2023
41
Thanks for the explanation Dennis. I just noticed onsemi provide a marking diagram of the component for quickly identifying the right spec.

On the topic of component identification, I have no idea how I can find out the maximum dissipated power rating allowed through my resisters as they have no brand or identification on the other than the coloured bands for resistance value and threshold. I understand to calculate the dissipated power i use P = V²/R but I dont know the maximum threshold of my resisters.

Does anyone have a good chart I could go by or do I need to try get the values from the manufacturer directly? Thanks in advance. Tom
 

MisterBill2

Joined Jan 23, 2018
17,716
The LED may have failed because of the reverse voltage, if it was indeed backward installed. Unlike other diodes, LEDs suffer from rather poor tolerance of reverse bias. Just a very few volts and they fail, at least some of them fail at even 5 volts reverse.
 

WBahn

Joined Mar 31, 2012
29,823
Thanks for the explanation Dennis. I just noticed onsemi provide a marking diagram of the component for quickly identifying the right spec.

On the topic of component identification, I have no idea how I can find out the maximum dissipated power rating allowed through my resisters as they have no brand or identification on the other than the coloured bands for resistance value and threshold. I understand to calculate the dissipated power i use P = V²/R but I dont know the maximum threshold of my resisters.

Does anyone have a good chart I could go by or do I need to try get the values from the manufacturer directly? Thanks in advance. Tom
First, figure out what the worst-case power dissipation would be in the resistor, which is when all 5 V is across it. In the case of your 10 kΩ resistor, that would be 2.5 mW. A non-factor.

For your LED path, how much current do you want in the LED. Let's say you choose 10 mA. That's a total dissipation of 50 mW. Not very many components are going to have a problem with that. Even at 20 mA, the resulting 100 mW is split between the current limiting resistor, the LED, and the transistor.

As for telling how much a resistor is rated for, that involves some educated guessing. After a while, you have a feel for the physical sizes of the components you commonly use and what their ratings are. Lacking that, go to some place like DigiKey or Mouser or to a component manufacture's website and look up the physical dimensions of similar components and see which ones are a close match to the ones you have. The power ratings are likely pretty comparable.
 

dl324

Joined Mar 30, 2015
16,642
I dont know the maximum threshold of my resisters.

Does anyone have a good chart I could go by or do I need to try get the values from the manufacturer directly?
Resistor wattage was based on size and was standard until some brainiac came up with "miniature" formfactors.

This is from Yaego:
1700108303229.png
Note that miniature styles are rated for about twice the dissipation of standard resistors.
 

Thread Starter

Tp86

Joined Sep 13, 2023
41
The LED may have failed because of the reverse voltage, if it was indeed backward installed. Unlike other diodes, LEDs suffer from rather poor tolerance of reverse bias. Just a very few volts and they fail, at least some of them fail at even 5 volts reverse.
I think you are right, I think I may have accidentally had the polarity wrong on that LED once and it would have fried it.

You can get a good idea of the wattage rating by the physical size of the component. The 10K resistor in the photo looks like a 1/2 watt resistor.
That sounds like a good rule of thumb only, how do I know if my one is the miniature variant that Dennis mentioned in last reply

Resistor wattage was based on size and was standard until some brainiac came up with "miniature" formfactors.

This is from Yaego:
View attachment 307653
Note that miniature styles are rated for about twice the dissipation of standard resistors.
Is there any way to differentiate the normal form the miniature Dennis?

First, figure out what the worst-case power dissipation would be in the resistor, which is when all 5 V is across it. In the case of your 10 kΩ resistor, that would be 2.5 mW. A non-factor.

For your LED path, how much current do you want in the LED. Let's say you choose 10 mA. That's a total dissipation of 50 mW. Not very many components are going to have a problem with that. Even at 20 mA, the resulting 100 mW is split between the current limiting resistor, the LED, and the transistor.

As for telling how much a resistor is rated for, that involves some educated guessing. After a while, you have a feel for the physical sizes of the components you commonly use and what their ratings are. Lacking that, go to some place like DigiKey or Mouser or to a component manufacture's website and look up the physical dimensions of similar components and see which ones are a close match to the ones you have. The power ratings are likely pretty comparable.
Thats a good point I should first work out worst case dissipation for each path. I know in this case there is not much dissipation on the circuit, but if I wanted to experiment with allowing many leds to flow parallel through a single resister I would need a lot of current through it to power the leds. However, I know it'd be better to just use resistors in series with each led but while im learning and experimenting I want to have a rule of thumb in mind for when I can expect a resister to fail. I'll use sghioto's rule
1700122959714.png
 

MisterBill2

Joined Jan 23, 2018
17,716
To illuminate a number of LEDs,it can also work very well to put them in series. The series resistor to limit the current will require that you know the forward voltage of the LEDs , A fair guess is usually adequate.The forward voltage varies quite a bit, depending on the color. As an example, the older red LEDs forward voltage was usually about 1.7 volts, while the yellow ones were more like 2.2 volts. And now for many of the white LEDs it is about 3.7 volts at their rated current, which may be greater than 20 mA.
 

dl324

Joined Mar 30, 2015
16,642
Is there any way to differentiate the normal form the miniature Dennis?
None that I know of if you don't know the manufacturer part number. I have boxes of 51 ohm resistors resistors that are the size of 1/8W and are rated for 1/4W and they don't look different than 1/8W resistors.
if I wanted to experiment with allowing many leds to flow parallel through a single resister I would need a lot of current through it to power the leds.
It's not a good idea to operate LEDs in parallel that way, particularly if you're operating them near their maximum current rating.

The forward voltage of LEDs from the same manufacturing lot will have a range of forward voltages. Manufacturers often bin (sort) them by brightness, but it's less common for them to be sorted by forward voltage. The LED with the lowest forward voltage will hog current. In a worst case scenario, it will be destroyed. Now you've got 1 less diode conducting the total current and the one with the lowest forward voltage will hog current.

Manufacturers of LED flashlights often do this. I have several where most of the LEDs are burned out. The manufacturers don't care. Either you'll buy another, or you won't. Their business model doesn't depend on repeat customers.

A point about wiring transistors backwards. The BE junction of most general purpose transistors break down at around 5V (they use this for zener diodes in some integrated circuits). Breaking them down can kill the current gain (beta). You're safe because you were using a 5V supply.
1700149796144.png
\(V_{EBO}\) (for PN2222A) means 6V applied from the emitter to the base with the collector not connected (open circuit).
 
Last edited:

Thread Starter

Tp86

Joined Sep 13, 2023
41
To illuminate a number of LEDs,it can also work very well to put them in series. The series resistor to limit the current will require that you know the forward voltage of the LEDs , A fair guess is usually adequate.The forward voltage varies quite a bit, depending on the color. As an example, the older red LEDs forward voltage was usually about 1.7 volts, while the yellow ones were more like 2.2 volts. And now for many of the white LEDs it is about 3.7 volts at their rated current, which may be greater than 20 mA.
Good point. When you say they work well in series do you mean each resister and led pair in series and this collection of series pathes in parralel as a whole? Like picture below. Otherwise if they were all in series it would require very high voltage to operate all the diodes, no?
1700218405497.png

The forward voltage of LEDs from the same manufacturing lot will have a range of forward voltages. Manufacturers often bin (sort) them by brightness, but it's less common for them to be sorted by forward voltage. The LED with the lowest forward voltage will hog current. In a worst case scenario, it will be destroyed. Now you've got 1 less diode conducting the total current and the one with the lowest forward voltage will hog current.

Manufacturers of LED flashlights often do this. I have several where most of the LEDs are burned out. The manufacturers don't care. Either you'll buy another, or you won't. Their business model doesn't depend on repeat customers.
Very good point, I didnt even think of this. I've had a lot of led flashlights that have stopped firing up, this may explain why!

A point about wiring transistors backwards. The BE junction of most general purpose transistors break down at around 5V (they use this for zener diodes in some integrated circuits). Breaking them down can kill the current gain (beta). You're safe because you were using a 5V supply.
View attachment 307701
\(V_{EBO}\) (for PN2222A) means 6V applied from the emitter to the base with the collector not connected (open circuit).
Thats good to know. Thanks Dennis. So if use this transistor I need to make sure my Vbe is 5V or below or my gain will still stay linear. Also clearly I need to make sure my Vce is below 30V. If its over 30V does the BE gate no longer hold the charge behind the depletion region?
 

MisterBill2

Joined Jan 23, 2018
17,716
Good point. When you say they work well in series do you mean each resister and led pair in series and this collection of series pathes in parralel as a whole? Like picture below. Otherwise if they were all in series it would require very high voltage to operate all the diodes, no?
View attachment 307778


Very good point, I didnt even think of this. I've had a lot of led flashlights that have stopped firing up, this may explain why!


Thats good to know. Thanks Dennis. So if use this transistor I need to make sure my Vbe is 5V or below or my gain will still stay linear. Also clearly I need to make sure my Vce is below 30V. If its over 30V does the BE gate no longer hold the charge behind the depletion region?
NO!!! I do not mean an arrangement as shown. That is a parallel connection of LEDs with each having a current limiting resistor.
SERIES means that the same current passes thru each device.
A SERIES connection of LEDs will have only a single path for the current, which will pass thru every LED and the single current limiting resistor. Certainly the required voltage will be greater because it will be the sum of the forward voltage drops of each LED plus the voltage drop across the resistor used to limit the current. It will also be much more efficient because of only one resistor wasting power. The higher voltage is seldom a problem because most power sources, even a single cell, are higher than most LED forward voltages. The one common exception now is white LEDSs, with a forward voltage of about 3.65 volts. They will light up with two 1.5 volt cells in series, but not to full brightness.
 

dl324

Joined Mar 30, 2015
16,642
So if use this transistor I need to make sure my Vbe is 5V or below or my gain will still stay linear. Also clearly I need to make sure my Vce is below 30V. If its over 30V does the BE gate no longer hold the charge behind the depletion region?
Note the order of the letters in the specification I gave. The EBO means that the more positive voltage is applied to the emitter and the more negative to the base and the collector open-circuit. During normal operation, Vbe will be around 0.7V.

\( V_{CEO} \) is the voltage that will cause the collector-emitter to breakdown and current will flow without base current.

Gate is usually associated with field effect transistors, though there is a device called an IGBT which is a bipolar transistor with an insulated gate.
 

Thread Starter

Tp86

Joined Sep 13, 2023
41
NO!!! I do not mean an arrangement as shown. That is a parallel connection of LEDs with each having a current limiting resistor.
SERIES means that the same current passes thru each device.
A SERIES connection of LEDs will have only a single path for the current, which will pass thru every LED and the single current limiting resistor. Certainly the required voltage will be greater because it will be the sum of the forward voltage drops of each LED plus the voltage drop across the resistor used to limit the current. It will also be much more efficient because of only one resistor wasting power. The higher voltage is seldom a problem because most power sources, even a single cell, are higher than most LED forward voltages. The one common exception now is white LEDSs, with a forward voltage of about 3.65 volts. They will light up with two 1.5 volt cells in series, but not to full brightness.
I understand. If only have 5 volt supply though that sort of limits the number of LEDs I can run in series. The arrangement your talking about I think is typical of most off the shelf Christmas lights

Note the order of the letters in the specification I gave. The EBO means that the more positive voltage is applied to the emitter and the more negative to the base and the collector open-circuit. During normal operation, Vbe will be around 0.7V.

\( V_{CEO} \) is the voltage that will cause the collector-emitter to breakdown and current will flow without base current.

Gate is usually associated with field effect transistors, though there is a device called an IGBT which is a bipolar transistor with an insulated gate.
I thought that was the case. I second-guessed myself at the last minute and retyped it with a new incorrect analysis. Thanks for confirming this. I won't forget the voltage notation now. I think I must have got the gate terminology from a mosfet. I'll look into the IGBT device. We will probably have them at work.
 
Top