Electronic Basics #22: Transistor (BJT) as a Switch
Вставка
- Опубліковано 11 вер 2024
- Previous video: • Make your own 10x10 LE...
OpAmp video: • Electronic Basics #21:...
Facebook: / greatscottlab
Twitter: / greatscottlab
Support me for more videos: www.patreon.co...
In this episode of Electronic Basics I will show you how to use NPN and PNP Bipolar Junction Transistors as switches in order to turn on and off your electronic load with a control signal. This way you can, for example, use your Arduino to control loads that require more current than the output of the Arduino can handle.
Music:
Killing Time, Kevin MacLeod (incompetech.com)
As someone who understands transistors I think you went too fast in this video. I didn’t have much time to digest the frames once they were only up for a few seconds at best
To fast for someone who doesnt know nothing. But good if you are already familiar with stuff,
Ya was going to say. guy was flying, kept having to hit rewind and pause a bunch.
Same feeling here...
But I still watch it in 2x speed for time-saving purpose. Although I agree that it is quite fast for some tutorial video.
Someone who doenst know nothing, knows everything right?
Same here way too fast to allow me time to understand the info
Although I don't understand any of it, I find it fascinating to watch and try to learn "just a little" each time. Not enough to do any damage but enough to get an idea.
Thank You Sir for your vids!
You're welcome
I used to try base resistors until I found one that switched the transistor on without blowing it up. Now it all makes sense and I tried to calculate it using the formulas with a S9013. Worked perfect at the first try. It's the closest thing to magic ! :D
I think you make the best , comprehensive , clear and useful tutorials on UA-cam , keep it up!!! Best regards from Zaragoza, Spain
I really like you channel but in this video, it's like you're trying to show you've worked well on your lesson. I didn't understand anything at all.
Then you firstly need to learn the more basic things.
Same. I learned the basics, but there are a lot of things left unexplained. It's not a tutorial for beginners.
You go too fast through your videos. No time to consider what you did or why it works. I’ve stopped watching your videos to learn and now just watch to review.
@@RobertLopez66 Yeah, this is for someone who already knows this and just wants to brush up, or something. You cannot learn from this video. No way.
@@pumbo_nv yes brother
My head released some magic smoke at this video, too.
It's pretty fast.
(Well, I'm going to watch your basic videos anyway ;))
i little bit veeeery fast-forward... unfortunately. Less rush would be better for my taste.. but that's how it goes on 'GreatScott' :) EDIT: too fast for me.
you can rewatch and pause it as much as you want
@@alfineranai6952 It doesn't help. He basically didn't explain anything, just rushes over the calculations like they are easy. I have a degree in EE and I barely understood what he was doing
I mean it was an overview, it's definitely not for anyone just beginning in the electrical world but it was nice for me, a beginning electrician that's looking up how to use it to practically amplify something for a home project but don't need to hear how one half is "doped" with electricrons. Moves to the other side when power is applied exc. Definitely could have left a link at the beginning for people just starting out as I would have been way lost but it's probably 3-4 steps down the road :)
I wish I could add your vids to my electronics playlist for quick reference. Yours are so full of useful knowledge.
I loved this video, although I was lost after about 20 seconds. I will watch it back with extensive use of the pause button. Otherwise my brain easily reaches a temperature of 70 degrees celsius.
Hahahhahha
Great video.
I think IB current you calculated is the minimal to switch the transistor on. However, it is in linear stage instead of saturation stage. To ensure IB that drives the transistor in saturation stage, multiply the IB calculation result in 5 or 10. By doing so you will make sure that the transistor is going to work in saturation stage taking the most possible current between collector and emitter and the least voltage across collector and emitter.
It was in the saturation stage. Of course you can use a slightly bigger current to make sure that you reach saturation but simply multiplying with 5 or 10 it not the best idea. My transistor would not have enjoyed a base current of 2A instead of 400mA.
For IB of 450mA and a worst beta of 25, the IC would be 11.25A which I have never seen BJT rated for such current..!!!
It seems I am stupid, but that is what I know. I am not professional to make argument here though.
@@greatscottlab The point is that manufacturers specify a base current of one-tenth of the collector current when quoting the maximum Vce(sat) for their devices. If you drive the base with less than that, you have no way of being certain that the voltage across the transistor is below a specified value. If you're passing significant current through the transistor, you can't calculate the maximum power dissipated and therefore have to use guesswork about heatsinking, etc. If the load current is 4A, you design for a base current of 400mA, or you use a power MOSFET instead, but that's a different story.
@@majdinj When the transistor is in saturation, the collector current is determined by the load, not by β times the base current. The concept of β is really only applicable to a transistor operating in its linear mode, i.e. as an amplifier, not as a switch.
great video 👍
respect from Gilgit Baltistan❤😊
id really love to see a more in depth description of how you calculated the base resistor. You kinda just said find beta then calculate. Sure you show the formula's but a walk through from start to finish and where to find the values in the datasheets would be really nice.
Look at the video at 2:03 and check the datasheet for the conditions that are used for measuring the collector-emitter saturation voltage. Those are Ic=500mA and Ib=50mA. You can ignore the "DC current gain" section because that is only specified for Vce of 2V or greater, i.e, linear mode. When the transistor is operating as a switch, the crucial design consideration is normally to ensure that Vce is as small as possible when the transistor is switched on. This is called "saturation mode" and Vce(sat) for the BC637 family is 0.5V at Ic=500mA and Ib=50mA. So you want to set the base current around one-tenth of the maximum expected collected current. That will ensure that the transistor stays in saturation when switched on, otherwise if the collector voltage were to rise, it would run the risk of exceeding the maximum transistor dissipation of 625mW (Ic x Vce).
In the video, he should have used Ib = Ic/10 for a switching application. Ic is given as 310mA, so Ib = 31mA. Then Rb = (Vcc - Vbe)/Ib = (3.1 - 1.0)V / 0.031A = 68 Ω, although this doesn't have to be exact. The dissipation in the base resistor would be less than 100mW (less than 3.1V x 31mA), so any 125mW or higher dissipation resistor would be fine.
What you mean " Ic is given as 310mA"?
Is max current on LED or max current in transistor collector?
When he test LED with source generator i didnt see any value of 310 mA.
He had max 253 mA in LED.
@@anaromana8183 @RexxSchneider I'm also confused about the source of 310mA for the Ic...
Best beginner transistor video that I've found so far. Well explained!
I think this video has all of the information I need in it, but it should be about 15 minutes long. Anyway, I will re-view it a couple of times, and am sure I will absorb it.
THANKS FOR ALL YOUR GREAT VIDEOS!!!
Great Video!!
dont know if anyone gives a damn but if you are stoned like me during the covid times then you can stream all the new movies on instaflixxer. I've been binge watching with my brother for the last months :)
@Eric Ty definitely, have been using InstaFlixxer for since november myself =)
Excellent speed run on the subject
These channels are best ! Low volume background music or non at all. More explanation which is what viewers value
congratulations you move from advanced electronics to the very basics, very good keep doing
I think you are making this video only for yourself so that if you forget any stuff later on, you can refer your own video to recall that. Great work. Keep it up
1 question ... how did you get the first Ic ( 310mA) and the second Ic (3.8 A) ???
I'm wondering the same. Probably it's within the specs for the LED but it would be nice to get an answer ^^
Yeah it's probably the LED and the Light bulb's operating current.
This actually helped a lot, spooky it appeared in my suggested, but I was actually wondering if I needed NPN or PNP for my project. Thanks.
please make electronic basics :relays :) thanks
No, noooo:( You just let the magic smoke escape. It is the soul of any IC.
You are greatest scott on the world thank you i love your videos, from middle east
Graet video - Thanks.
Please make video detailed explanation how to make transistor calculation( how to choose resistor, Ic & load)
Can I use it with a 555 timer pwm circuit for controlling a washing machine motor your my best UA-camr I've learned a lot from you
Love to see great scott explain how to cook
I find teh bc547 really good for low current, its really good as an amplifier aswell, as its beta goes from 110 to 800, also it has a higher base emmiter voltage
Hi. I discovered your channel about 3 months ago and it got me into electronics as a hobby. Every week I watch your new videos and I finally decided that I must do a small project of my own at home. I'm a macanical engineering student and my knowledge in the electrical field is a bit rusty so i would love for some ideas and hints with a basic project. I have a small 8.9v solar cell with max output current of 340mA. I would like to use it to charge my phone or to power other USB devises or small speakers and a Bluetooth dongle together. I have a little buck converter to get the voltage down but I think that it also brings down the current. This then takes a long time to charge the phone, even in the South-African sun. It is the lm2596 converter board. I was wondering if there is a way to decrease the voltage and increase the current to about 1A or so at the same time. I live in South-Africa so finding parts is a hassle and delivery takes ages. Thanks and I will see you next time. haha
@GreatScott
This was another excellent video as usual. I greatly enjoyed it.
I do have one possible error. I had a discussion in an electronics group on this calculation method. Someone who has experience with component design pointed out that the hFE value you used as worst case (a Beta of 25) was not the best to use for the saturated state. The Figure 4 graph of the datasheet shows a Beta of 10 being more conservative and a V_BE(sat) of about 0.8 V when 310 mA of I_C is drawn. Plugging those numbers into your calculation method will result in a base resistance of 110 Ohms or 100 Ohms. This will prolong the life of the circuit according to the person I discussed this with.
You're right about the error. Normal circuit design for switching transistors is to set the base current at one-tenth of the maximum expected collector current. Note that the datasheet for the BC637 family specifies the maximum Vce(sat) at Ic=500mA and Ib=50mA. I would certainly design for Ib = 31mA when Ic=310mA in this application.
The only quibble I have with your calculation is that Figure 4 shows _typical_ Vbe(sat), rather than maximum, which would be worst case. The only other place that Vbe(on) is given is in the "On characteristics" section, where a maximum value of 1.0V is given. Plugging that in implies Rb = (3.1 - 1.0)V / 0.031A = 68 Ω. In most cases, the circuit will work with higher values for Rb, but if you have to design for worst case - as you would in production, for example - then 68 Ω would be the value to use in order to guarantee saturation in any worst case scenario.
Spot on. Love your videos. Would be great if you could do more on this stuff. 👌🏻
I enjoy how for the rest of the video the transistor slot on the breadboard was slightly browned the destroying the first one..
If you go read a little about transistors at first and then watch this video,it makes a whole lot of sense.
Glückwunsch zu den 300.000 Abonnenten Scott!
er spricht englisch
nix deutsch
@@ademshabani626 er is deutscher du vogel hörst du sogar an seinem Terminator akzent
i know this video its old but it saved a very important proyect so THANK YOU !!!!!!!!!!!
Next video MOSFETs :D
Soon ;-)
+GreatScott! what is actually the difference between a mosfet and a transistor??
+GreatScott! I used TIP120s for controlling RGB led strips until I realised how inefficient they are. I use IRLZ44N mosfets now.
One amplifies Current and the other amplifies Voltage
+GreatScott! yeah!!
The crucial thing that I learned from your videos is that smoke is the main ingredient in every electronic component because when smoke goes out, the component doesn't work anymore...
Mihajlo Medjedovic Wah beta wah
you need a collector-resistans too. In other case you can destroy both transistor and led. The collector-resistans determine what current you want through the diode.
Yes, LEDs really should be driven at constant current where possible. That's because as they heat up, their junction voltage tends to drop and the current increases exponentially, possibly causing thermal runaway. It would be far safer to use a supply voltage of around 5v, allowing 3.1V for the LED, 2.4V for a series resistor, and 0.5V for the BC637, all passing 310mA. That would imply a series resistor of 7.5 Ω which would have to dissipate 750mW, so a 1W rated resistor is needed (or two 15 Ω half-watt resistors in parallel).
you are the best teacher
always enjoy watching your calculations :)
I love the humor in your video "Magic Smoke"... LOL I think next April fools you should make a " Magic Smoke stuffer" project to put the smoke back in components... :)
this video its very help full for every one, need more video in the high power mosfet ,or thyristor switching thank you very much
Excellent instructions, this has been a huge help to me, many thanks.
Excellent video. Very well explained. Thank you for the design details.
good stuff...heard you on the amp hour podcast...so true about the arduino...you can't learn anything from copying circuits and code.
in your example with that bulb, if we use the bulb directly on the arduino, the arduino will get damaged, thats why we use transistor with suitable amperage, to turn on/off the light as well as to protect the arduino
Very good video
You can play videos at slower than real-time under settings.
I find this helps comprehension of heavy material. Also, making my own notes with paper and pen help some of the information stick.
Thank you! Your videos are helping me soo much! Finally I could understand and remember classes that I had a few time ago. Transistors are really powerful!
I love your channel. I have learned a lot as a hobbiest. Thank you.
why did u choose worst case collector current as 310mA?
I really love this channel...
You tells everything that I wanted to know..
Ib=ic/B. Today i came to know how to calculate base registor value.
Thank you very much
I have seen this video at least 10 times, awesome, it would be interesting to see a video about common collector, emitter and base configurations
Useful information! I was using a C547B to drive some 5v LED switch lights, but the random resistor i put on the base became painful hot. I measured it with my multimeter and it seemed to draw 120mA through the base. Then i put a 200 ohm one in front of it and the current reduced to 15mA while the LED shined equally bright so no loss. 15mA still too high but it made the point clear that that resistor is the issue. Now got to try to calculate the right one. Glad that i didn't hook it up to my Arduino straight away, it would have burned the IO pin right away.
When using a transistor as a switch, the rule-of-thumb is to make the base current one-tenth of the collector current when turned on. That will ensure that almost any transistor is in saturation. Any further increase in the base current will not increase the collector current, so there is no point in using more base current than that.
Use a multimeter to measure the current taken by your 5V LED when 5V is applied to it. Let's say it's 30mA. So you need 3mA base current. If you're driving the base from a 5V microcontroller via a resistor, then that resistor has to be around 5V/3mA ≈ 1.7K. You can use a 1.5K or 2.2K base resistor. It's not critical. If you're using a 3.3V microcontroller, you'll need around 1K to 1.2K for your resistor. Hopefully you can see how to work out the resistor you need now.
@@RexxSchneider I see transistor datasheets that show DC Current Gain of 100-300, and down to ~30 depending on Ic. There is a big difference in 10x versus 100x. I'm confused about what gain to use in my calculations. 🤔
(EDIT: I understand now 😏)
@@abandonedcranium6592 There's an important difference between a transistor operating in its linear region with a current gain of 100-300 and the same transistor operating in saturation where you want to make sure that Vce is as small as possible. To achieve that, it is necessary to overdrive the base current giving an effective current gain much less than what is shown for linear operation.
Take an example of the 2N222A, a very common switching transistor. The DC current gain at Ic=150mA and Vce=10V (i.e. linear operation) is specified as 100-300. However, the specification for Vce(sat) - the voltage between collector and emitter in saturation, i.e. as a switch - is given as 0.3V max at Ic=150 mA and Ib=15mA. That is an effective current gain of 10 and is the most common ratio of Ic/Ib in datasheets when examining Vce(sat).
That's why I give the rule-of-thumb of setting the base current at one-tenth of the required collector current in switching applications. The collector current will be limited by the collector load, not by the base current and current gain.
You may find some very high gain transistors, e.g. BC547 family where the maximum Vce(sat) is specified in the datasheet with the base current at one-twentieth of the collector current. But note that the Vce(sat) is 0.6V max for the BC547 family at Ic=100mA, Ib=5mA, which is twice the Vce(sat) of the 2N2222A at similar collector currents, even if the BC547 would be using half the base current.
yo man i love your vids you do a great job and i am able to understand and recreate your instructions keep kicking butt
I have tried to learn what exactly a Transistor is and does so many times, and even after watching this video, it's like the knowledge just runs off my brain like water off a duck. I understand other concepts and components, but Transistors? Nope. They're a literal black box.
I would recommend the BD237 for low loads. It is way better than BC637 and also has a PNP brother, the BD238. They are rated 2A 80V
For higher current, where you used the BD535, better use the MJE3055, which its PNP brother is MJE2955. They are rated 10A 60V
For low loads (less than 500mA), the BC637 is better than the BD237 in its electrical characteristics, and is less than half the price.
Of course, once you start to dissipate some power in the transistor, the BD237 has much superior _thermal_ performance (thermal resistance junction to case of 5°C/W for the BD237 vs 83.3°/W for the BC637), and that's what you're paying for in terms of the package.
@@RexxSchneider Yeah, but I tend to use transistors that are more massive so i can dissipate heat better
You're calculating the base current wrong. You used the values for β given on the datasheets for when the transistor is operating in its active region with a Vce of 2V or more. If you look carefully at the datasheet, you'll see that the value for Vce(sat) is almost always given for collector:base current ratio of 10. In other words, the manufacturers guarantee the BC637's Vce(sat) of 0.5V max for a collector current of 500mA and a base current of 50mA. You can't just use the β of 25 that is quoted under different operating conditions. The same goes for the BD535; you can't just look at where the datasheet says β=15 and assume it will be valid when in saturation. It isn't and it won't saturate. If you look at Vce(sat) for the BD535, you'll find it is specified as if the β were 10. [Edited for typo]
Sooo... I thought that BJTs were SUPPOSED to release the magic smoke. Is that not why they were designed? :O
Shoutout for the moroccan darlington transistor at 5:11 :)
Great video! Fast but good. At 2:40, where is the 310mA coming from?
It's the typical forward current for that 1-W LED at its rated forward voltage of 3.1V (310mA x 3.1V = 961mW).
very nice video! Great examples, but the calculations are shown too short, we had to stop the video in order to validate your calculations ;) Great job!
very useful knowledge very nice video
Best vid about Transistors better than my job traniner(Ausbilder ;) my english is very bad). Keep up the good work :D
Edit: A vid about Fets would be cool.
"Thank You", thank you very much 😎
Awesome video! keep them coming!
Fascinating.
I wonder if you can build by your self the ELV DPS 5315 that you use to make the tests on the circuits.
Great Scott eats transistors for breakfast!
"Try out our new 'Electronics' silicon flakes! With bits of Germanium in every bite!"
Not bad but I would avoid using PNP transistors whenever possible. Also a demo showing how you can connect multiple transistors together to use as a darlington configuration would of been awesome for the n00bs.
Without releasing the magic smoke... you funny
Thanks for another great video.
Unique. I love you. Thanks
Thanks :) Are you planning to make such a video on MOSFET ?
Can you please make a vid that tell us ho to switch a transistor on and off automaticly and in the high speed?
Thank you
Could you explain why you use 3.8A as Ic in last example ?
i personally favor BJT over MOSFET for lower current switching (like even up to 10A) as most of them has a logic base voltage aka 5V which makes it a perfect bridge between electronic signal (e.g. MCU) to electrical peripherals like solenoid or motor.
and yes the annoying thing is always the heat dissipation.
Ich liebe deine Videos, du hast ein Abo verdient :)
Thank you very much..
now I have knowledge of inseting a cheaper-low powered alternative on inverting a signal from my HW-201 colision detector to a water dispenser... 🖖🖖🖖🖖🖖
The transistor like TIP31 or TIP32 is BJT or FET (field effect transistor) or MOSFET
How they are compared to MOSFETs as switches what are the advantages or disadvantages ?
nice explanation! thanks for your time and effort!
nice video editing.
Hey Scott, I'm really interested in what you do, I'm in my first year for electrical engineering power technician program, and I'm learning about components similar to what you are talking about, however me and my friends have trouble understanding are professor. When I came across your channel, it seems that you have a really good understanding of electronics, I was wondering how did you learn all of it really well? I'm find these things very interesting and I want to learn it too! I wanted to ask you how can I learn all these things? The understanding behind each component, what its used for, and how to do calculations for it and so on. I hope you reply, thanks :)
I gained my knowledge mostly from job training and university. But there is also plenty of information on the internet.
are there any textbooks or websites that you recommend?
Gurjot Saini
I do like the book "the arts of electronics"
thanks for the recommendation scott! Love your videos by the way! I hope that one day I can also understand these things really well to a point I get to have fun with them just like you haha
@Saini
learn as hard as you can because i think true engineer are needed in our country.
Keep learning and Practicing..:D
Love from Rajasthan
Great Video! THANK YOU!!
where did the Ic = 310mA come from???? pls tellll
I love your channel. I need clarity on one calculation though. The calculation for IBase = ICollector * Betta. In the sheet it says that IC = 500mA. That's a maximum value? In your calculation you put 310mA. Please help me understand than you 👩🏫
I would love a basics video explaining how to use MOSFET with particular focus on driving them.
Soon
thanks for this video
it helps to improov my electronics knowledge
tx.
at 3:13 what is his motive for connecting the load to ground instead of the supply? What benefits would that bring?
How did you know that Ic = 310mA?
was really good with lot of stuffs, but too fast for me.. I need to stop and rewind to understand the concepts.. but that was ok, many thanks again.. I used low speed option from youtube settings
I don't get the bit about saturation - there's a discovery that the current isn't as expected, so instead you do the same calculation with the Arduino 5V supply?
scott you Great
Thanks for the great video.
0:50 Oh my god ! You monster ! You killed him !!! :(
1:38, what does it mean connected emitter to the ground? so the electricity flow through the emitter is not used?
Okay, so the transistors can work as a logic gates, on and off. But what in the first place makes transistor go of and on in the circuit or computer? The base requires voltage to switch transistor on. Where the voltage comes from and how it can be controlled logically? By another transistor? Diode? So what then controls diode?
Thank you! I write down your videos in my notepad
Dmitry Ilyin Wow! Great achievement
not so great like your comment
Dmitry Ilyin :D
I was kidding
me too ;)