ESP32 #59: ESP32 MOSFET Tutorial (as a Switch)

Поділитися
Вставка
  • Опубліковано 13 лип 2024
  • Using the #ESP32 with an MOSFET as a switch.
    ESP32 Example code:
    github.com/pcbreflux/espressi...
    MOSFET Thermal considerations see also:
    www.aosmd.com/res/application_...
    Development Environment
    (vulnerabilities in the Wi-Fi Protected Access II protocol (WPA2), also known as KRACK (Key Reinstallation Attack))
    see also www.espressif.com/en/media_ov...
    ubuntu 17.10 64 Bit (www.ubuntu.com/) (for video-capture and -editing switch back from wayland to unity :( )
    Eclipse Oxygen (www.eclipse.org/)
    esp-idf commit 2c95a77cf93781f296883d5dbafcdc18e4389656 Tue Oct 24 10:02:51 2017 +0800 (github.com/espressif/esp-idf)
    xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 5.2.0 (dl.espressif.com/dl/xtensa-es...)
    Arduino 1.8.4 (www.arduino.cc/)
    arduino-esp32 commit 07685903321a1968174f1a5027be88adb77b8817 Wed Oct 25 12:11:01 2017 +0200 (github.com/espressif/arduino-...)
  • Наука та технологія

КОМЕНТАРІ • 36

  • @GalenMatson
    @GalenMatson 4 роки тому +1

    You really helped solve my problem. I had the load on the drain of an N channel MOSFET and it wasn't working. I moved the MOSFET between the load and ground and it works now. Thank you!

  • @MrJanulis
    @MrJanulis 6 років тому +3

    Thank you very much! Very informative video without any unnecessary "lyrics". Thank you!

    • @pcbreflux
      @pcbreflux  6 років тому

      Thanks, think 20min are the limit to follow for most viewers, so have left out some additional footage like measuring all voltages and currents on the bench.

  • @Abrar_Ashraf
    @Abrar_Ashraf 2 роки тому

    Great Thank you for this video, very helpful. Love it.

  • @ratbagley
    @ratbagley 24 дні тому

    Good animations!

  • @TheMechatronicEngineer
    @TheMechatronicEngineer 2 роки тому

    Great video!

  • @tamyboy1
    @tamyboy1 5 років тому

    great video!

  • @tamyboy1
    @tamyboy1 5 років тому +1

    subscribed commented and thumbed up.

  • @cad3175
    @cad3175 6 років тому +1

    Thanks

  • @svenscheil902
    @svenscheil902 3 роки тому

    Great video! I'm want to separately PWM-control five 1.5W@12V LEDs. I decided to take a FPQ30N06L, but I'm not sure about the current limiting resistor I have to take to protect the ESP32. Could you give me the value?

  • @ant2190
    @ant2190 3 роки тому

    Can this method also be used to interpret a variable gpio voltage from 0-3.3v to get a varying output voltage( or current, however you want to look at it) from 0-12vdc? Think of using for 2-3 amp solenoid valves

  • @nkronert
    @nkronert 3 роки тому +2

    Thanks for the clear explanation. You're obviously very knowledgeable. Just one question from a MOSFET newbie: you first show on the left a circuit with one N-channel MOSFET which seems to do exactly what I'd like it to do. Then you go on building more and more complex circuits using both an N-channel and P-channel MOSFET, adding resistors and a Zener diode. Why would one want to do this? Are N-channel MOSFETs more limited from a max ratings point of view or is there a great advantage using the P-channel setup? Thanks!

    • @red2503
      @red2503 2 роки тому +2

      You can use it for a load which is connected to ground.

  • @itamar.vieira
    @itamar.vieira 3 роки тому

    Great video as always. In the case of a 12V N-Channel example, what MOSFET should be used? Thanks

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

      I would recommend Alpha Omega D424G.
      Max 20V. Rds(on) @gs 2.5V only 6.3mOhm !!!

  • @HelmutTschemernjak
    @HelmutTschemernjak 6 років тому

    For N or P Channel mosfets often I use AO3400 amd AO34001, they start with 2.5V and have a very low RDS(on), etc. maybe a better choice for you.
    What kind of zehner diodes have you received?

    • @pcbreflux
      @pcbreflux  6 років тому

      This was in my last received order (around 2000pcs):
      BZT52C11V SOD-123
      BZT52C6V8 SOD-123
      BZT52C10V SOD-123
      BZT52C9V1 SOD-123
      MM3Z6V8 sod-323
      MM3Z11V sod-323
      MM3Z3V3 sod-323
      MM3Z5V1 sod-323
      MM3Z9V1 sod-323
      MM3Z10V sod-323
      MM3Z11V sod-323

  • @ShopperPlug
    @ShopperPlug 2 роки тому

    Thanks for this tutorial, excellent explanation. I have an ESP32 microcontroller and needed to control high voltage motor using a MOSFET as a relay. Wanted to know if a MOSFET could be controlled at 3.3 volts from GPIO pin to turn OFF or ON a 12 volt DC motor. So from my understanding, I can directly connecting the GPIO pin to the mosfet without adding any resistor needed?

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

      Sure you can. I would use a 1k Resistor anyway to protect esp32 from over current.

  • @shanebekker
    @shanebekker 6 років тому

    Awesome tutorial. IF I wanted to switch on a battery device that only switch on when a contact opened that then powered an Arduino Pro mini to send a message before it switched off to save battery use would Mosfets be the way to go?

    • @pcbreflux
      @pcbreflux  6 років тому

      I am a little MOSFET affine so maybe a am biased. If you not already watched maybe this helps Latch ua-cam.com/video/nOGPfMO0PJY/v-deo.html and battery monitor ua-cam.com/video/-j04T_uVu8U/v-deo.html but see also the links in the description of the videos especial the link th Kevin Darrah.

  • @robertmis1142
    @robertmis1142 6 років тому

    Love

  • @mohamadalsadi7584
    @mohamadalsadi7584 2 роки тому

    I need use ESP32 for control of powered bobbin (24v-1A) what is transistor of the best for this ? I need only P-channel Mosfet without any addition , right ?

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

    What kind of Mosfet I can Use to operate with esp32. To control the 24v dc motor?

  • @electromaniaworld3179
    @electromaniaworld3179 6 років тому

    i amtryingfor OTA update for quite a while and no success yet.
    i am getting error-
    Sending invitation to 192.168.1.240 04:48:43
    [ERROR]: No response from device 04:48:43
    [ERROR]: No response from device
    any help?

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

    How to calculate the resistors, please tell me? Thank you

  • @vitaliyd193
    @vitaliyd193 6 місяців тому

    why focusing on P-CH mosfets? are not N-CH much more efficient, lower Rds??

  • @nockieboy
    @nockieboy 5 років тому

    Really bugged me, but it seems you've got your N and P MOSFET symbols mixed up in the video - at 4:33 all seems okay, but when you start to talk about the P-channel MOSFET at 4:52, the symbol for the P-channel MOSFET changes to an N-channel one! Is that just me? Looks like you've mixed up the P/N symbols after that too?

    • @pcbreflux
      @pcbreflux  5 років тому +1

      Hi, at 4:33 its about N-Channel an the low side (load to positive rail) and at 4:52 about N-Channel on the high side (load to negative rail) and why this is not working with a 3.3V GPIO Pin and a 3.3V rail. At ~6:13 is the switch to P-Channel and why you can use it on the hi side with a 3.3V GPIO Pin and a 3.3V rail. Some times you prefer a load not permanent connected to the positive rail, but on the other hand most N MOSFETs from the same type have lower Rdson (Ultra Low On-Resistance).

  • @beetleboy135
    @beetleboy135 6 років тому

    Any chance of a tutorial where some things we would like to learn can be incorporated? :-D
    I would love (under Arduino IDE) make use of the both cores, to do different tasks.
    Core 0 would have to deal with interrupts and according ISR's and timecapture (in micros()), and the second core 1 would have to deal with I2C LCD output and a neopixelstrip to make things visual. Core 0 should pass value in microseconds to core 1 to deal with. And based on this value, turn a neopixel on in a different color.
    I know it is a whole bunch of questions, and I even do not know if i could fit in one tutorial, but i would be great to see the real value of the ESP32 and the arduino IDE together in one setup as a project.

    • @pcbreflux
      @pcbreflux  6 років тому +1

      Hi, think mainly all of your needs are explained in the new video from Andreas Spies: ua-cam.com/video/k_D_Qu0cgu8/v-deo.html

    • @beetleboy135
      @beetleboy135 6 років тому

      Yes indeed, awesome tutorial video, so much to learn from
      Question : the mentioned esp32_rtos_sdk is that different from the Arduino ESP32 toolchain?

    • @pcbreflux
      @pcbreflux  6 років тому

      Hi, the RTOS is part of the ESP32 arduino sdk. So it's a addon to all arduino functions and classes if used for the esp32.

  • @RetiredRhetoricalWarhorse
    @RetiredRhetoricalWarhorse 3 місяці тому

    The trick with this video is running it at 1.5times speed.

  • @ManInTheBigHat
    @ManInTheBigHat 6 років тому

    My favorite ua-cam.com/video/W_Ut2OUw9uw/v-deo.html. from pcbreflux .
    Instant CLASSIC!

  • @florians684
    @florians684 2 роки тому

    your english is not the yellow from the egg (Kleiner spaß ;) Danke für das Video)