I describe how to design a simple transistor circuit that will allow microcontrollers or other small signal sources to control low-power actuators such as solenoid valves, motors, etc.
I'm pretty sure this is the best introduction to how to practically use transistors and explanation of their essentials of how they work I've ever seen.
When the transistor turns off, current flowing through the coil will cause a voltage rise on the collector. If the voltage rise is high enough to turn on the diode, current will flow through the diode and limit the voltage at the collector. The problem is that the diode cannot turn on instantly. It takes time for the diode to start flowing current. The capacitor smooths out the rising voltage, and gives time for the diode to start conducting.
Applied Science that part was curious, I was wondering why the diode feeds it back, wikipedia said it feeds the back emf back into the solenoid to lessen the change in current it experiences when turned off, love it.
With the capacitor it make sence. But in all my life I never saw that capacitor to ground in Relay circuit. i red the use fast diode or low threshold voltage diode (Shotky?)
Your 5 volt input may have been solid between ground and +5v. I always put a 47K from base to emitter to deal with any leakage currents if the input is inadvertently left open, either by design, or by a failure mode.
I've been trying to wrap my head around transistors this whole semester of solid state electronics and motor speed controllers. You are a great teacher, I understand why I let the smoke out now.
As everyone said before, great teaching. Very useful as I was trying to fix something and understand better the work of a transistor and the reason of difference between PNP our NPN.
When I went to school “back in the day”, I learnt that the voltage drop over a diode is 0.7 V for silicone. In fact, the diode (and be-junction) begins conducting already at 0.5 V. To quote Duhamel (another excellent RU-vidr) states that there are three kinds of people: the ones that talks about 0.7 voltage drop, which is most common, the ones that talks about 0.6 voltage drop, which is a bit fewer, and lastly the ones that talks about 0.5 voltage drop, which is the rarest kind of all. Everyone would be correct.
Excellent video. I really like how you stepped through the design and implementation. I would love to see more videos like this with different circuit designs.
Got about 35% of this, which is 35% more than where I started. Ill'repeatedly watch this video until I understand 75% abnd we'll take it from there- and naturally any more yideos you produce. Thx. 1x^6
Goddamn it. About a year ago when I was searching for how to use a transistor for switching, all I found was how the transistor is made and how those junctions work. I had to read the documentation of a transistor and google the specs. Every video I watched, nobody even mentioned the beta of a transistor and sadly your video was not even in list when I searched.
See, this is the practical side I always wished we'd started at school/university. Getting people hooked to this topic. How many talented people switched their studies because the theoretic part was too strong and depressing. For the first whole three years we'd only hook up circuits on breadboards and measure with amp/voltmeters and osciloscopes without any practical use.
Thanks so much for a clear, concise, informative video on designing a switching circuit! This is very helpful, and it was well done sir! Keep them coming! You have a new subscriber!
It's a bit like asking, "should I buy a Lexus or a Hyundai?" Either one will work, but you need to design the circuit properly, and depending on your usage and voltage/current supply, one may be a better choice than the other. Putting LEDs in series and using a resistor to limit current is pretty cheap and effective.
You have such a gift at making things understandable that it is incredible! Great topics for technician and EE. I never had a great grip on transistor engineering. I would like to share my videos with you. On youTube, just type in Frank Reiser M.S., and select the videos that you would like to watch. They are mostly mineral prospecting and geology, but also all of science because,, per my request, I ask people to submit me their questions on science topics and I make videos answering them. I can do this because I have had tons of lectures on all of science.
Well i was hoping that you'd mention something about saturation mode, because i think the VCE would be more predictable at saturation, but that would make the gain ratio to no longer be applied since IC is limited.
Protection diode connected in parallel with relay or solenoid will protect the transistor but shorten the lifetime of the relay. You can make an experiment on that comparing a typical driving circuit with a circuit where diode was replaced by diode + 30..50V Zener diode. When the switch transistor stops conducting, the BEMF arrives with the opposite sign. But due to the diode, the current keeps flowing causing the relay to open smoothy. This is not good for high current relay because the arch is not broken immediately but lasts until the relay gets fully open. Zener enables the dissipation of much higher power with the same BEMF current, causing the current to drop rapidly. Even though this circuit is used so often even in industrial applications, it has limitations. Instead of the diode, you can also use bidir TVS which is essentially a dual Zener-like structure.
@Hearing.Chanting Remembering.Krsna can you point me to the professional literature you are mentioning? The Zener diode is not expensive non-linear resistance. It's a very cheap component, at least in the EU. It is a standard way of prolonging relay lifetime used by several manufacturers of industrial equipment. It looks you did not fully understand what I wrote. It's about prolonging the lifetime of the _properly_ selected relay. I did not invent it, I remember it from an electronic circuit course during my studies. Can you please discuss using merit arguments only?
With the development of inexpensive switching on micro controllers, do you think the day of multiple big conventional relays as seen on cars will gradually fade away?
Great job explaining how it all works Ben. What type/size diode do u recommend for the clamping diode to dissipate the collapsing magnetic field voltage which you said across the coil could be several hundred volts. Wouldn't the diode need to be several hundred volt capacity so it itself doesn't fry?
No, the diode is connected reverse-biased across the solenoid, so it only needs a reverse voltage rating of 12V minimum. When the magnetic field collapses, the diode will go into forward conduction and clamp the transistor's collector to no more than around a volt _above_ the positive rail, which is how it protects it. A 1N4001 (50V, 1A diode) is a common choice.
The beta can vary widely both piece to piece and with temperature. If I want to have a better control over the solenoid current, should I consider adding an emitter resistor, acting as a negative feedback?
can you suggest led indicator when transitor is ON for say main current to be 300mA to 2A ? I assume it will be in series to transistor and can be placed before the load.
2019 guy at a federal universaty here in brazil will use a arduino for that hard task and publish a "tese" for his "doctor" in "eletricar engenir".. :)
Typical Ic max for little transistors is about 600mA which is when transistor burns. What is maximum colector current I can safely and reliably drive through say N2222A transistor in switching application and how to calculate that? Datasheet specifies only junction temperatures, I can calculate Ic for 40C, 50C temperature operation but what is best transistor temperature?
I've never watched a video that was as informative and clear. Your explanations are complete without getting overly complicated. Thank you so much for making these.
"Power used to 'warm-up' the transistor" ?? The .7V loss through the Base/Emitter calculation, is a bit more complex than, but 'like' the typical .6V loss through a forward-biased diode. At such 'PN' junctions, the 'P'-type having a deficiency of Electrons, and so having 'Free-Holes'. The 'N'-type has an excess of Electrons ! (I'm keeping it simple here...). Now where they are physically touching, (and no voltage applied), for so many atoms thick in the lattice some of the excess flows into the deficiency, creating an Insulating barrier at the physical junction ! As a result, even when 'Forward-Biased' from a voltage source, a Diode needs at least about .6V just to break down this barrier, before it starts to conduct, so you will always loose this! A similar effect(s) are going on inside most typical Transistors. (Hence his '.7V' loss in his calcs). (1) For a Diode, this voltage loss is NOT dependent on the LOAD after the Diode! So for example, you could connect 5 diodes in series, for a precise 3V drop, or 10 in series for a 6V drop, irrespective of the load !! (2) This 'Insulating' barrier at the PN junction, can be considered the 'Dielectric' of a capacitor, so our Diode is ALSO a Capacitor, with the 'plates' being the P/N materials area themselves. NOW it get's interesting though!! as the higher the 'REVERSE-Bias' voltage across the Diode, this FORCES an even LARGER non-conducting 'neutralized' gap/barrier. 2 main things control capacitance.... The area of the 'plates', and the 'space' (dielectric) between them. So what do we have now??? A solid-state Voltage-Dependant Variable-Capacitor !!! Yep... and it is utilized a lot these days..... although now 'Special' Diodes are made to take advantage of this effect, called 'VariCap-Diodes'. Sorry about all that... :-) I just get 'excited' playing with software like 'Circuit Wizard', that allows you to design on screen virtually any electronic circuit including virtually all elect/electronic components & IC's, see it all run in REAL time, monitor ALL voltages & currents from ANYWHERE in the circuit simply by mouse movements. Not to mention auto creation of your PCB & all artwork when you are ready, with auto track routing. ALL before you touch your soldering (not the American 'soddering' :-) ) Iron. Have fun !!!
There are several components to learning electronics. One place I found that succeeds in merging these is the Gregs Electro Blog (check it out on google) without a doubt the no.1 course that I've heard of. Check out this amazing site.
I wasted weeks learning all you say in here, which I could have learned in ~20 minutes. Great video. Please add more tags to it, so you rate higher in search results.
This video should be shown to everybody starting electronics... No talk of doping and PN junctions, show them this first so that they get a picture of what they are doing.. Too many electronics courses start at the microscopic level.
@@EdwinFairchild But the introduction at microscopic level kinda kills the interest in my opinion. I like to develop interest in something before getting started.
@@curiosity551 thats what i mean, if interest is the issue which implies a hobbyist, then ignoring the physics part of it is just fine. For an engineering perspective you dont have the luxury of interest, you NEED to know the intricacies whether they interest you or not.
I've been thinking that for years. I wanted to understand and know how to do many things while in my youth but had no available quick easy answers like now. This guy basically covered a 50 page chapter in 20 min without going to the library first. This information would have taken most of a day to learn, if I found the right book. Having someone explain and show examples is so much better than reading about it. Kids these days have no idea how much easier it is to acquire information today compared to 25+ years ago.
C'mon now! Radio Shack had a "101 Electronic Circuits You Can Build " book you could buy...Healthkit offered radio controlling stuff (RC airplanes) and amplifiers...remember the ol' crystal radio? - I built one using thin lacquer coated copper wire, a simple crystal, a empty toilet paper cardboard tube, cheap low power earplug type headphones and a long piece of wire for antenna...it actually worked too..1965! (Crystal radio plans probably somewhere found on YT.) Aah yes..the good ol' days! Truth be - it's much better these days....so all you kids out there...you're spoiled rotten! Ha ha ha! 😉
@2:54 Your description of the circuit symbols for NPN vs PNP BJTs is so ridiculously simple and intuitive @7:00 So THAT'S what hFE is used for with BJTs! This whole video is so informative it's helped me to make tons of sense of how BJTs work. You, sir, are a genius.
Good Tutorial. Thank you for that. Just another thing: You have to consider the power dissipation of the transistor itself, due to the voltage drops across it. taking the numbers (0.2Volts and 56mA), you can say that the transistor dissipates like 11mW of power, which is quite low for that circuit, but if you have a larger current and also a larger voltage drops on the transistor, you could damage your transistor if you don't attach it to a proper heatsink.
Clear and well-presented. Amazingly, this circuit was pretty much the same as when I started studying electronics back in 1975, including the 2222 transistor! So for you younger students, the techniques outlined in this video will practically never become obsolete. We tend to think that the world is run on low-voltage, low-current technology (e.g. microprocessors, microcontrollers). But at some point real work requires higher voltages and/or higher currents, so studying transistor control circuits, like the one presented here, is very valuable knowledge.
Thank you, thank you, thank you, for mentioning the 0.7 volt drop across the base-emitter junction, when calculating the base resistor. I see many people forgetting to subtract that 0.7 volts. When using 5 volts to drive the base, forgetting that 0.7 volt drop across the base-emitter junction will create a 14% error, when calculating the base resistor. That’s more than enough to prevent the transistor from switching properly. Also, for the beginners, when he talks about the “clamping diode”, it’s worth mentioning that it goes by many different names. You’ll hear terms such as, “kickback diode”, “buck diode”, “flyback diode”, etc. They are just different names, for the same diode. Use a good diode, as well. One of the most popular silicon diodes, which I recommend, is the 1N4007. Actually, the MOST common one is the 1N4001, but it’s rated for much lower voltage. The difference in price, between the 1N4001 and 1N4007 is so negligible, that it’s worth just buying 1N4007’s. That way, you’ll be covered for any voltage that you’re likely to come across. It also provides an extra safety margin. In a “clamping” application, a failed diode will typically fail ‘shorted’, which will burn up your switching transistor, as well. It’s definitely worth spending an extra penny, for the better diode.
1N4007 has higher forward voltage than 1N4001. 1N4007 waste more energy to operate... Same thing happens to higher voltage transister. So not a good idea to choose higher rating voltage than it needs to be. PS.....Also I have heard word "free wheel diode"
@@Asyss_Complex The Fairchild (On Semi) 2014 datasheet for the 1N4001-1N4007 series specifies the same forward voltage of 1.1V at 1.0A for the entire range. In addition, the energy dissipated in the diode is not a consideration in these sort of applications unless you're trying to switch the solenoid at kilohertz frequencies (!), so it doesn't really matter which diode you use.
I would always use a MOSFET for power control, and not a BJT. Unless I needed to control the amount of current through the device. BJTs drop voltage and waste power.
Absolutely. Although MOSFETs have to be driven hard(er) for higher voltages - and even in this case, they would require a pull down resistor at least (5V is high enough gate voltage for most cases to driver 12V). It's harder to explain.
A BJT is a perfectly reasonable choice for currents up to 100mA as the voltage drop and power wasted is then negligible. Above that, a logic-level power mosfet is a good choice, and essential if you have a 3.3V microcontroller. Remember that the mosfet will normally cost three times the price of a small-signal BJT.
For 30 years I've seen explanations of how to use a transistor and never "gotten" it. Bravo this is spectacular. The best explanation of a bipolar transistor I have ever seen in any medium.
Wow, great job on the video. I'm not too good with electronics, having learned strictly with MCU's early on and using digital PWM instead of actual power management. You have nearly tripled my knowledge on transistors and how they can be used, and for that, I thank you.
Thank you so much. I've spent ages trying to learn this basic theory and you have explained it wonderfully. I now feel I can grab some components and use them to switch real world items from an arduino. Fantastic video!!!
Thanks. Your experience shows and this makes me feel confident about your lecture. As my brother says: in theory practice and theory is the same but in practice it's not.
Thanks for the great tutorial. I wish you would have given details about how to choose the appropriate clamping diode. Also a bit about the rol o the capacitor, and how to choose it. Also, it was unclear to me why NPN instead of PNP. I did not understand the justification.
You are a life saver. Thank you for that explanation, it solved some questions that I had in my mind. It's nice to know why I am doing certain things instead of blindly following equations. Thanks.
So what do you guys think about biopolar transistor are they getting too old since the mosfet ones got more efficient and popular or is it just me? for all my applications I use FETs and can hardly think about using biopolar yeah FETs are a little more expensive but still the low 'ON' resistance (Efficiency) is well worth it.
"A little more expensive" can add up to a lot more expensive if one is building hundreds of thousands or even millions of widgets, with each widget possibly having many transistors. I would guess most companies simply go with the least expensive option that meets the requirements.
Yeah but the very high efficiency translates in to a more quality product when it comes to power consumption and simplicity anyway mosfets get cheaper and cheaper over time.
True. It would then depend on what the requirements were, and if reaching higher efficiency is more important than reducing costs. In some cases it would be worth it, in other cases, not so much. But either way, you've made me think about it and I will do some more learning about BJTs and MOSFETs so I actually have a clue what I'm talking about lol.
Michael bjt transistors aren't inferior because they're older they happened to be discovered 1st. Fets are a cousin to tubes which came before that. Tubes still have their place. darpa is still pouring money into tubes. a plain old 3904 bipolar isn't going on the scrap heap any time soon.