Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Starting out with electronics - simple circuit, does not work

Status
Not open for further replies.

svk

New Member
I built a simple circuit as an experiment. I thought it should have worked, but unfortunately, nothing happens. The goal here was to simply light the LED:

**broken link removed**

My logic here is this: the two resistors that you see act as a voltage drop. The bases of the transistors, after all, don't require 9V. At the same time, these resistors should lower the amount of current that flows through the LED so that I don't burn it. Since the bases of the transistors are always connected to the power supply, they should allow current to flow through them and light the LED.

However, nothing happens. The LED does not light.

Frankly, I'm not very experienced with a multimeter, so I don't know what to test and where.

Can anyone explain why nothing is happening?
 
I'm not sure what you trying to do with the transistors. If lighting the LED is your only goal, you only need one resistor and no transistors. A led will have a voltage drop (think, the amount of votage that it "consumes") and you need the resistor to take care of the rest of the voltage. Typical voltage drop for an led can be from 1.7 to 3+V. LEDs typically will run on 20 mA current so we select a resistor to limit the current to that. I'd just pick 2V. then use ohms law V = IR. Rerarrange so that R = V/I = (9-2)/.02 = 7/.02 = 350 ohms. a 390 or 470 ohm resistor would work fine (these are standard values). If the LED fails to light, you've probably got it in backwards.

If you are trying to get the transistors to work, I'd start simpler.
 
Well, being a newbie, I'm kind of experimenting with transistors. I also hoped to implement a sort of a logic AND gate here.

In the schematic, the two horizontal wires that lead to the bases of the transistors could have switches. I hoped that the LED would light only if both switches were closed. But the LED doesn't light at all, regardless of whether the hypothetical switches are open or closed. I really have no clue why. Perhaps lowering the resistance should work?

I think I understand transistors. I built a simple circuit to test its functionality, and it worked. I just tried expanding the idea.

My circuit is merely an experiment. I just can't understand the results (or the lack thereof).
 
were you trying to get the led to flash?
 
I was just trying to light it, albeit in a roundabout way.

But actually, I found a better way to do what I was trying to do here:

**broken link removed**

But this leads me to another question. Observe in the image above that there are two resistors of equal value, each connected to a base of one of the transistors. Why are they connected in parallel? Would it not be more senseful to use just one resistor?

In other words, other than the resistance on the LED (which differs), are there any other differences in these two schematics? (sorry, I mislabeled the battery as 1V, it should be 9V)

**broken link removed**

**broken link removed**
 
I re-drew your circuit so that the transistors are "the correct way up".
For the LED to light, one transistor must conduct to 0V which happens, but the other transistor needs to be at a higher voltage but cannot with its base connected to the base of the 1st transistor.

My circuit has both transistors completely separate. If one input goes high but the other input is low then the LED does not light. If both inputs are low then the LED does not light. If both inputs are high then both transistors turn on and the LED lights.
 

Attachments

  • Transistor AND gate.PNG
    Transistor AND gate.PNG
    17.7 KB · Views: 364
Thanks for the explanation. I think I understand...

So, despite that it's still a bit unintuitive to me, these two circuits are in fact different?

**broken link removed**

EDIT: And sorry for the "upside-down" transistors again. I'll have them fixed next time, promise :)
 
I Dunno. The circuit with the bases connected together might work. Try it and let us know.
 
Nope, the second one does not work. Which confuses me, but I'll give it some thought...
 
svk said:
Nope, the second one does not work. Which confuses me, but I'll give it some thought...

Did you have the transistors upside Down? I dont know why it wouldnt work, seems to me it would.
 
Overclocked said:
Did you have the transistors upside Down? I dont know why it wouldnt work, seems to me it would.
Same here, although he'll get more current if he moves the 820 to be in series with the LED.
 
Can I ask, how did you come to those base resistor values of 470R? If we assume a transistor HFE of about 150ish, and 8.3V dropped across the base resistors (leaving 0.7V for the base-emitter junction) I make it 62K for a 20mA LED. Of course none of this is critical because the exact HFE value will never be certain, but 470R does seem quite a low value resistor.

Other than that, it makes better sense to have seperate base resistors because you should bias the transistors seperately. If you use just one base resistor, then the voltage drop across the base resistor will be different depending on whether one or two of the transistors are turned on. That means the biasing of the transistor will be different depending on whether you've got one or two of the switches depressed, and that's just not good practice - even if it does work.

