Yay! I made it this far.... and I did it with PNP transistors, I just inverted the sense of the instructions. My "mystery signal" is a IR phototransistor I cannibalized from an dead TV and now I can make an LED flash from across the room.... and see its inverted signal. I have learned that the pulses must be narrow (less than 50% duty cycle overall, to abuse the phrase duty cycle), because during the pulse trains, the inverted signal (representing darkness) is brighter on average. Now I can look up what the pulse trains look like for common TV remotes, and test my hypothesis. I feel like I'm ten years old again. This is GREAT. Thanks, Ben!
2021. Very late to the channel but you Ben are on my list of the most intelligent people in history. Such a great explanation can only come from someone who really knows their stuff
Amazing explanation. There are very few digital electronics engineers on youtube that can explain these things in a manner that us layman can fully understand. I'm a programmer by trade (I guess you could say) but looking under the hood has been difficult to learn until I found you and a couple others (out of the many, many channels) on youtube. Thank you sir. I've moved on from ttl using single transistors in series and parallel to using ics but there are still things to learn, even though I know how to build an inverter and somewhat understood why it works, I now understand even more. Great channel Ben, now I might be able to grasp your breadboard insanity in your other videos a little better. Haha
Eewave is a good channel. He has simple and complex stuff. There's cheap 74ls and cd4xxx chip kits on Amazon and they are a good starter. I read books and circuit diagrams now. I have over 100 types of logic chips now lol
@@reddaxtor5662 there's a bunch if you're just starting out. Eewave is good, it's a very smart young Indian gentleman who has a good backlog of logic related stuff. If you're looking to learn how to solder and do projects and know enough to be dangerous haha just search topics. I read alot now, I've learned though that you can watch all the videos you want and know the jargon and understand it but picking something like an arduino project that you want to make into a permanent device or some such is the way to do it. Read and watch and practice hands on. How far along are you? I mean like do you have a multimeter and soldering iron, breadboard or any of that? A 30 dollar arduino kit is the best way to get your feet wet. If you're in Canada or the US I can send you a bunch of stuff to get you going. I'm not some weirdo, it's just what I do.
Brilliant. I needed this inverted design for something I was working on and this fits the bill perfectly! Thank you for the good quality video. Keep it up!
so many people asking what the mystery circuit is. it is a slow oscillator circuit that has current limited outputs. it doesn't really matter how it is implemented. it could be a 555 timer, could be a microcontroller. the entire point one would use a transistor like this is when you can't source as much current as you want to directly. in other words, the output impedance of the driving signal is too high. so we use a transistor to buffer the signal. i feel like if he'd talked about things in terms of output impedance early on this would be less confusing for newcomers.
Thank you for making this video. This is actually exactly what I was needing to do for a project with and optical sensor that is NPN. Very much appreciated.
Best explanation ever! You can minimize current used with properly sized resistors. I have used this circuit where there needed to be an "on" indication and an "off" indication from a single output.
Wow, really nice, I knew that an inverted AND gate = NAND and with NAND circuits you can make ADDERS and LATCHES (FLASH NAND, etc.), but didn't understand how the inverted part works until now. This is a really important thing to understand, thanks!
Would be interesting and even important to show your voltage drops across your transistor. Typically Vce in saturation is 0.2v and Vbe 0.7v. That's one of the problems of using only a diode for reverse voltage protection in low voltage circuits. Diode voltage drop becomes significant.
How is it that the voltage drop across the LED is exactly 5 V when the transistor switch is off? Shouldn't it be a little less than 5 V because there is also additional voltage drop across the resistor?
This is correct. When the transistor goes off, then current will flow through the resistor to the diode, and through the diode to ground. So at point A, the voltage will be less than 5V. Effectively we have the original circuit which was powered directly by the 5V power supply.
From what I've learned in class, we need to have a resistor in the emitter or in the base. If we dont have one, from KVL the voltage in VBE will be equal to the voltage from that unknown circuit. This means that at a certain point VBE will be equal to 5V wich accoding to the Current VS Voltage graph will imply a massive current. Im not understanding how is it possible that the transistor doesnt die
If you recall from previous videos in this series (which I assume you watched, it's video #4), the "mistery" circuit provided a current of only 0.3 mA. The voltage was 5.14V when nothing was connected, but as soon as he connected the resistor and the LED the voltage across the LED and the 220 ohms resistor dropped to 1.82V. Assuming 0.3 mA when the LED was connected, with a voltage of 1.82V across the 220 ohms resistor and the LED, this means that 3.32V where dropped across the mistery circuit. Dividing 3.32V by 0.3 mA tells us that the output resistance of that circuit is 11067 ohms. Now, I didn't bother to check the mistery circuit but I'm pretty sure that Ben put some resistors right before the output in order to have that much resistance (~11K ohms). If you know about Thevenin theorem, it's like having a 5.14V Thevenin voltage with ~11K ohms Thevenin equivalent resistance: in other words, it's a high impedance "power supply", which is capable of delivering only small currents: as soon as you load the mistery circuit a little more (like in this case, with a 220 ohms resistor and an LED), the circuit can't keep up and a significant amount of voltage is dropped across the high impedance of the circuit. So, that's the resistance that's limiting the current flowing to the base: assuming that the base-emitter junction has a forward voltage drop of 0.6V, this means that when he connects the mistery signal to the base, there will be 4.54 V dropped across the output resistance (5.14V - 0.6V), which acts as a current limiter for the base, making the base current equal to ~0.4 mA (4.54V / 11067 ohms). Unless I'm a complete douche and I'm getting this whole thing wrong, of course :D
OK - when you wire the LED across the collector and emitter of the transistor, why does current flow though the transistor and not the LED? They're both semiconductors - what makes the (saturated) transistor have lower resistance than the LED?
I also came here to ask this. The only thing I can guess is that the effective resistance of an LED is lower than a saturated transistor? Searching for information on the voltage drop of the components indicates that a red LED drops ~2V, but the transistor drops by ~0.2V. Divide either by the amount of current flowing through to get the resistance value.
Voltage across LED & transistor are always the same since they are connected together. When the transistor is on, the voltage across it is almost zero - it’s basically a short. The LED needs to drop 2-3v to conduct, so it stays off. You can think of it as: the transistor pulls the voltage low, to ground. All the voltage is dropped across the resistor in accordance with ohms law, with none left across the LED & transistor.
LED voltage drop is like a barrier to jump, or a height to drop. You need to start with a sufficient height (voltage) in order to jump the gap or drop the height.
Great wid, learning something new. I wonder, if this can be used for inverted switching of load. For example: push button to disconnect power from USB device (to reset it).
Talking about path of least resistance, when the base current is on, why doesn't all the current get diverted through the part of the circuit without the LED? Wouldn't that have less resistance than the path through the remaining LED? And when the base current is on, why don't both the LEDs light up? I guess I'm confused as to why the transistor at the top diverts all the current from the top LED but not the bottom LED.
So the current goes from the collector to the emitter if the base current is going, The terminology of "ground" here is confusing me a little. Isn't the current going from the emitter to the other terminal (negative?) of the power source?
"Ground" is defined as zero volts in a circuit and all other voltage measurements are taken with respect to ground. For convenience (in single supply circuits), ground is usually set to the negative terminal of the power supply, is is done in this video. So "ground" is just a name for the negative terminal of the power supply. In other words, the answer to your question is "yes" and we call the negative terminal "ground."
When the transistor is on, hould the voltage at A (after the resistor just before the transistor) be 0.6 V and not 0V because when the transistor is on, there will be a voltage drop of 0.6V drop across the transistor?
I’m still quite the novice at electronics but it seems to me, like what you created is a sort of delay circuit, not a reverse circuit. Because the current is still moving in the same direction as before, it is not being reversed in any way. Please correct me if I’m wrong - I am trying to learn more about this stuff. Cheers!
My mystery circuit was just VCC. Good thing I've smelt the transistor before it destroyed itself. After putting a 10k resistor between base and VCC, the transistor no longer heats up. But now I'm wondering, maybe there's a dedicated chip that could invert the signal instead of a transistor? All I need is to just light up an LED as signal goes to ground, because I have a relay module which closes the relays as signal goes to ground.
Wait!! Why does this work? It seems like when the transistor is on that current would be split between both the transistor and the led. Why does the led go completely out then??
Benjamin Rutkowski. The led goes out completely because the transistor is basically acting like a switch in the circuit. When the transistor turns on in the presence of the signal, it basically creates a path with 0 resistance. So all the current will flow through the transistor and not the LED. When the transistor turns off (it's not saturated internally) it's basically an open wire, so there is no physical way for electrons to pass through the transistor at that point. Therefore the electrons will take the only other option they have to get back to ground, and that's through the LED!
So when the transistor is in saturation, with 0 resistence, all the current goes down through the collector to emmitor and because of the resistance of the LED, almost 0 current goes through it? because I was confused with the current at the node where it splits between the collector and the LED.
Because the voltage drop across a Light Emitting Diode is somewhat like 2 volt and the voltage drop between collector and emitter is much less the LED will stop conducting and there will only flow current through the transistor. See also my reply to tablatronix question above.
but why does not the current get split between the LED and the transistor (when the transistor in on) thus the LED just gets dimmer.........i mean if you put two resistors in parallel the current will split between the two, it does not choose to go through only one of the two !!! please explain it
tesla. py LED doesnt even light up because collector-emiter (ce) resistance is really small so all current goes thru transistor and because CE is low resistance there is really low voltage drop Uce (or Vce), and LED is in parallel with CE electrodes so diode also has that low voltage which is most of time below 1.9 volt so LED doesnt light . So transistor is like short peace of wire.
so there is a VERY SMALL amount of current flowing through the LED but not even close to turning it on, because the transistor's resistance is much much smaller than the LED's resistance ? R(LED)>>R(transistor) ?
There probably is small current thru but is in scale of micro or even nano amperes. And yes as I said saturation voltage is really small (Uce) and LED is also biased with that voltage and in most cases is lower than needed to bypas PN junction of LED. So you are true, LED is much higher resistance compared to transistor in this case.
I don't understand why at least SOME of the current doesn't go through the path of the LED. If I had a 100 Ohm and 100K Ohm resistor in parallel, would ALL of the current go down the path with the 100 Ohm resistor? If a resistor was placed after the emitter, before the ground, would that have changed the output?
So from what I understand this happens because the led's ground is after the switch. This creates two path for the electrons to go through and they go through the less resisting? Would it be the same if we somehow had the positive of the led before the resistor and the ground after the switch?
Question. You say multiple times that electrons choose the past of least resistance. If I had a circuit with two paths back to ground, one had a N value resistor, and the other had a N*2 value resistor, are you implying that no current would flow through the path with the N*2 resistor? If you arent implying that, then what are you saying?
There is only a voltage drop (potential difference) across the resistor, when there is current flowing through the resistor. V=IR if current (I) is zero then voltage drop (V) across the resistor must also be zero.
@@typedeaf V means voltage difference across resistor. If V is 0, it means there is no voltage difference between the two terminals of the resistor. Voltage at one end equals voltage at voltage at the other end of resistor.
@@eriknestaas2270 Well this was 3 years ago, but I believe I was referring to the diagram @4:44 which does not have an LED in circuit. If we look at the circuit with the LED @7:40, which I assume you were considering, then yes depending on the state of the transistor, the collector (of NPN) will either be at 0V or about 1.7V ( typical LED voltage drop). i.e. when current is able to flow across the emitter collector junction of the transistor, there will be 0V across the LED and it will not light. The current will take the path through resistor and C-E junction of the NPN.
maybe this is a primitive version of flip flop. and for signal for the transistor base is used for example perforated tape and light source and diode when the light will pass through the hole in the perforated strip will activate the diode and it will give a signal to the base of the transistor
The problem is that you have limited the current to a bigger load (say, a light bulb). To fix this, you can add another transistor with the base connected to point A.
If saying that electrons take the path of least resistance is true, then why when we have 2 resistors in parallels, current goes through both of them and not only the weaker one?
Tried this on a projekt. The short circuit will heat the resistor up extremely and destroy it eventually, if the transistor is on. Does anyone have any tipps for a solution?
Hi sir, I want easy solution to run 3 volt led parallel chain . but first led -ve to +ve second one +'ve to -ve like this ways.Ones I change polarity of battery led blink odd and even ways.can you give me simple polarity changing circuit.
Thanks.... For this video..... And also when I connected my led from the collector to ground the inverted led glows but dims when I switch the transistor on ..... It should go off but it dims.... Please help .... And thnx again
when i tried this in my experiment a small amount of current flows in the upper led even when the base is turned on, why is it happening ? anybody help me with this?
The concept of conventional current is really confusing and sometimes I find it unnecessary since it just illustrates the movements of holes not electricity. As an Artist learning electronics for my practice. The concept is utterly unnecessary. What do yoll think?
The mystery signal generator has an internal resistance in series that limits how much current it can output when shorted to ground. When you connect a load with a lower resistance to ground in series, the path to ground will be shorter at the point where the load and the input connect, so the voltage across the load will be closer to ground. The current that flows when the supply is connected through a 220 ohm resistor is 0.3 milliamps, so you can calculate the internal resistance of the supply like so: 1V/1A = 1R (Ohm's Law) 0.3mA = 0.3/1000 A (1 milliamp is 1A/1000) x = internal resistance 5V/(220 + x)R = (0.3/1000) A 5V = (220 + x)R * (0.3/1000) A (220 + x)R = 5V/((0.3/1000) A) = 5V/1A * 1000/0.3 = 16666.66... R x R = ~16666.6667 R - 220 R = ~16446.6667 R So the internal resistance is around 16.44 kilo ohms. Adding a load resistor to the source effectively creates a voltage divider, because the source has a fairly high resistance, while the load is almost 100 times smaller, so the voltage across the load is also much smaller, because most the source's output power is dissipated across its internal resistance. The voltage across the load is: 5V * 220R/(16446.667R + 220R) = = 5V * 220/16666.667 = = ~0.066V = 66mV (The equation results in a voltage because you have V * aR/bR = V * a/b) So the voltage that the load resistor sees is only 66 millivolts. You can check that this gives the observed current with the following: 66mV/220R = 0.3mV/R = 0.3mA A more detailed explanation about why the voltage across the load is smaller: When you connect a resistance between two voltages (Vin and 0 volts in this case), a smooth voltage gradient forms across the resistor, because the resistance between the middle of the resistor and ground is half of the total resistance, but the same amount of current flows through that section, so the voltage from that point to ground is also half of the voltage across the whole resistor. 1V/1R = 0.5V/0.5R = 1A When you have multiple resistors in series, you have the same gradient, but across multiple resistors, so the voltage across each one is dependent on how much resistance they have proportional to the total resistance, in other words, what percentage of the total resistance they have. A general formula for the voltage across the resistor connected to ground when you have 2 resistors in series is Vin * R2/(R1+R2), where R2 is the resistor connected to ground, and R1 is the resistor connected to Vin. The derivation is as follows: Vin = the input voltage. Vout = the voltage across the resistor connected to ground (0v). R1 = the resistor connected to the input voltage. R2 = the resistor connected to ground. Vin/(R1 + R2) = Vout/R2 (the current across one of the resistors is the same as the current across both resistors because they're in series and there's no other connections in the middle.) Vout = Vin * R2/(R1+R2) (the output voltage is the input voltage times the ratio of the grounded resistor to the total resistance.) Vin _____ | / \ / R1 \ / | .-----------| Vout | / \ / R2 \ / | ______ __ (Ground) - A side note: if R2 is connected to another voltage instead of ground, then you also have to take that into account. V1 _____ | / \ / R1 \ / | .-----------| Vout | / \ / R2 \ / | _____ V2 A more general formula in this case: Vout = (V1*R2 + V2*R1)/(R1 + R2) The V1*R2 part means that making R2 bigger brings the output closer to V1, while the V2*R1 part means that making R1 bigger brings the output closer to V2. The derivation is as follows. V1 = the voltage that's connected to R1 V2 = the voltage that's connected to R2 (V1 - V2)/(R1 + R2) = (Vout - V2)/R2 (The current across both resistors is equal to the current across each of them individually. If V1 and V2 are the same, no current flows, because there needs to be a difference between the two voltages for there to be current. If V1 is more positive than V2, current flows from V1 to V2, and we say that this is positive. If V1 is less positive (or more negative) than V2, current flows from V2 to V1, and we say that this current is negative.) (V1 - V2) * R2/(R1 + R2) = Vout - V2 Vout = (V1 - V2) * R2/(R1 + R2) + V2 = = (V1*R2 - V2*R2)/(R1+R2) + V2*(R1+R2)/(R1+R2) = = (V1*R2 + V2*((R1+R2) - R2))/(R1+R2) = = (V1*R2 + V2*R1)/(R1+R2)
In this case it is. The reason is that the "mystery circuit" is a high impedance signal. This was shown in earlier videos when the signal voltage dropped pretty steeply as soon as any significant current was pulled from the signal. You can think of it like the following: there is a 5V signal in series with a (fairly) large resistance. When that signal is used to drive the base of the transistor the current through the transistor is limited by the series resistance on the signal. Or, another way to look at it is that the base-emitter voltage will be around one diode drop, about 0.65V, and the signal is 5V so the rest of the voltage, 4.35V, is dropped across the series resistance. If you have a low impedance voltage source, e.g., a USB power supply, attached directly to the base of a grounded emitter transistor then that voltage source will try to supply enough current to keep its output at 5V however the base-emitter voltage will want to be close to .65V. Where does the rest of the 4.35V get dropped? Across the nearly zero ohm resistance in the wires. A quick ohms law calculation leads to enormous current base current which, in turn, leads to a transistor without its magic smoke. So, for a low impedance source, you are absolutely correct.
where the power supply enters the transistor to turn it on then out the other end of the transistor back to ground, u called a short circuit but wouldnt that ruin the power supply or battery?
No, because the resistor is still in the current path. The term 'short circuit' isn't always bad. Only if the short circuit is across the battery itself. In other words, if he also jumped across the resister, then that would be bad.
There are two things that I do not understand and would be grateful if someone would try to help me. 1. How is that the placing of the resistor on the invert circuit from pre led to post led doesn't cause a problem? 2. If the voltage between the resistor to ground is 5V once the transistor is off, aren't we driving the led with 5V? (apparently not because the led doesn't burn, but wouldn't it be more accurate to say that the voltage from resistor to ground is 5V minus the voltage drop in the resistor?).
1. Why would it? 2. Yes, that’s wrong. 5v was written before the LED was added. After LED was added he should have erased it. With the LED it’s 2v or 3v instead of 5v.
Hope you cover CMOS (two transistors instead of a transistor and a resistor) inverters in the future. I looked at some explanations and diagrams but it was all gibberish.
Wow, so this is the etymology of the NOT gate in diagrams being a triangle with a little circle at the tip, and the AND gate being shaped like a D. Now I wonder where the more fish-shaped OR comes from
I still don't understand the voltage thing in the middle between the resistor and the transistor. Edit: Nvm. Needed the visual to to understand it. Good vid!
Because the current that normally drives the LED, will flow through the transistor when the LED is off, dissipating power over the resistor. So this circuit consumes power both when the LED is on and when it is off. This is obviously a proof of concept circuit, driving a relatively low-impedance LED. Real digital signals don't drive much current because they are fed to high impedance inputs, which would allow to use a high valued resistor in here, minimizing current. If you need to use that signal to drive something more powerful, you would have a separate driver circuit.
Due to the resistor being 220 ohm and a power of more or less 5 volt the current is somewhere around 23 milliampere when the transistor is on (when the transistor is off there is a drop of ruffly 2 volt over the Light Emiting Diode, the remaining 3 volt over the resistor will cause a current of about 14 milliampere). Altough the current in off state is more than in on state and these are relatively large with respect to logic circuits it is not so verry much seen from the perspective of a power source. Do keep in mind that the treated circuit is merely a demonstration of how to invert a signal, in a more practical application there will probably be no LED driven but only one ore more logic inputs, the value of the resistor used will be between 1kilo ohm and 100 kilo ohm depending on howmany inputs are connected. The current will be between 5 milliampere and 50 microampere !
Yay! I made it this far.... and I did it with PNP transistors, I just inverted the sense of the instructions. My "mystery signal" is a IR phototransistor I cannibalized from an dead TV and now I can make an LED flash from across the room.... and see its inverted signal. I have learned that the pulses must be narrow (less than 50% duty cycle overall, to abuse the phrase duty cycle), because during the pulse trains, the inverted signal (representing darkness) is brighter on average. Now I can look up what the pulse trains look like for common TV remotes, and test my hypothesis. I feel like I'm ten years old again. This is GREAT. Thanks, Ben!
That last explanation with the actual switch did it for me and made it obvious why this works. Thank you very much!
Except it makes it clear it can’t output 5v at point A. The diode clamps it to 2-3v.
2021. Very late to the channel but you Ben are on my list of the most intelligent people in history. Such a great explanation can only come from someone who really knows their stuff
WOW your teaching is great, you really know how to make this stuff simple to understand!
thank you very much!
The idea is simple, but it helps to create understanding of the logic and well as general application. Thank you for sharing
Amazing explanation. There are very few digital electronics engineers on youtube that can explain these things in a manner that us layman can fully understand. I'm a programmer by trade (I guess you could say) but looking under the hood has been difficult to learn until I found you and a couple others (out of the many, many channels) on youtube. Thank you sir. I've moved on from ttl using single transistors in series and parallel to using ics but there are still things to learn, even though I know how to build an inverter and somewhat understood why it works, I now understand even more. Great channel Ben, now I might be able to grasp your breadboard insanity in your other videos a little better. Haha
What are the other channels you watch for electronics.
Eewave is a good channel. He has simple and complex stuff. There's cheap 74ls and cd4xxx chip kits on Amazon and they are a good starter. I read books and circuit diagrams now. I have over 100 types of logic chips now lol
@@reddaxtor5662 there's a bunch if you're just starting out. Eewave is good, it's a very smart young Indian gentleman who has a good backlog of logic related stuff. If you're looking to learn how to solder and do projects and know enough to be dangerous haha just search topics. I read alot now, I've learned though that you can watch all the videos you want and know the jargon and understand it but picking something like an arduino project that you want to make into a permanent device or some such is the way to do it. Read and watch and practice hands on. How far along are you? I mean like do you have a multimeter and soldering iron, breadboard or any of that? A 30 dollar arduino kit is the best way to get your feet wet. If you're in Canada or the US I can send you a bunch of stuff to get you going. I'm not some weirdo, it's just what I do.
Somehow your videos are bingeable and yet I can still absorb the information. Amazing.
Brilliant. I needed this inverted design for something I was working on and this fits the bill perfectly! Thank you for the good quality video. Keep it up!
Great teachers simplify complicated subjects, and your one of them. Keep the vids coming
Your English teacher clearly doesn't.
so many people asking what the mystery circuit is. it is a slow oscillator circuit that has current limited outputs. it doesn't really matter how it is implemented. it could be a 555 timer, could be a microcontroller. the entire point one would use a transistor like this is when you can't source as much current as you want to directly. in other words, the output impedance of the driving signal is too high. so we use a transistor to buffer the signal. i feel like if he'd talked about things in terms of output impedance early on this would be less confusing for newcomers.
Thank you for making this video. This is actually exactly what I was needing to do for a project with and optical sensor that is NPN. Very much appreciated.
Best explanation ever! You can minimize current used with properly sized resistors.
I have used this circuit where there needed to be an "on" indication and an "off" indication from a single output.
Wow, really nice, I knew that an inverted AND gate = NAND and with NAND circuits you can make ADDERS and LATCHES (FLASH NAND, etc.), but didn't understand how the inverted part works until now. This is a really important thing to understand, thanks!
Would be interesting and even important to show your voltage drops across your transistor.
Typically Vce in saturation is 0.2v and Vbe 0.7v. That's one of the problems of using only a diode for reverse voltage protection in low voltage circuits. Diode voltage drop becomes significant.
Your teaching technique is awesome.
Woooow i loved inverting the signal with the transistor😍😍😍
How is it that the voltage drop across the LED is exactly 5 V when the transistor switch is off? Shouldn't it be a little less than 5 V because there is also additional voltage drop across the resistor?
This is correct. When the transistor goes off, then current will flow through the resistor to the diode, and through the diode to ground. So at point A, the voltage will be less than 5V. Effectively we have the original circuit which was powered directly by the 5V power supply.
Thank you very very much!!! Good explanation! It was very usefull for my project with self poweroff arduino!
Simply superb. Great explanation, right to the point. Thanks.
Thanks, this is exactly what i was looking for.
Omg once u attached the second led it clicked in my mind
From what I've learned in class, we need to have a resistor in the emitter or in the base. If we dont have one, from KVL the voltage in VBE will be equal to the voltage from that unknown circuit. This means that at a certain point VBE will be equal to 5V wich accoding to the Current VS Voltage graph will imply a massive current. Im not understanding how is it possible that the transistor doesnt die
If you recall from previous videos in this series (which I assume you watched, it's video #4), the "mistery" circuit provided a current of only 0.3 mA. The voltage was 5.14V when nothing was connected, but as soon as he connected the resistor and the LED the voltage across the LED and the 220 ohms resistor dropped to 1.82V.
Assuming 0.3 mA when the LED was connected, with a voltage of 1.82V across the 220 ohms resistor and the LED, this means that 3.32V where dropped across the mistery circuit. Dividing 3.32V by 0.3 mA tells us that the output resistance of that circuit is 11067 ohms. Now, I didn't bother to check the mistery circuit but I'm pretty sure that Ben put some resistors right before the output in order to have that much resistance (~11K ohms).
If you know about Thevenin theorem, it's like having a 5.14V Thevenin voltage with ~11K ohms Thevenin equivalent resistance: in other words, it's a high impedance "power supply", which is capable of delivering only small currents: as soon as you load the mistery circuit a little more (like in this case, with a 220 ohms resistor and an LED), the circuit can't keep up and a significant amount of voltage is dropped across the high impedance of the circuit.
So, that's the resistance that's limiting the current flowing to the base: assuming that the base-emitter junction has a forward voltage drop of 0.6V, this means that when he connects the mistery signal to the base, there will be 4.54 V dropped across the output resistance (5.14V - 0.6V), which acts as a current limiter for the base, making the base current equal to ~0.4 mA (4.54V / 11067 ohms).
Unless I'm a complete douche and I'm getting this whole thing wrong, of course :D
It will work without a base resistor and not kill the transistor because the collector resistor limits the current.
Really excellent video/explanation!
OK - when you wire the LED across the collector and emitter of the transistor, why does current flow though the transistor and not the LED? They're both semiconductors - what makes the (saturated) transistor have lower resistance than the LED?
I also came here to ask this. The only thing I can guess is that the effective resistance of an LED is lower than a saturated transistor? Searching for information on the voltage drop of the components indicates that a red LED drops ~2V, but the transistor drops by ~0.2V. Divide either by the amount of current flowing through to get the resistance value.
Voltage across LED & transistor are always the same since they are connected together. When the transistor is on, the voltage across it is almost zero - it’s basically a short. The LED needs to drop 2-3v to conduct, so it stays off.
You can think of it as: the transistor pulls the voltage low, to ground. All the voltage is dropped across the resistor in accordance with ohms law, with none left across the LED & transistor.
LED voltage drop is like a barrier to jump, or a height to drop. You need to start with a sufficient height (voltage) in order to jump the gap or drop the height.
@@davadoff You are spot on.
I love learning from you.
Great wid, learning something new. I wonder, if this can be used for inverted switching of load. For example: push button to disconnect power from USB device (to reset it).
Talking about path of least resistance, when the base current is on, why doesn't all the current get diverted through the part of the circuit without the LED? Wouldn't that have less resistance than the path through the remaining LED?
And when the base current is on, why don't both the LEDs light up?
I guess I'm confused as to why the transistor at the top diverts all the current from the top LED but not the bottom LED.
this is waht im looking for. thanks dawg
very nice explaining - thank you
So the current goes from the collector to the emitter if the base current is going, The terminology of "ground" here is confusing me a little. Isn't the current going from the emitter to the other terminal (negative?) of the power source?
"Ground" is defined as zero volts in a circuit and all other voltage measurements are taken with respect to ground. For convenience (in single supply circuits), ground is usually set to the negative terminal of the power supply, is is done in this video. So "ground" is just a name for the negative terminal of the power supply. In other words, the answer to your question is "yes" and we call the negative terminal "ground."
When the transistor is on, hould the voltage at A (after the resistor just before the transistor) be 0.6 V and not 0V because when the transistor is on, there will be a voltage drop of 0.6V drop across the transistor?
Excellent work Bro ♥
I’m still quite the novice at electronics but it seems to me, like what you created is a sort of delay circuit, not a reverse circuit. Because the current is still moving in the same direction as before, it is not being reversed in any way. Please correct me if I’m wrong - I am trying to learn more about this stuff. Cheers!
In no way is it a delay. Reverse as in reversed logic levels. Current flows from positive to negative - always!
My mystery circuit was just VCC. Good thing I've smelt the transistor before it destroyed itself. After putting a 10k resistor between base and VCC, the transistor no longer heats up. But now I'm wondering, maybe there's a dedicated chip that could invert the signal instead of a transistor? All I need is to just light up an LED as signal goes to ground, because I have a relay module which closes the relays as signal goes to ground.
Wait!! Why does this work? It seems like when the transistor is on that current would be split between both the transistor and the led. Why does the led go completely out then??
Benjamin Rutkowski. The led goes out completely because the transistor is basically acting like a switch in the circuit. When the transistor turns on in the presence of the signal, it basically creates a path with 0 resistance. So all the current will flow through the transistor and not the LED. When the transistor turns off (it's not saturated internally) it's basically an open wire, so there is no physical way for electrons to pass through the transistor at that point. Therefore the electrons will take the only other option they have to get back to ground, and that's through the LED!
So when the transistor is in saturation, with 0 resistence, all the current goes down through the collector to emmitor and because of the resistance of the LED, almost 0 current goes through it? because I was confused with the current at the node where it splits between the collector and the LED.
Because the voltage drop across a Light Emitting Diode is somewhat like 2 volt and the voltage drop between collector and emitter is much less the LED will stop conducting and there will only flow current through the transistor. See also my reply to tablatronix question above.
Excellent explanation, very interesting! Thanks for the video!
why is th resistor coming after the LED?
but why does not the current get split between the LED and the transistor (when the transistor in on) thus the LED just gets dimmer.........i mean if you put two resistors in parallel the current will split between the two, it does not choose to go through only one of the two !!! please explain it
tesla. py LED doesnt even light up because collector-emiter (ce) resistance is really small so all current goes thru transistor and because CE is low resistance there is really low voltage drop Uce (or Vce), and LED is in parallel with CE electrodes so diode also has that low voltage which is most of time below 1.9 volt so LED doesnt light . So transistor is like short peace of wire.
so there is a VERY SMALL amount of current flowing through the LED but not even close to turning it on, because the transistor's resistance is much much smaller than the LED's resistance ? R(LED)>>R(transistor) ?
There probably is small current thru but is in scale of micro or even nano amperes. And yes as I said saturation voltage is really small (Uce) and LED is also biased with that voltage and in most cases is lower than needed to bypas PN junction of LED.
So you are true, LED is much higher resistance compared to transistor in this case.
thank you
I don't understand why at least SOME of the current doesn't go through the path of the LED. If I had a 100 Ohm and 100K Ohm resistor in parallel, would ALL of the current go down the path with the 100 Ohm resistor? If a resistor was placed after the emitter, before the ground, would that have changed the output?
thanks very much ben, just what i needed!
So from what I understand this happens because the led's ground is after the switch. This creates two path for the electrons to go through and they go through the less resisting? Would it be the same if we somehow had the positive of the led before the resistor and the ground after the switch?
Is the resistor supposed to be connected to the negative pin of the LED? I always have it connected on the positive side.
Question. You say multiple times that electrons choose the past of least resistance. If I had a circuit with two paths back to ground, one had a N value resistor, and the other had a N*2 value resistor, are you implying that no current would flow through the path with the N*2 resistor? If you arent implying that, then what are you saying?
Why is there equally 5 volts on each side of the resistor? Doesn't that violate Ohm's law?
There is only a voltage drop (potential difference) across the resistor, when there is current flowing through the resistor. V=IR if current (I) is zero then voltage drop (V) across the resistor must also be zero.
@@Inaflap Then you are saying that 5 = 0? If I and R are 0, then according to the equation, V must be 0.
@@typedeaf V means voltage difference across resistor. If V is 0, it means there is no voltage difference between the two terminals of the resistor. Voltage at one end equals voltage at voltage at the other end of resistor.
@@Inaflap but there would be current flowing (it would flow through the resistor, through the LED and finally to ground).
@@eriknestaas2270
Well this was 3 years ago, but I believe I was referring to the diagram @4:44 which does not have an LED in circuit.
If we look at the circuit with the LED @7:40, which I assume you were considering, then yes depending on the state of the transistor, the collector (of NPN) will either be at 0V or about 1.7V ( typical LED voltage drop). i.e. when current is able to flow across the emitter collector junction of the transistor, there will be 0V across the LED and it will not light. The current will take the path through resistor and C-E junction of the NPN.
Will this also work with analog signals, such as 0-10 or 4-20mA, where the input is fluctuated repeatedly?
Really interesting; how do get that unknown signal? If you could link a video on how to make it, please. I want to try this at my home.
What is the value of supply voltage of yellow and black wire? Where they come from?..... From the philippines
maybe this is a primitive version of flip flop. and for signal for the transistor base is used for example perforated tape
and light source and diode when the light will pass through the hole in the perforated strip will activate the diode and it will give a signal to the base of the transistor
No, it’s an inverting buffer or a not gate. It’s not a flip flop or like a flip flop.
The problem is that you have limited the current to a bigger load (say, a light bulb). To fix this, you can add another transistor with the base connected to point A.
what kind of transistors are you using?
2N3904 NPN Bipolar Junction Transistor. Watch the entire series.
If saying that electrons take the path of least resistance is true, then why when we have 2 resistors in parallels, current goes through both of them and not only the weaker one?
You are right and he is describing it wrong way in my opinion. He should say current doesn’t flow through the path of near infinite resistance.
Does the inversion work with intermediate voltages, generating a variable inverted signal?
May i know the software name of the digital black board
Tried this on a projekt. The short circuit will heat the resistor up extremely and destroy it eventually, if the transistor is on. Does anyone have any tipps for a solution?
wow! my head just exploded!
Too eager to know what is that mystery circuit is.. Please explain that in a video!
thanks, great video
Interesting idea. Thank you!
how u choose resistor and capacitor
Thank you SO much
Hi sir,
I want easy solution to run 3 volt led parallel chain . but first led -ve to +ve second one +'ve to -ve like this ways.Ones I change polarity of battery led blink odd and even ways.can you give me simple polarity changing circuit.
what's that mystery 5v source?
Woah that's sick
Thanks.... For this video..... And also when I connected my led from the collector to ground the inverted led glows but dims when I switch the transistor on ..... It should go off but it dims.... Please help .... And thnx again
when i tried this in my experiment a small amount of current flows in the upper led
even when the base is turned on, why is it happening ? anybody help me with this?
Thanks great explanation!
The concept of conventional current is really confusing and sometimes I find it unnecessary since it just illustrates the movements of holes not electricity. As an Artist learning electronics for my practice. The concept is utterly unnecessary. What do yoll think?
Electron flow direction makes no difference at all. It only comes up when learning the physics & operation of vacuum tubes, transistors, etc.
i m still confused about the mystery power supply ,when it comes to the the same 5 voltage and same resistor and same LED,but with different amp
The mystery signal generator has an internal resistance in series that limits how much current it can output when shorted to ground. When you connect a load with a lower resistance to ground in series, the path to ground will be shorter at the point where the load and the input connect, so the voltage across the load will be closer to ground.
The current that flows when the supply is connected through a 220 ohm resistor is 0.3 milliamps, so you can calculate the internal resistance of the supply like so:
1V/1A = 1R (Ohm's Law)
0.3mA = 0.3/1000 A (1 milliamp is 1A/1000)
x = internal resistance
5V/(220 + x)R = (0.3/1000) A
5V = (220 + x)R * (0.3/1000) A
(220 + x)R = 5V/((0.3/1000) A) = 5V/1A * 1000/0.3 = 16666.66... R
x R = ~16666.6667 R - 220 R = ~16446.6667 R
So the internal resistance is around 16.44 kilo ohms.
Adding a load resistor to the source effectively creates a voltage divider, because the source has a fairly high resistance, while the load is almost 100 times smaller, so the voltage across the load is also much smaller, because most the source's output power is dissipated across its internal resistance.
The voltage across the load is:
5V * 220R/(16446.667R + 220R) =
= 5V * 220/16666.667 =
= ~0.066V = 66mV
(The equation results in a voltage because you have V * aR/bR = V * a/b)
So the voltage that the load resistor sees is only 66 millivolts.
You can check that this gives the observed current with the following:
66mV/220R = 0.3mV/R = 0.3mA
A more detailed explanation about why the voltage across the load is smaller:
When you connect a resistance between two voltages (Vin and 0 volts in
this case), a smooth voltage gradient forms across the resistor, because
the resistance between the middle of the resistor and ground is half of
the total resistance, but the same amount of current flows through that
section, so the voltage from that point to ground is also half of the
voltage across the whole resistor.
1V/1R = 0.5V/0.5R = 1A
When you have multiple resistors in series, you have the same gradient,
but across multiple resistors, so the voltage across each one is
dependent on how much resistance they have proportional to the total
resistance, in other words, what percentage of the total resistance they
have.
A general formula for the voltage across the resistor connected to ground when you have 2 resistors in series is
Vin * R2/(R1+R2),
where R2 is the resistor connected to ground, and R1 is the resistor connected to Vin.
The derivation is as follows:
Vin = the input voltage.
Vout = the voltage across the resistor connected to ground (0v).
R1 = the resistor connected to the input voltage.
R2 = the resistor connected to ground.
Vin/(R1 + R2) = Vout/R2 (the current across one of the resistors is the same as the current across both resistors because they're in series and there's no other connections in the middle.)
Vout = Vin * R2/(R1+R2) (the output voltage is the input voltage times the ratio of the grounded resistor to the total resistance.)
Vin
_____
|
/
\
/ R1
\
/
|
.-----------| Vout
|
/
\
/ R2
\
/
|
______
__ (Ground)
-
A side note: if R2 is connected to another voltage instead of ground, then you also have to take that into account.
V1
_____
|
/
\
/ R1
\
/
|
.-----------| Vout
|
/
\
/ R2
\
/
|
_____
V2
A more general formula in this case:
Vout = (V1*R2 + V2*R1)/(R1 + R2)
The V1*R2 part means that making R2 bigger brings the output closer to V1, while the V2*R1 part means that making R1 bigger brings the output closer to V2.
The derivation is as follows.
V1 = the voltage that's connected to R1
V2 = the voltage that's connected to R2
(V1 - V2)/(R1 + R2) = (Vout - V2)/R2 (The current across both resistors is equal to the current across each of them individually. If V1 and V2 are the same, no current flows, because there needs to be a difference between the two voltages for there to be current. If V1 is more positive than V2, current flows from V1 to V2, and we say that this is positive. If V1 is less positive (or more negative) than V2, current flows from V2 to V1, and we say that this current is negative.)
(V1 - V2) * R2/(R1 + R2) = Vout - V2
Vout = (V1 - V2) * R2/(R1 + R2) + V2 =
= (V1*R2 - V2*R2)/(R1+R2) + V2*(R1+R2)/(R1+R2) =
= (V1*R2 + V2*((R1+R2) - R2))/(R1+R2) =
= (V1*R2 + V2*R1)/(R1+R2)
The mystery supply is just a voltage source with a relatively high output impedance
Is it safe to connect power source (+5 V signal) directly to the base of the transistor and without the resistor to suppress a high current flow?
In this case it is. The reason is that the "mystery circuit" is a high impedance signal. This was shown in earlier videos when the signal voltage dropped pretty steeply as soon as any significant current was pulled from the signal. You can think of it like the following: there is a 5V signal in series with a (fairly) large resistance. When that signal is used to drive the base of the transistor the current through the transistor is limited by the series resistance on the signal. Or, another way to look at it is that the base-emitter voltage will be around one diode drop, about 0.65V, and the signal is 5V so the rest of the voltage, 4.35V, is dropped across the series resistance.
If you have a low impedance voltage source, e.g., a USB power supply, attached directly to the base of a grounded emitter transistor then that voltage source will try to supply enough current to keep its output at 5V however the base-emitter voltage will want to be close to .65V. Where does the rest of the 4.35V get dropped? Across the nearly zero ohm resistance in the wires. A quick ohms law calculation leads to enormous current base current which, in turn, leads to a transistor without its magic smoke. So, for a low impedance source, you are absolutely correct.
@@michaelc.tiberio5761 Fantastic response. Thank you.
where the power supply enters the transistor to turn it on then out the other end of the transistor back to ground, u called a short circuit but wouldnt that ruin the power supply or battery?
No, because the resistor is still in the current path. The term 'short circuit' isn't always bad. Only if the short circuit is across the battery itself. In other words, if he also jumped across the resister, then that would be bad.
Can you tell me components values and transister number
There are two things that I do not understand and would be grateful if someone would try to help me.
1. How is that the placing of the resistor on the invert circuit from pre led to post led doesn't cause a problem?
2. If the voltage between the resistor to ground is 5V once the transistor is off, aren't we driving the led with 5V? (apparently not because the led doesn't burn, but wouldn't it be more accurate to say that the voltage from resistor to ground is 5V minus the voltage drop in the resistor?).
1. Why would it?
2. Yes, that’s wrong. 5v was written before the LED was added. After LED was added he should have erased it. With the LED it’s 2v or 3v instead of 5v.
well explained!
Sir what is the mystery device
Thé mystery device IS a ne555 in astable mode with a 10K resistor on the output pin. Ses others Ben vidéos. Cheers
when i try this, the transistor gets incredibly hot, and seems like electricity is flowing between the base and emitter, shorting the circuit
Using 2n2222a
thanks 🎉🎉🎉🎉🎉🎉
Ee best jana marre
Hope you cover CMOS (two transistors instead of a transistor and a resistor) inverters in the future. I looked at some explanations and diagrams but it was all gibberish.
Why do we use "ground". Why not just lay out the whole closed circuit? It would be much clearer
Ground is just the reference potential level for all other voltages & signals
saturation doesnt mean collector is shorted to ground...
Wow, so this is the etymology of the NOT gate in diagrams being a triangle with a little circle at the tip, and the AND gate being shaped like a D. Now I wonder where the more fish-shaped OR comes from
Take one parasitic relay, and add one China PIC chip with backwards logic.
Stir in optical coupler i wanted to use.
Is this a pnp or npn
I got to say that it doesn't matter much , it ought to be universal with bipolar junctions , inverting a signal
NPN
This was easy to understand in the first couple of videos... Then it got complicated... I stopped understanding after the transistor video.
I still don't understand the voltage thing in the middle between the resistor and the transistor.
Edit: Nvm. Needed the visual to to understand it. Good vid!
But this will damage the power source if there’s no resistance!
Doesn't this waste huge amounts of power ?
exactly what I was thinking. It's like trying to kill a fly with a shotgun...
Why is this a big waste of power?
Because the current that normally drives the LED, will flow through the transistor when the LED is off, dissipating power over the resistor. So this circuit consumes power both when the LED is on and when it is off.
This is obviously a proof of concept circuit, driving a relatively low-impedance LED. Real digital signals don't drive much current because they are fed to high impedance inputs, which would allow to use a high valued resistor in here, minimizing current. If you need to use that signal to drive something more powerful, you would have a separate driver circuit.
Due to the resistor being 220 ohm and a power of more or less 5 volt the current is somewhere around 23 milliampere when the transistor is on (when the transistor is off there is a drop of ruffly 2 volt over the Light Emiting Diode, the remaining 3 volt over the resistor will cause a current of about 14 milliampere). Altough the current in off state is more than in on state and these are relatively large with respect to logic circuits it is not so verry much seen from the perspective of a power source. Do keep in mind that the treated circuit is merely a demonstration of how to invert a signal, in a more practical application there will probably be no LED driven but only one ore more logic inputs, the value of the resistor used will be between 1kilo ohm and 100 kilo ohm depending on howmany inputs are connected. The current will be between 5 milliampere and 50 microampere !
I am going to use a transistor! Because thats all I have at the moment :)
Is a lower or higher resistor better in this application?
NOT gate
what if we use a single transistor instead of two. Is it still working or not ???
This is what we call a NOT gate
this is a NOT gate
The idea is nice, but this circuit wastes a lot of power.
Untrue