MOSFETS for Makers | Controlling Higher-Powered Components with N-channel MOSFETs

Поділитися
Вставка
  • Опубліковано 28 вер 2024

КОМЕНТАРІ • 39

  • @leahben-tzur57
    @leahben-tzur57 11 днів тому

    Hey Jaryd, thank you so much for this video! You really helped me out when I needed to wire up a peltier module, I hope you get even more subscribers (you made me one!)

  • @marclameu
    @marclameu Місяць тому

    Amazing explanation, thanks in avance! 😃

  • @ABaumstumpf
    @ABaumstumpf Рік тому +3

    Good startingpoint-video, just one small nitpick:
    You should NOT connect transistors to Arduino-Pins directly as switching them is a capacitive load too large for micro-controllers like arduino or raspberryPi. So an appropriate resistor should be used to drive such logic-level Mosfets (100-200 Ohm should be fine).
    And while these microcontrollers have internal pullup/pulldown resistors - i think both RasPi and Ardu by default set them to floating before your code starts, so having an external pulldown is a good choice for any output going to Mosfets as they can be rather charge-sensitive.

    • @pendalink
      @pendalink Рік тому

      Nice makes sense, thanks

    • @davidhawley1132
      @davidhawley1132 Рік тому +1

      So for noobs like me: a 100-200 ohm resistor between pin and gain + another resistor (?? Ohms) from the pin to ground, is that correct

    • @ABaumstumpf
      @ABaumstumpf Рік тому +1

      @@davidhawley1132 yes - the pulldown should be significantly higher, so in the range of a couple k-Ohm should be fine (a 4.7k for example).
      At least 10x the resistance of the resistor to the microcontroller-pin to avoid affecting the signal too much, but the exact value really is not that important.
      (it only becomes relevant when dealing with far more advanced circuits).

    • @lezbriddon
      @lezbriddon Рік тому

      Never have I ever had to use a gate resistor as high as 100 ohms on a mosfet. A resistor with a value that high could start to form a RC time constant making the switching from full off to full on sluggish and causing excessive heating in the mosfet if you are doing PWM to your load.
      just a few ohms is all it needs, and often I see other peoples designs with no resistor and they seem to work fine.

    • @ABaumstumpf
      @ABaumstumpf Рік тому +1

      ​@@lezbriddon ​ "they seem to work fine."
      *SEEM* is the correct word there.
      100 Ohms is on the low-side even as most designs will ask for resistors in the range of 1-10kOhm for driving capacities loads like transistors.
      And when you are at a range were the charge rate of the gate becomes and important factor - you better know about how to calculate the correct resistor-values (and that running without one might quickly destroy your microcontroller).
      For reference: The datasheet of the P30N06LE used in this video uses 2.5Ohms as a typical Value for R_GS, the raspberry pi Pico has an output-voltage of 3.3V and the specs say to limit pin-currents to 3 mA but lets go with the output-current of the chip it self which states 50mA for ALL GpIO-Pins COMBINED.
      So we have 3.3V and want to limit that to 50 mA (which already is way outside of spec) that is ~66 Ohms, going with the real maximum of 12 mA (still 4x!!!!! of what raspberry says is the max rating) we are at a nice 275 Ohms. In both cases we can ignore the 2.5 Ohm R_GS.
      So even when completely disregarding the limits and overloading the pin 4x the rated current you would need a resistor higher than my suggested 100 Ohm. Sure, most circuits will run fine with even just 50 Ohm, and that for a longtime, but no resistor - you are asking for trouble.
      I mean that is kinda like saying "i just use my summer-tires rated for 150km/h to drive in winter on the highway at 220 km/h - always worked".

  • @jacobm2750
    @jacobm2750 Рік тому +3

    Good to see the trusty ol’ MOSFET get it’s own guide, as well as some e-glass action! Good stuff Jaryd, looking forward to the next one 👍

  • @bokkenka
    @bokkenka 8 місяців тому

    Thanks for the intro. I'm looking to put a controller between the switch and the seat for my car's heated seats. The high is too high and the low is too low. I figure I can PWM the high to be able to lower it to a comfortable level. Any idea what the current would be for a seat heater? Thanks, again.

    • @Core-Electronics
      @Core-Electronics  8 місяців тому +1

      Thats an awesome project! My guess would be somewhere between 4 and 10 amps, you would need to measure it or find a spec sheet for it. You would also need to check how the seat is being cooled/heated. A Peltier cannot use a PWM directly and needs an inductor to smooth it out a bit, but peltiers are rarer and in newer higher-end cars, a heating element should be fine with the unfiltered PWM.
      If you have any other questions or need some guidance we have more eyes on our forums, chuck a post on there with some details of your projects: forum.core-electronics.com.au/
      Best of luck mate!

  • @y2ksw1
    @y2ksw1 Рік тому +1

    How to use MOSFETS with AC loads

  • @RakishRc
    @RakishRc Рік тому +1

    Brilliant video. Very detailed and informative! Was looking for pi pico and MOSFET application and this video is spot on 👍

  • @deadlymedley3306
    @deadlymedley3306 Рік тому +3

    thanks this is a great tutorial

  • @gregthomas7950
    @gregthomas7950 Рік тому +2

    Great video! What's a good value for the pull down resistor?

  • @pellcorp
    @pellcorp Рік тому +1

    Your enthusiasm is infectious, i received my 3 x pico w from core electronics last week these videos are wonderful for helping this idiot understand how to use them, great job

  • @chrischu5769
    @chrischu5769 10 місяців тому

    I would like to control a 3.3v/600ma led by my rpi and mosfet, how about the external power selection, or just 12v also work?

    • @Core-Electronics
      @Core-Electronics  10 місяців тому

      Hey Chris, there could be a variety of different setups depending on the LED that you have. I would first get it working without the MOSFET, ensuring that you select the correct voltage for that led (it sounds like it needs a driver). Then you can use a MOSFET to control the power to the LED.

    • @chrischu5769
      @chrischu5769 10 місяців тому

      Thanks for your suggestion, thank you very much!@@Core-Electronics

  • @behzadabf
    @behzadabf Рік тому +1

    perfect..realllly.

  • @SumUnicus
    @SumUnicus Рік тому +1

    Fantastic 😃
    But say i want to be able to read signal from a 12v source (indicator on a car) so i then can use a microcontroller (rpi2040) and output a flowing indicator with 10 leds via mosfets.
    What should i use to protect the microcontroller from the 12 volt signalbut still being able to read it? 😬

    • @ianleitch9960
      @ianleitch9960 Рік тому +2

      A voltage divider network should be presented with the 12v signal, such that nominally 9v is dropped across the first resistor and 3v is dropped across the second to ground. At the junction of the two resistors you should have a suitable 3v signal for input to a digital input pin of the microcontroller.
      The two resistors in series should likely add up to around 10k to limit the current dissipated by the network to a reasonable level. Let's call it 13v (just to keep the numbers easy). A 10k and a 3k resistors should do the job of providing the required 3v (nominal) switched signal for the microconroller. You could consider using a 3.3v zenner diode across the 3k resistor to limit the voltage to protect the input pin from any over voltage by clamping at the zenner voltage. A very small decoupling capacitor 0.01uF (integrator) might also be useful to remove noise (which could be generated by the zenner diode). For a 5V microcontroller, replace the 3k resistor with one of 5k and the zenner with one rated at 5.1v.
      Only around 1mA to 1.5mA should ever flow through the zenner in either case, so the wattage rating is nigh inconsequential.

    • @SumUnicus
      @SumUnicus 10 місяців тому

      @@ianleitch9960 Thaanks 😃 Very helpful 🤗

  • @gedtoon6451
    @gedtoon6451 10 місяців тому +1

    You should explain the need for a diode across inductive loads.

    • @Core-Electronics
      @Core-Electronics  10 місяців тому

      That was unfortunately a bit out of the scope of this video, but we have it on our "ideas for future videos" list

  • @lezbriddon
    @lezbriddon Рік тому

    what about high side switching from arduino.

  • @TBL_choice
    @TBL_choice 11 місяців тому

    Thanks for your kind tutorial🙂 I have one question! I want to use only single power supply for high power led and raspberry pi. Is there any way to use only one power supply?

    • @Core-Electronics
      @Core-Electronics  11 місяців тому

      Hey hows it going! That is definitely possible, you will need to use some step-down voltage regulator to get a nice 5v for your Pi. It depends on what Pi you are trying to power and what voltage the power supply is, and also your budget.
      If you chuck us a question and some details of your project over on our forums (we have staff checking forums a lot more than youtube), someone will be able to help you out.
      forum: coreelec.io/forum
      Cheers mate!

  • @andrewslaght4977
    @andrewslaght4977 5 місяців тому

    This was one of the best videos ive seen

  • @thefraw
    @thefraw 10 місяців тому

    Jaryd keeps bringing the hits!

  • @ankurbhatnagar4609
    @ankurbhatnagar4609 Рік тому

    I was looking for a video like this. Thank you. I'm trying to control a 1kW scooter motor with Raspberry Pi. A few of the motor functions, such as reversing, applying brakes (but not powering the motor itself) etc are activated by shorting two wires. I think I can use an n channel MOSFET for shorting any two wires.
    I need one other thing. I need to be able to supply a controlled variable voltage between 0V to 5V to the motor controller to control the speed of the motor. What device can I use so that it produces a variable voltage based on the output signal from one of the pins of Raspberry Pi?

    • @tezza3733
      @tezza3733 Рік тому

      At 8:08 he tells you how to do that. use Pulse Width Modulation output from the pi or pico or whatever.

    • @ankurbhatnagar4609
      @ankurbhatnagar4609 Рік тому

      @@tezza3733 In the example here the MOSFET is driving the motor (the load), so by setting the duty cycle the motor speed can be controlled here as the PWM is driving the motor. In my situation, I need to supply a voltage from 0 to 5V to the motor controller, which in turn sets the speed based on the voltage (Stopped at 0V and max speed at 5V). So, for example, how do I produce an output of, say, 1.7V?

  • @Pernat1y
    @Pernat1y 11 місяців тому

    FFS, stop swinging that marker. The sound is annoying.