Your drawings are really confusing when you draw the transistors that way. Try to get yourself into the habit of drawing them the right way up - that way you'll be sure that you're always on the same wavelength as everyone else.

Brian
 
Oh I see, you're using an 820R resistor for the LED. As RonH says, it's more common to put this resistor in series with the LED. But with the resistor value you've got there, you'll only get 8.5mA through the LED. That should still light it. Your base resistors still seem very low in value to me though!

Brian
 
ThermalRunaway said:
...it's more common to put this resistor in series with the LED...

By that, do you mean like this?

**broken link removed**

Can you explain how that makes a difference? Isn't this resistor and this LED still on the same circuit? Does their placement matter?

ThermalRunaway said:
... But with the resistor value you've got there, you'll only get 8.5mA through the LED ...

I'm afraid I don't see why...
V = IR
V = 9 volts
R = 820 ohms
I = V / R = 9 / 820 = 10.9756 mA

What's wrong with the work above?

ThermalRunaway said:
If we assume a transistor HFE of about 150ish, and 8.3V dropped across the base resistors (leaving 0.7V for the base-emitter junction)

Can you explain how you can calculate the voltage drop across a single resistor? Particularly in this example?

ThermalRunaway said:
Can I ask, how did you come to those base resistor values of 470R?

I'm not sure anymore. I remember I had a reason :D

Well, what should be my criteria for picking a resistor in this situation? It would seem to me that I should aim to provide enough voltage and current to the resistor base so that current can flow from the collector to the emitter, but at the same time to limit it so as not to burn the transistor. Is there any other criteria applicable? And, I hate to ask for so much work, but can you please take me through this step-by-step? Or alternatively, please provide a link to a good, beginner-friendly article on the matter.

---​

Yeah, sorry, I'm still a complete newb :(

I rented a copy of Electronics for Dummies at the library, but that book does not make me comfortable with designing my own circuits at all. It has some cool projects, but it does not explain how they work.

I requested the classic (so I heard) Art of Electronics, so I'll have my hands on a copy within a week. By tomorrow, though, I should have Sams Teach Yourself Electronics (I think that's the name) in my hands. It's a nice and thick book, and that's probably a good sign.

---​

Anyways, I'm sure I'll be back with more questions soon. Understanding electricity is hopefully a one-time deal. Once I get it, I won't bug you with such questions anymore :)
 
Just out of Curiosity, how old are you? If your college bound you can take electronics as your local college (I recommend a community college-cheap and effective)

I have a bunch of electronics book, but nothing has helped me more than a good education. If your not college bound, and are still in middle school, try getting into a local Tech High School.
 
Overclocked said:
Just out of Curiosity, how old are you? If your college bound you can take electronics as your local college (I recommend a community college-cheap and effective)

I have a bunch of electronics book, but nothing has helped me more than a good education. If your not college bound, and are still in middle school, try getting into a local Tech High School.

Well, I'm still in high school. I'll be entering college in two years.

However, my dad holds a degree in electrical engineering. But he's gone until 6 P.M., which is an awfully long wait for me. Besides, helping me out with electronics all-evening-long is not something he really craves... .

And even when I get to college, I'm not sure I will be able to afford to study electronics. I'm not sure what my major will be, but it's likely that half of my schedule will be filled with the required courses to qualify for that major. On top of that, if the college has any sort of a liberal arts tendency, there will be more required courses. And on top of all that, there are several other subject areas I have a high interest in. I'm not sure if there will be any room left... .

But I agree, some interactive help from a teacher would be nice. For now, I'll have to subsist on my dad. He's actually great at explaining some difficult concepts to me, but the amount of the time he can devote to me is quite limited.
 
audioguru said:
The circuit with the bases connected together might work.

It looks like it will work... but tying the bases together like that defeats the reason for the AND gate. Might as well just use one transistor. And carry that one step further, you're back to the switch, resistor and LED idea.

Edit: Whoops, I goofed. I looked at the drawn schematic wrong.
 
Last edited:
the reason it looks like ohms law doesn't work here is because the LED has a voltage drop (Vf from the datasheet) which "consumes" voltage. Also, the transistors have a voltage drop (Vcesat from datasheet). The resistor takes care of the rest. Vf for the diode is, say 2V, and Vcesat for a small signal transistor at low current is going to be around .3 V. So the resistor "sees" 9 - 2 - .3 - .3 or 6.4V. Use that in place of 9V to determine current.

The Vf for the LED and Vcesat for the NPNs are just guesses on my part. read the datasheets but the numbers won't be dissasterously off.
 
