#BB1

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 201

  • @A2an
    @A2an 4 года назад +7

    I think you should have explained the voltage drop over B-E. So the B resistor is = Output voltage (Arduino) - voltage drop over B-E /output current = 5V - 0,7V = 4,3 4,3/1mA = 4K3 Ω
    Anyway I thing it is lovely you teaching a little "analog" 😊
    👍 to you

    • @RalphBacon
      @RalphBacon  4 года назад +3

      Oh, believe me, Allan, there was so much more info I could have included but I was absolutely determined to give only what would fit into 15 minutes. My cutting room floor is littered with good stuff. But there is always the possibility of another video on transistors that would include this. Thanks for the 👍

  • @prlombaard
    @prlombaard 4 года назад +1

    Very nice explanation in brief terms of how to use the good old NPN transistor. Thanks again.

  • @ForwardGuidance
    @ForwardGuidance 4 года назад +1

    Excellent refresher or introduction too for the beginners. This series will make for a nice playlist. All videos from you Ralph are good, the long ones with so much great detail and shorter ones like this with still all the necessary details.

    • @RalphBacon
      @RalphBacon  4 года назад

      Many thanks! You've summarised my intentions perfectly. I need a good PR man... unpaid, of course!

  • @miriamramstudio3982
    @miriamramstudio3982 4 года назад +3

    That was an excellent explanation. Looking forward to watch the one about MOSFET. Great video !!

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Glad you liked it! MOSFET coming soon (after caps and resistors).

  • @philowen2755
    @philowen2755 4 года назад

    Excellent. This is the type of video a parent and child could watch learning a lot together (if Arduino inclined). Clear, precise and profanity free (as all your videos are). Thanks Ralph.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you enjoyed it! Thanks, Phil!

  • @jparky1972
    @jparky1972 4 года назад +1

    I really like these shorter videos Ralf.
    Very well explained. I'm very much a novice with electronics, even though I've been playing with arduino for a few years now.
    Thanks.
    Looking forward to the next one.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you like them, Jason! More in the pipeline and planned. In addition to my regular ones, of course.

  • @iancooper418
    @iancooper418 4 года назад +1

    A clear and concise explanation. Big thumbs up.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you think so Ian, that's great!

  • @MrJozza65
    @MrJozza65 4 года назад

    Very nicely explained. I play a lot with pre-built modules with the Arduino, and had forgotten a lot about the basics of transistors etc so this is a welcome refresher for me, thanks!

  • @abpccpba
    @abpccpba 4 года назад

    Great idea Ralph for all of us in a stay at home mode. RUclips has sure helped us, visual learners. Thanks, Mr. Bacon.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad to help, Paul. When lockdown has ended we will all be experts at all things!

  • @isoguy.
    @isoguy. 4 года назад +2

    That was an amazing explanation and demonstration of how to use an npn transistor.
    Thank you so much for this vid.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Glad it was helpful! (I'm assuming this was not a sarcastic remark!) Beginners have to start somewhere, after all.

    • @isoguy.
      @isoguy. 4 года назад

      @@RalphBacon Genuine thanks, not intended to be sarcastic in any way, sorry if it came across that way.

  • @OsoPolarClone
    @OsoPolarClone 4 года назад +1

    Great video as always. I can see already that I will enjoy this series of videos as I do not know that much about electronics. THANKS!

    • @RalphBacon
      @RalphBacon  4 года назад

      More to come, Bruce! We don't need a huge amount of knowledge for Arduino stuff, but the basics does help.

  • @gpTeacher
    @gpTeacher 4 года назад

    It’s Zen-like clarity at its essence Ralph! I wish I’d seen this YEARS AGO!!! Really great Ralph! Boffo Bacon Bytes! “B-Cubed rules! Thank you.

    • @RalphBacon
      @RalphBacon  4 года назад

      So you liked it then, Gord? I couldn't be sure!!! So nice to know it will be useful to viewers. Thanks for posting.

    • @gpTeacher
      @gpTeacher 4 года назад

      Loved it Ralph! Really concise and understandable. Bravo! Sorry I wasn’t more clear. Enthusiasm won out over clarity😎😎. I’ll be looking forward to the future episodes!

    • @RalphBacon
      @RalphBacon  4 года назад

      I was talking tongue-in-cheek, Gord, your enthusiasm was well evident in your original post!

  • @batticha462
    @batticha462 4 года назад

    Brief, Clear and very helpful.We are waiting for another one

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Will upload soon, Batticha! Well, I say "soon"... in about a week, but I have my usual video complete as well! Glad you liked it.

  • @tim_bbq1008
    @tim_bbq1008 4 года назад +1

    Bacon Bytes Beginner's Series. I'll be looking for more like this!

    • @RalphBacon
      @RalphBacon  4 года назад

      More to come! There's a playlist for these beginner type videos too: ruclips.net/p/PLZHhGaUUFqq31OZZLV8HxSc7hY08JCBzu

  • @JerryEricsson
    @JerryEricsson 4 года назад

    Thanks a million, love your videos to take my mind off the way things are for our family right now....

    • @RalphBacon
      @RalphBacon  4 года назад

      You are so welcome! Times are tough for you now Jerry, keep positive. But not in a Car Owner virus way.

  • @scottstevens7569
    @scottstevens7569 4 года назад

    Good description and presentation of how all the parts work and fit together. Well enjoyed!

    • @RalphBacon
      @RalphBacon  4 года назад

      Thank you very much! Nice to hear from you Scott, keep tuned.

  • @Keeping_IT_Simple
    @Keeping_IT_Simple 4 года назад

    A great explanation , very understandable which i found covered the topic well without going down any unnecessary rabbit holes
    Like the Bacon Bytes format & look forward to the rest of the series

  • @wv838
    @wv838 4 года назад +2

    And perfect timing. I'm about to do this myself to switch a gazillion led devices for a flight sim cockpit build.

    • @RalphBacon
      @RalphBacon  4 года назад +2

      I knew that, which is why I released it now! Ha ha! Just on the LED subject, don't forget you can control (colour, brightness) a gazillion (approx) LEDs if they are Neopixels, with just one pin on an Arduino. I covered it briefly in videos #62 and #68.

    • @andrewkieran8942
      @andrewkieran8942 4 года назад +3

      If you're controlling a lot of LEDs, wait for Ralph's MOSFET video or, as he suggests, use addressable LEDs i.e. NeoPixels like the WS2812B or similar.

  • @chrisingram7277
    @chrisingram7277 4 года назад

    I too enjoyed the "BB" format , learned some more during my morning coffee. Keep them coming.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Thanks, will do, Chris! I have a couple waiting in the wings, but more planned.

  • @richardkussin3206
    @richardkussin3206 3 года назад

    Excellent! I am new to this hobby, and have some general background on transistors. This is very helpful to see it condensed down to what is needed in Arduino. Just what I needed.

  • @JerryEricsson
    @JerryEricsson 4 года назад

    Kind of a neat review for those of us who understand the transistor, or think we do at any rate. I quite enjoyed it even though it was a bit on the short side, as you said it would be. Thanks for building these great videos for we, the arduino lovers.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you enjoyed it, Jerry! Yes, deliberately kept short (boy, that was *hard* ) so I didn't lose viewers!

  • @QCAndre
    @QCAndre 4 года назад +1

    Great stuff Ralph. I am waiting for the MOSFET and the PNP. Thank You

    • @RalphBacon
      @RalphBacon  4 года назад

      You and me both! Keep tuned!

  • @robertrobert5583
    @robertrobert5583 4 года назад +1

    Thanks for a very helpful video. As a hobbyist I've picked up bits and bobs but it's really helpful to have this to fill in the gaps.
    I'm hoping you will do one on capacitors. I find pico, nano micro farads and codes like 22 extremely confusing and when I needed a ?105 for a project I found that was the one that I couldn't find in my large assorted box!

    • @RalphBacon
      @RalphBacon  4 года назад +1

      You're very welcome! I do have a video on caps waiting, can't remember for the life of me what I included, Robert, but I hope you find it equally useful when I publish it.

  • @whitefields5595
    @whitefields5595 4 года назад +1

    Ralph, At the end of this series please do publish your 'favourites'. Most Arduinites only need a few BJTs, MOSFETS to get started and it would help if you ended with a list of the most useful. Please include Logic level devices too. Once folk have got a basic set of 'Must haves' then they can go roaming through the data sheets for the different types. If you want my list, then please ask.

    • @RalphBacon
      @RalphBacon  4 года назад +2

      Good idea, Mr Whitefields (so formal). As you say, I tend to have a set of favourites that work with Arduinos (and similar), and I also have a list which I won't use (again) as they didn't play nicely at all. Anyone else inadvertently buy a MOSFET with a minimum gate voltage of 8V so it just doesn't work with an Arduino? Oh, just me then. Sigh.
      If you could send me your list, that would be super, I can compare notes and claim all the credit too. Drat, didn't mean to write that last bit.

    • @whitefields5595
      @whitefields5595 4 года назад +1

      @@RalphBacon Start with TIP 120 and BC 547. Don't forget to do a Darlington pair example. Then focus solely on 5 V and 3V logic level transistors. MOSFETS go for IRLZ34(and 44) N. P channel Vishay A1SHB (but SMD only). Mains triac ST BTA41-600B for up to 3kW (but you don't do mains!) .... emphasise benefit of using passive components rather than the awful modern trend of "Doing it in software". As few passives keeps it simple and stable and saves the processor whizzing round and round. Remember output current and impedance of Arduino. Finally use an op amp as a high impedance voltage follower (zero gain buffer) to really clean up Arduino I/O.

  • @tomgeorge3726
    @tomgeorge3726 4 года назад +1

    Good video for those needing to understand BJT operation.
    The 2N2222A can by the unknowing be mistaken for P2N2222A, they have different pinouts.
    BC548 is in my opinion and experience the better transistor to use.

    • @TheEmbeddedHobbyist
      @TheEmbeddedHobbyist 4 года назад

      Also the 2n2222A from Farnell is a TO18 metal can! I feel that what you need to read on the data sheet is more important than the type. if you know what to look for and what it means you then have a much bigger choice of transistors to pick from.

    • @RalphBacon
      @RalphBacon  4 года назад

      These days, general purpose NPN/PNP transistors are pretty much interchangeable, especially where the Arduino is concerned. And I haven't used (or seen) a T018 can transistor for about 20 years! The last one was a BC108C!

    • @TheEmbeddedHobbyist
      @TheEmbeddedHobbyist 4 года назад +1

      @@RalphBacon Farnell are TO18, or LCC and RS components are LCC-1 and LCC-2!

  • @jeffmerlin2580
    @jeffmerlin2580 4 года назад +3

    9:30 I think you forgot the 0.7V between base and emitter, Ralph. 4.3V over the resistor, that means slightly less than 1mA with a 4k7 ohm resistor. Not that it matters though. :-)

    • @pjaj43
      @pjaj43 4 года назад +2

      On the other hand it is usual to drive the transistor int full saturation when using it as a switch. So if the rated gain is, say, 100 then it would be quite common to drive the base at about 4 - 5mA for a 100mA load. So the resistor would be about 1K ohms.

    • @RalphBacon
      @RalphBacon  4 года назад

      Agreed. In the Arduino world we will drive it into full saturation, mostly.

  • @patrickdelvisohopkins
    @patrickdelvisohopkins 2 года назад +1

    That was a great video on NPN BJTs, thanks!

  • @flemmingchristiansen2462
    @flemmingchristiansen2462 4 года назад

    Well explained. All in nice and easy general terms It is important to check the datasheet when choosing transistors. Pin lay layout can differ a lot.
    General speaking - electronics is all about voltage control, governed by Ohms law.

    • @RalphBacon
      @RalphBacon  4 года назад

      Ohm's law is explained more in the resistor video. Coming soon!

  • @peterlorne7077
    @peterlorne7077 4 года назад

    Hi Ralph!
    Hands in the air for you 🙌
    Thank you !
    / Peter in Sweden.

    • @RalphBacon
      @RalphBacon  4 года назад

      Hey, thanks, Peter from Sweden!

  • @dannyjensen4954
    @dannyjensen4954 4 года назад +1

    Can't wait for the mosfet video! Thanks.

    • @RalphBacon
      @RalphBacon  4 года назад

      Next on is out already, all about capacitors.

  • @phillipneal8194
    @phillipneal8194 4 года назад +1

    Wow ! I now have a better idea of transistors and power management. Thank you.

    • @RalphBacon
      @RalphBacon  4 года назад

      You are welcome, Phillip, thanks for posting.

  • @daviddoidge1252
    @daviddoidge1252 4 года назад

    Brilliant as always, looking forward to the crystal episode

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Thanks, David! I thought I might cover realigning the antimatter chambers in the UNO before the dilithium crystal video?

    • @daviddoidge1252
      @daviddoidge1252 4 года назад +1

      @@RalphBacon 🖖

  • @gpTeacher
    @gpTeacher 4 года назад

    Hi Ralph. Since you’ve already got that white speed controller that you showed at the beginning, how about just get a duplex outlet, put it in a small enclosure, mount it on your bench/wall where it’s convenient to reach and run a grounded cable and plug from it to your mains outlet and put a longer cord on your fan that can reach the controller now plugged into the box. It’s grounded and safe and uses the white controller that you’re confident with. No Chinese Roulette! As they say in Alabama,”Voy-la!” All the best!

    • @RalphBacon
      @RalphBacon  4 года назад

      Tha is indeed a good suggestion, Gord. If I don't end up making my own electronics I might consider that. Simple and cheap!

  • @danljohnston
    @danljohnston 4 года назад

    What a treat! Looking good Ralph. Thanks

    • @RalphBacon
      @RalphBacon  4 года назад

      Thanks for watching, Danny!

  • @raym9691
    @raym9691 4 года назад

    Really great explanation on how to use transistors! Really helped me out thanks! I'll be looking forward to your mosfet video the simplification you used made it easy to understand! Cheers

  • @mufeedco
    @mufeedco 3 года назад

    Thank you. It is one of the best video explaining how transistor works.

  • @Hasitier
    @Hasitier 4 года назад

    Nice explanation for the beginner Ralph.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Thanks for watching, Michael, as this beginner level was obviously not aimed at the likes of you! But so many electronics hobbyists ask me some fairly basic questions I thought it worthwhile doing. Cool.

    • @Hasitier
      @Hasitier 4 года назад +1

      Ralph S Bacon it’s definitely worth doing such videos Ralph. We all started once.

  • @flashcorp76
    @flashcorp76 Год назад

    I know all about this, but I still watch because it’s a pleasant electronic cultural discourse, that gets me by when …..at work…. waiting for what follows😊✌🏻👍🏻

    • @RalphBacon
      @RalphBacon  Год назад +1

      Glad to help you pass the time!

  • @iot_enthusiast
    @iot_enthusiast 4 года назад

    Nicely done, as always!

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Thank you, Mohan! Cheers!

  • @johnjeremias9437
    @johnjeremias9437 4 года назад

    Thanks Ralph, really enjoyed youe video. Will search for next

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you enjoyed it! There is a playlist for these Bacon Bytes videos: ruclips.net/video/9aYUzRpVSjA/видео.html

  • @fjdelahoz
    @fjdelahoz 4 года назад

    Many thanks Ralph. Great video. Very informative.

  • @andymouse
    @andymouse 4 года назад

    Very nice Ralph, newcomers will love this and maybe this pandemic will have a bit of silver on its lining and get more people involved with our hobby...cheers.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      You would not believe the questions I get asked, Andy. The problem is that novice makers want to run before they can walk. So I thought this series might give them a bit of basic knowledge to build on. That way, they get the info they need and I get less questions! Win-win!

    • @andymouse
      @andymouse 4 года назад +1

      @@RalphBacon Exactly Ralph, it was a great idea and a great start !

  • @McTroyd
    @McTroyd 4 года назад

    You MIGHT be able to use that transistor in an "in-between"/linear state by using a bypass capacitor to ground on the base (say, 0.1uF or higher). At that point, analogWrite() PWM control would become a ramping voltage, which should also ramp the current through that 4.7k resistor, thanks to Mr. Ohm. Or, one could skip directly to a MOSFET and just wire it directly, but decouple the load instead of the base/gate of the FET. (Might need a pull-down resistor to discharge the FET's gate.) Looking forward to the FET video! 👍

    • @RalphBacon
      @RalphBacon  4 года назад +1

      These days, Ted, I would certainly lean towards using a MOSFET instead of a BJT but that's for another video! I've found a pull down is certainly required on a N-channel MOSFET as just touching the gate is enough to make it start conducting! Ditto, a pull up on a P-channel. More in that future video.

    • @McTroyd
      @McTroyd 4 года назад

      @@RalphBacon As I think about it, in the specific context of Arduino, doesn't the output-mode pin pull to ground when it's low? (I remember having to set output pins to input pins to get the "high-Z" stage on a bus.) That being the case, the pull up/down might not be necessary...

  • @georgef7754
    @georgef7754 4 года назад

    My favourite type of bacon. Thank you. So using your example if I wanted 500mA I would need a 1k resistor? Looking forward to the mosfet video.

    • @RalphBacon
      @RalphBacon  4 года назад

      Is this a question about the base resistor, perhaps? Theoretically, with a gain of 100 the transistor's base needs 100 times less current: 5mA in your case. Using Ohm's law (which is covered better in the resistor video) 5v/.005 = 1,000Ω (aka 1kΩ). BUT!
      The gain is dependent on the _actual_ collector/emitter current flow; with a current flow of just 0.1mA the gain is about 50. At 1mA it's 75 and at 10mA to 150mA it's 100. But it drops to just 30 at 500mA!
      Datasheets are definitely your best friend!
      Great question, George, and you can see why I didn't muddy the water with sort of information in the video!

  • @DIYDaveOK
    @DIYDaveOK 3 года назад

    Now this is what I was looking for! Thanks!

  • @adabill295
    @adabill295 4 года назад

    Another great, very understandable video. I've been using the esp32/8266 chips lately and would appreciate, if it doesn't make the discussion too complex, for you to mention if these items can be used with 3.3vdc devices also.

    • @RalphBacon
      @RalphBacon  4 года назад

      As far as transistors go, they don't care what the output voltage is from your device as they only require about 0.77V to work. Just adjust the formula I used to calculate the correct resistance (bearing in mind that these ESP devices cannot output as much current per pin as an Arduino).

  • @simonwhite3137
    @simonwhite3137 4 года назад

    Nice one Ralph! I’m sure you have thought it through, but I’m puzzled why you assume that even the tiniest bit of basic maths is going to frighten viewers. I was introduced to the VIR triangle of Ohm’s Law fifty years ago (mnemonic “Vulcanised India Rubber”) and still draw it every time I work out a resistor value! The middle of that video was the ideal place to put it, surely?
    All the best 🙂

    • @RalphBacon
      @RalphBacon  4 года назад +2

      I am always nervous about introducing more complex concepts (yes, even simple maths, Simon) because I suspect viewers will switch off. However, we do cover some simple Ohm's law stuff in the Resistor (future) video, complete with the VIR pyramid (which, like you, I use most days). [Note to self: be braver]

  • @GnuReligion
    @GnuReligion 4 года назад +1

    Am surprised you chose the American 2n2222 instead of the more international bc548. As a novice hobbyist I like the ULN2003 for transistor switching. Has built-in base resistors as well as protective flybacks.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Ah, mine are _Chinese_ 2N2222A transistors, obviously very different, Steven! 😅
      Well the fact is, I have umpteen transistors, all pretty much interchangeable, and I just plumped for this one. Your ULN200X series is a great set of Darlington transistors (some with base resistors, as you say) but not something for a beginner video! And they are usually IIRC in a DIP or SOIC package? Too many leads!

    • @kennmossman8701
      @kennmossman8701 4 года назад

      Isn't the BC family originally from the UK? I don't think it is more 'international'. It has some advantages while the 2N2222 has different advantages.

    • @GnuReligion
      @GnuReligion 4 года назад

      @@kennmossman8701 (puts down hamburger) This was a post-brexit expression of reuniting with US standards. We have saved your imperial measurement system for you too, if you want it back!

    • @RalphBacon
      @RalphBacon  4 года назад

      Apparently, the BC549C is the modern day equivalent of the BC108 (family): www.petervis.com/electronics/bc549c/bc549c.html

  • @mikestombraidervids8768
    @mikestombraidervids8768 4 года назад +1

    Hi Ralph. Nice one! Will the 'BB' videos be getting their own playlist ??

    • @RalphBacon
      @RalphBacon  4 года назад

      They already have, called Bacon Bytes: ruclips.net/p/PLZHhGaUUFqq31OZZLV8HxSc7hY08JCBzu

    • @grahamevans5304
      @grahamevans5304 4 года назад

      Ralph S Bacon I’m luvvin it 🎶🎶🎶🎶🎶🎶🎶🎶

    • @grahamevans5304
      @grahamevans5304 4 года назад +1

      Bacon Bytes...good name

  • @johnmarshall2660
    @johnmarshall2660 4 года назад

    Another great idea ... since I got my Toggle switch working using PCF8574 .. got 16 channels I want to switch inputs to other Arduinos or PIC devices and Relays so got some 2N7000 Mosfets so be interested in your next Mosfet video..

    • @RalphBacon
      @RalphBacon  4 года назад

      Have fun watching the MOSFETs video, John.

  • @markgreco1962
    @markgreco1962 4 года назад +1

    Thanks Ralph

    • @RalphBacon
      @RalphBacon  4 года назад

      You're welcome, Mark, thanks for posting.

  • @normcaissie5598
    @normcaissie5598 4 года назад +1

    Love it. Thanks

    • @RalphBacon
      @RalphBacon  4 года назад

      Thank you too! Thanks for posting, Norm.

  • @willofirony
    @willofirony 4 года назад +1

    Now I know you were focusing on using the transistor in digital mode as a switch. However, I have a question: Have you ever used a transistor in PWM mode? I am not sure what I would use such a configuration for but I am curious if the collector would just output the "noisy" on off wave form, thus making it useless for an analog amplification. I am guessing that feeding such a signal to an inductive load, such a motor would average out the output but a speaker would generate an awful load. Stay healthy, Ralph.

    • @RalphBacon
      @RalphBacon  4 года назад

      You wouldn't be able to _amplify_ analog using PWM (this is not a class D amp) but, as you say, you can use PWM to generate audio tones, of course, Michael. And using high frequency PWM to drive a motor (not directly, ideally via a MOSFET bridge but a BJT tranny or two would work too, sort of) would enable speed and direction control of that motor (but not by averaging). I'll be talking about this in my Bacon Bytes video on MOSFETs. Stay tuned!

    • @willofirony
      @willofirony 4 года назад

      @@RalphBacon Thanks for that, Ralph. Bacon Bytes .....yum!

  • @ucmetoo1
    @ucmetoo1 4 года назад

    Great explanation!

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you think so! I've a few more in the pipeline too.

  • @sprink88
    @sprink88 4 года назад

    Hi Ralph. Love your series, have learnt a lot...
    Can you tell me what bulb you use in the demo?
    I'm very interested in interesting, retro or otherwise non-LED lamps...
    Can you let me know how I might search for a bulb like the one you show in your demo?

    • @RalphBacon
      @RalphBacon  4 года назад

      That bulb is a car bulb, normally used as the interior light (when the door opens it goes on). These days they are all LED but that one is incandescent. eBay has lots of 12v 5W bulbs but few of them like this:
      www.ebay.co.uk/itm/2-X-239-FESTOON-12V-5W-CAR-AUTO-BULB-BULBS-38MM-INTERIOR-LIGHT-NUMBER-PLATE/143541337927

    • @sprink88
      @sprink88 4 года назад

      @@RalphBacon Thanks so much!

  • @DavidBTB
    @DavidBTB 4 года назад

    In the example of limiting CE current to a "bulb" by restricting the BE current, would you still use a current limiting resistor when using bare LEDs?

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Oh yes! But in a different place!
      In this simple example, the bulb was rated at 12v so we did not need to "restrict" the current flowing through it at all. We had to ensure the transistor was being switched on enough so allow all necessary current to flow.
      If that bulb were a red diode, with a typical forward voltage drop of 2 volts (ie it "lost" 2v just by being there and conducting) and which required a maximum of 20mA, we would need a resistor to ensure that we only allowed 20mA to flow. We will cover this more fully in the _resistor_ video, but we want to "drop" (restrict) 10v @ 20mA which according to Ohm's law is 10v/0.02A = 500Ω. As I say, we'll go through this in more detail in a future video. That resistor goes *in series* with the LED. You can keep the base resistor at 4K7 which just ensures the transistor is fully switched on.

  • @Ernzt8
    @Ernzt8 4 года назад

    Keep them coming!

    • @RalphBacon
      @RalphBacon  4 года назад

      Will do, Ernst! Good to hear from you!

  • @chrisarmstrong8198
    @chrisarmstrong8198 4 года назад

    Thanks for the interesting video. Here's my $AU0.02 worth:-
    In order to make sure a transistor remains in saturation independent of the collector load (which is what you want in a digital circuit), it is usual to overdrive the base. So, instead of 4.7k, maybe 1k or less would be better. However, since the resistance of a filament lamp increases by a factor of 10 or more from cold to hot, that 3W lamp that draws 250mA at 12V when hot, probably draws 2.5A or more when it's first turned on. So, your 4.7k base resistor may have (by clever design?) saved the transistor's life by limiting the collector current to a few hundred mA, i.e. 1mA x transistor gain.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      It is usual to overdrive a transistor when we use it as a switch, that is true, as the worst thing that could happen is that the transistor is not fully switched on (ie operating in the linear region). Toasted marshmallows, anyone? Using an incandescent bulb in this demo was precisely for visual demo purposes. In Real Life I would expect a string of LEDs , or a motor or a relay... Watch the MOSFET video when it is published for more Arduino Real Life examples!

  • @joebrown3286
    @joebrown3286 4 года назад

    Happy new year everyone.
    Hi Ralph, there is a chip out that replaces Relays, they use the 12c and spi chip is ADG714 and ADG715 . these are spst chips. With up to 8 outputs.
    Any chance you can run a video on one of these chips and how to program. Really think these can drastically shrink arduino circuits needing low voltage relay switching.
    Thanks Ralph and keep up the fantastic workshops.
    Joe

    • @RalphBacon
      @RalphBacon  3 года назад

      Hmm. I thought initially, Joe, that these could be useful, as you say, to replace relays. Then I discovered this in the "Maximum Ratings" section:
      *Continuous Current, S or D . . . . . . . . . . . . . . . . . . . . 30 mA*
      This makes it no more useful than a standard Arduino ATMega328P output, which can handle 40mA on individual pins with an overall maximum of 200mA for all pins at any one time. (Best Practice keep each pin to 20mA).
      I'm, thinking now that standard MOSFETs (eg 2N7000 or Si4599 dual) are a much better options to switching loads in a microcontroller environment.
      Thoughts?

    • @joebrown3286
      @joebrown3286 3 года назад

      @@RalphBacon
      Hi Ralph, you are absolutely correct, these chips are way to low in amp outs. Great product ruined by max output.
      Hmm mosfet switching really interesting, dual mosfets even better. Have you got a video on these Ralph as poss relay killers as I couldn’t find one.

  • @pekkagronfors7304
    @pekkagronfors7304 4 года назад

    Useful and interesting, thank's.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you think so! Thanks for posting Pekka.

  • @newburypi
    @newburypi 4 года назад

    Almost forgot to ask you a question that has been nagging me for quite a while. The bird tweetings I hear in the background of your video, are they from birds or someone's (miss used, IMO) ring tone? A pet bird, or the out-of-doors sleeping in? Just wondering :)

    • @RalphBacon
      @RalphBacon  4 года назад +1

      You can hear those? Ears of a bat (not literally, obviously). Sometimes they really are chirping in the tree directly outside my workshop window. Other times, it's the Sleep Machine that I have permanently switched to bird song, not because I want to sleep but because I find it soothing. [Note to self: turn down sleep machine before videoing]

  • @satchell78
    @satchell78 4 года назад

    Thanks, was sitting here for a couple minuets, not working...? Flip the last LED around, bam, 12v of brightness.

    • @RalphBacon
      @RalphBacon  4 года назад +2

      Glad it's all making sense!

  • @TheUnofficialMaker
    @TheUnofficialMaker 4 года назад +1

    Good job breaking it done...NPN arrow Not Pointing In memory clue :)

    • @RalphBacon
      @RalphBacon  4 года назад

      Cool, thanks! My life is built on mnemonics like this!

    • @simonwhite3137
      @simonwhite3137 4 года назад +1

      Nice! I can add “Not Pointing iN” to “Vulcanised India Rubber” 😁

  • @johnstephenson2891
    @johnstephenson2891 4 года назад +1

    I'm old school and we had two ground symbols, chassis ground and ground. But never a straight line. lol

    • @RalphBacon
      @RalphBacon  4 года назад

      I use chassis ground ( ┴ usually) but a straight line that is the (common) ground is fine too. As long as it's clear.

  • @kevinsanvictores2618
    @kevinsanvictores2618 2 года назад

    Did you program it to function as a switch or will it automatically function as a switch when plugged in?

    • @RalphBacon
      @RalphBacon  2 года назад +1

      Any transistor acts as a switch if the Base connector is above about 0.8v (ie it becomes fully saturated). Watch the current flow, you don't need much.

  • @Mr31Vince
    @Mr31Vince 4 года назад

    What caught me out with transistors and arduino was that you must always connect the load to the collector side of the transistor for npn (nn2222a) as there is no path to the common ground for the current from the gpio pin if the load is connected to the emmitter side. Basics I guess, but it caught me out.

    • @RalphBacon
      @RalphBacon  4 года назад

      Yes, a common "gotcha" that one, good that you mention here to warn others.

  • @FilmFactry
    @FilmFactry 4 года назад

    Question: sometimes on a project I don't have the specific resistor or cap. But I read online, I can skip the resistor or use a different value. In practical terms, for such Arduino projects how much leway do we have in values?

    • @RalphBacon
      @RalphBacon  4 года назад

      It depends on what the resistor is doing. If it is limiting current to an LED then substituting a lower resistance might overdrive the LED. Or overload the Arduino port (pin). Not good. Substituting a higher resistance value one will make the LED (a bit) dimmer. That's OK. Other circuits might be much more critical. Others more forgiving. I don't think skipping the resistor is a viable solution though. You can buy entire sets of resistors (or caps) from Banggood or other warehouses for very little money (it's what I do). That way you have more resistors (or caps) than you know what to do with! But you never run out either.

    • @michaeltempsch5282
      @michaeltempsch5282 4 года назад +1

      In addition to kits of resistors, even if you don't have a value within the acceptable range you can often combine few of what you have in series and/or parallel to get a value close to the wanted.

    • @alblair3482
      @alblair3482 4 года назад

      Thank you Ralph I assume that the arduino already has a program to blink the transistor on is that a good assumption?

    • @RalphBacon
      @RalphBacon  4 года назад

      Yes, the aptly named BLINK sketch blinks the built in LED (so no further components are required) but if you want to blink your own LED you absolutely must use a current limiting resistor (rule of thumb: 180 ohms is fine).

  • @andrewtoogood1429
    @andrewtoogood1429 4 года назад

    Hi Ralph, I thought it was impossible to amplify voltage with a Transistor, I thought they amplified current only, or is that just a limitation for PNP resistors as a switch?

    • @WildSccotsman
      @WildSccotsman 4 года назад

      The voltage is not amplified. In this example the voltage is switched. It is always 12V across the load the current is then controlled buy the current on the base.

    • @RalphBacon
      @RalphBacon  4 года назад

      As I tried to emphasise, Andrew, any BJT transistor is a _current_ amplifier. The current flowing into the base allows a greater current to flow between collector and emitter, defined by the gain of the transistor (in this example a nominal 100 times).
      The voltage swing on the collector follows the current flow. But in reality we are not too bothered about this as we just ensure the transistor is switched fully on, to act as a switch.

    • @andrewtoogood1429
      @andrewtoogood1429 4 года назад

      @@RalphBacon ok found the article looks like it's only an issue with PNP and different voltages
      "This circuit works just as well as the NPN-based switch, but there's one huge difference: to turn the load "on", the base must be low. This can cause complications, especially if the load's high voltage (VCC being 12V connecting to the emitter VE in this picture) is higher than our control input's high voltage. For example, this circuit wouldn't work if you were trying to use a 5V-operating Arduino to switch off a 12V motor. In that case, it'd be impossible to turn the switch off because VB (connecting to the control pin) would always be less than VE ."
      learn.sparkfun.com/tutorials/transistors/applications-i-switches

    • @RalphBacon
      @RalphBacon  4 года назад

      Lucky we have (P-channel) MOSFETs then, Andrew!

  • @TuttleScott
    @TuttleScott 4 года назад

    can the bjt be used for PWM or is that a mosfet thing?

    • @ristomatti
      @ristomatti 4 года назад +1

      Yes they can.

    • @RalphBacon
      @RalphBacon  4 года назад

      As Ristomatti has already indicated, PWM can be used on a BJT, although MOSFETs do lend themselves to that sort of thing even better for reasons which I'll explain in the MOSFET video.

  • @pupplecoffee
    @pupplecoffee 4 года назад

    Does transistor hfe affect collector current value? Is collector current 1mA(ib) * 50(hfe) = 50mA(ic) ?

    • @kennmossman8701
      @kennmossman8701 4 года назад

      yes, Ic = Ib x hFE where hFE is the gain at Ic

    • @RalphBacon
      @RalphBacon  4 года назад +2

      I've replied here in another comment that shows that gain varies depending on collector current. At 500mA the gain is only 30 but at 150mA it's 100. Datasheet tells all!

    • @kennmossman8701
      @kennmossman8701 4 года назад

      @@RalphBacon Quite so, though how to put in equation form? hFE:[Ic, Vce] = Ic / Ib?
      I realize you tried hard to keep it simple but aren't you opening a can of worms by mentioning higher current [[like 500mA]; now you have to consider Pd. Perhaps make it a two part video; the basic idea, and advanced [covering Vce, Ic, hFE, Vce[Sat], Pd, Vbe with the complete equation for Rb ------- OMG Math!/MathS].
      BTW don't incandescent bulbs have an inrush current [which could exceed IC[peak]]? More worms!

    • @RalphBacon
      @RalphBacon  4 года назад

      I see no worms, Kenn. Nope. Worm free. I mean, why complicate things? I didn't mention the changing gain in the worm-free video, I'm not that stupid! It probably never affects the average Arduinite anyway, especially as we generally whack the transistor to full saturation, the relay / bulb / LED switches on - job done!

  • @arminro3686
    @arminro3686 3 года назад

    What is the maximum voltage you can feed to Arduino without burning it's regulator?

    • @RalphBacon
      @RalphBacon  3 года назад

      I'd stick to 12v but in theory you can go higher to 15v or thereabouts. Not me though.

    • @arminro3686
      @arminro3686 3 года назад

      @@RalphBacon thanks for your answer. So since both arduino and the transistor have to be connected to the same vcc and vdd, then the biggest motor we can move is a 12 volts one correct?

    • @RalphBacon
      @RalphBacon  3 года назад

      If you want to use the Arduino to turn a DC motor on/off (with optional speed control) you can use any voltage because the motor voltage VCC (via the switching transistor) can be a different supply to the Arduino's. But do connect the GND connections together. I strongly recommend the use of an N-channel MOSFET transistor for this. Ensure it is a logic level (TTL) one, where it needs no more than 5v to fully switch on. I've done videos on this, scan the PDF in the video description for a suitable one.

    • @arminro3686
      @arminro3686 3 года назад

      @@RalphBacon thank you very much. Liked and subbed

  • @lint2023
    @lint2023 4 года назад

    Good stuff. My problem: I learned electron flow so I get confused with hole flow. drat

    • @pjaj43
      @pjaj43 4 года назад

      Yes, the arrow on the emitter points in the conventional direction of current flow, but the electrons,of course, are going the other way.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Biggest mistake of the 19th/20th century in deciding that current flows from positive to negative, when in reality it's the other way round. Conventional vs electron flow. But we all understand it now, right? Oh.

  • @normcaissie5598
    @normcaissie5598 4 года назад

    LOL so what was the switches for?

    • @RalphBacon
      @RalphBacon  4 года назад +2

      The switches on my workbench were to show that the transistor acts like a switch (in an Arduino environment). I think I cut out the bit where I actually join the dots on this, oh dear.

  • @fabiocardoso_dev_br
    @fabiocardoso_dev_br 4 года назад

    Please mosfet video soon, this one was awesome, though. Thank you sir.

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Next video in this series is all about the exciting world of resistors... wake up, Fabio, they are not that boring! Ok, they are not that exciting either, but they are essential to us Arduinites! Keep tuned.

    • @fabiocardoso_dev_br
      @fabiocardoso_dev_br 4 года назад

      @@RalphBacon I am looking forward already.

  • @fredflintstone1
    @fredflintstone1 4 года назад

    "a rasher of Bacon if you will" Hmm Streaky or back?? :-) nice video keep them comming

    • @RalphBacon
      @RalphBacon  4 года назад

      That's the plan! Keep tuned, Fred!

  • @newburypi
    @newburypi 4 года назад

    Thumbs up!

    • @RalphBacon
      @RalphBacon  4 года назад +1

      Thank you! Cheers! And thank you again for being my guinea pig, your comments were very useful and appreciated. I trust you got the £50 cheque I sent you. I'm almost sure I sent it. Lost in the post, you say? Oh well, that's life...

  • @surenbono6063
    @surenbono6063 4 года назад

    ..its like a micro relay..but isn't NPN ..you described a PPN..

    • @RalphBacon
      @RalphBacon  4 года назад

      What's a PPN?

    • @surenbono6063
      @surenbono6063 4 года назад

      3:32 ..the collecter is a N side of the load..base P,Emitter N..when switched collector connwcts to Emitter..right?

  • @woodworking3815
    @woodworking3815 4 года назад +1

    Instead of searching datasheets for pinouts, I recommend a cheap component tester like this: ruclips.net/video/7Br3L1B80ow/видео.html

    • @RalphBacon
      @RalphBacon  4 года назад +8

      Yes, I have one of those. But in many ways, learning how to look stuff up in a datasheet is a skill that would behoove many who do this hobby. You can quickly learn to pick out the salient points (there's a ton of stuff I skip) and you can learn _so much_ whilst just idly glancing at the pdf. What?!? Maximum collector voltage 15v? Who knew?

  • @largepimping
    @largepimping 4 года назад +1

    Ralph, not being WELCOME BACK'd right at the start of the video is like a slap in the face. How rude. This is worse than if Great Scott was to fail to tell me to stay creative.

    • @RalphBacon
      @RalphBacon  4 года назад

      Different video series! I deliberately made it different (you get the same intro on each video in this series) so as not to confuse these with my "regular" videos. Sorry you felt offended, not intentional. Good to see you hear, though.

    • @largepimping
      @largepimping 4 года назад +1

      @@RalphBacon You knew I was only joking, right? Yeah, you HAD to have known... There's no way you didn't know... DAMNIT I WAS ONLY KIDDING!!!

  • @stevrgrs
    @stevrgrs Год назад

    The birds are lovely but VERY distracting :)

    • @RalphBacon
      @RalphBacon  Год назад

      Sorry about that! I no longer live there so far fewer 🐧birds here to distract you (or me)!