svk said:
By that, do you mean like this?

**broken link removed**

Can you explain how that makes a difference? Isn't this resistor and this LED still on the same circuit? Does their placement matter?
No not like that. Usually you have your positive power supply rail at the top and the ground or negative at the bottom. Your transistors would then be drawn the other way up so that the emitters pointed downwards. That's not to say the way you've done it is wrong, just that my way fits more with convention and allows everyone to be on the same page when we talk about these kinds of circuits.


svk said:
I'm afraid I don't see why...
V = IR
V = 9 volts
R = 820 ohms
I = V / R = 9 / 820 = 10.9756 mA

What's wrong with the work above?
You haven't allowed for the voltage drop across the LED. The LED will have about 2V dropped across it when forward biased, and this leaves 7V which will be dropped across the resistor. Do your maths again with this in mind, and you'll come up with my answer. :)

svk said:
Can you explain how you can calculate the voltage drop across a single resistor? Particularly in this example?



I'm not sure anymore. I remember I had a reason :D

Well, what should be my criteria for picking a resistor in this situation? It would seem to me that I should aim to provide enough voltage and current to the resistor base so that current can flow from the collector to the emitter, but at the same time to limit it so as not to burn the transistor. Is there any other criteria applicable? And, I hate to ask for so much work, but can you please take me through this step-by-step? Or alternatively, please provide a link to a good, beginner-friendly article on the matter.
You want to provide enough voltage bias on the base of the transistor to bring it out of it's linear region and into it's saturation region. In other words, you want to turn it hard on. This typically happens when 0.7V is applied across the base emitter junction. You need to work out the resistor value which will cause this to happen, and you do so as follows:
Firstly, you need to know what current will be flowing from collector to emitter. If we assume your LED is taking 8.5mA (which we worked out before) then we can use this to determine roughly the current flow into the base provided that we know the current gain (HFE) of the transistor. I don't know what transistor you're using so I can only guess, but a typical current gain would be about 150. I'll use that for now and you can adjust it to suit your transistor.
Ok so 8.5mA flows from collector to emitter so 8.5mA/150 = 56.6uA flowing into the base. This current will flow through your base resistor, and hang on to this because you'll need it to calculate your base resistor value.
Now, we already know that we want 0.7V across the base-emitter junction in order to bring the transistor into it's saturation threshold. If 0.7V will be across the base-emitter junction, then that means 9-0.7V = 8.3V will be dropped across the resistor. Use your current calculation from earlier and ohms's law will tell you that the resistor value you need it 8.3V/56.6uA= 146K.

Of course, it's more typical for an LED to take between 10ma and 20mA so you may want to go back and adjust all your resistor values and calculate everything again.

---​
svk said:
Yeah, sorry, I'm still a complete newb :(
So was I, once. So were we all!

svk said:
I rented a copy of Electronics for Dummies at the library, but that book does not make me comfortable with designing my own circuits at all. It has some cool projects, but it does not explain how they work.

I requested the classic (so I heard) Art of Electronics, so I'll have my hands on a copy within a week. By tomorrow, though, I should have Sams Teach Yourself Electronics (I think that's the name) in my hands. It's a nice and thick book, and that's probably a good sign.
The Art of Electronics is THE Electronics book - you'll enjoy it.
---​
svk said:
Anyways, I'm sure I'll be back with more questions soon. Understanding electricity is hopefully a one-time deal. Once I get it, I won't bug you with such questions anymore :)
It's no problem. It's nice to have someone asking tidy questions and providing evidence of work they've already done for once, believe me!

Brian
 
Thank you immensely for the explanation. This is actually beginning to make some sense to me!

As for picking the correct resistor for the transistor base... it's giving my head a little spin, but I'll just approach it mathematically for now. Perhaps one day it will make more conceptual rather than mechanical sense, but I'm quite happy for now.

I would like to verify a couple things though:

Within a single series circuit, the voltage can vary throughout, differing from one component to the next. But current is the same throughout? So for example, if I have two LEDs, and I want to run 10mA through one of them, but 20mA through the other -- there is no way to connect them in series?

Also, the amount of current that is drawn from the battery is determined "by request" of the circuit? The more components I have, the more current will be drawn?

Finally, I'm not sure I understand what "transistor HFE" is. From searching, it looks like it's called "current gain" and "transistor beta", but I'm not finding anything that resembles a more detailed and beginner-friendly explanation...

Anyways, thanks for the help again. I'm feeling much better about myself already...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top