Today we will learn how to use Transistors and MOSFETs to enable our Arduino to switch high-current DC loads, including a 12-volt RGB LED Strip Light.
Article at https://dbot.ws/bjtmosfet
Transistors are the basic building block of modern electronics. Just about everything uses transistors, including the Arduino itself.
Using a power transistor or MOSFET we can drive high-current devices using the logic-level outputs from our Arduino. Today we’ll learn to use both devices.
We will start with a simple transistor switch, you’ll see how easy it is to switch a high-current DC lamp using a popular power transistor.
Inductive loads like motors and relays present an additional challenge, as these devices generate a “back-EMF” that we need to deal with. We’ll use a diode to take care of the back-EMF and build a simple motor speed controller.
We will then turn our focus to MOSFETs. MOSFETs have a number of advantages over standard transistors. We will learn how to use popular MOSFET modules to control an RGB LED Strip in a simple but colorful experiment.
Here is what is in today's video:
00:00 - Introduction
02:49 - Transistors and MOSFETs
16:23 - Transistor Switching Demo
22:54 - Transistor Motor Control
29:52 - MOSFET RGB LED Strip Light Control
Please note that transistors and MOSFETs are great for controlling DC loads, but not AC. I’ll be showing you how to control AC loads in a future video.
"Never trust a computer you can’t throw out a window." — Steve Wozniak
Awesome video ! Can't say enough about how much I learn from this channel! 😁👍
I tried to download the pdf on the blog but it failed. Maybe the URL has changed?
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@ronalex4203 For me, the "dbot.ws" domain used to do a lot of the link redirects seems to be down. Sometimes you can just substitute in "dronebotworkshop.com" for the "dbot.ws" - as it seems to be an domain alias, but in this case, that didn't get me anywhere either.
Tagging @dronebot-workshop on this, just in case this is a new thing.
I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.
@binaryrhyme I knew about that and tried it, but it still comes up not found BUT that msg is on a the blog home page not a browser error so it's just the after the / error. The link might be a is a shortened link. This is the part that now fails. /2QnDxgG
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Never mind, the pdf link at the bottom of the page works, it's only the button at the top that fails.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@ronalex4203
Maybe this is the document you're looking for ?
Experience is what you get when you don't get what you want.
@will Yep, that looks like the link in the Resourcesw section at the bottom of the page, I tried the button at the top of the page before I found the resources section. I got it, hopefully Bill sees the convo so he can fix.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Hello,
I am quite a bit confused.
I tried a MOSFET IRFZ44N as switch.
From the DS, watching the front of it I see the pinout as:
1- GATE
2- DRAIN
3- SOURCE
So, I connect A 203 POT to the gate, DRAIN to GND, as SOURCE to 330 ohm res, a LED and 5V.
As soon as I connect the MOSFET the LED turns on (OK!) but if I unplug the GATE the LED stills ON!
I unplugged the the GATE and all my MOSFETS work in the same way: the LED stays ON.
It should be an N-channel enhancement MOSFET so it should stay "normally off" until a Voltage at the GATE., does it?
Thanks!
For me, the "dbot.ws" domain used to do a lot of the link redirects seems to be down. Sometimes you can just substitute in "dronebotworkshop.com" for the "dbot.ws" - as it seems to be an domain alias, but in this case, that didn't get me anywhere either.
That was a domain name that I used to own, and I used it for a link shortener. However, the link shortener stopped working, so I cancelled the domain last year.
I THOUGHT I had edited all the links back to the correct value, but obviously I missed a few - there were literally hundreds of them on the website and on YouTube. I'll have to do a sweep of the website and correct the ones that are still using dbot.ws.
Substituting dronebotworkshop.com for dbot.ws really shouldn't work, except in a few cases where I happened to use the same slug for both the URL and the link shortener.
Thanks for bringing it to my attention!
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
@boggiano If I am understanding, an N channel MOSFET has the Source at Ground, the Drain connected to the NEGATIVE side of the load and the Gate a positive voltage to turn on the device. When the device turns on, the load negative side (Drain) is connected to the Source which is ground, thus completing the circuit.
BTW, you are posting on Bill's video topic, you should really start your own topics for new things to discuss.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@boggiano You may want to try a basic transistor to switch low current like a relay or LED..
Check out the link below.
J.S.
John Spear
@js Thank you for the article.
I have already used BJT in order to have a switch for relay and motor.
This is the first time I tried yo use a MOSFET and I tried the first one I had in my drawer and I made a mess! 🤣 Wrong pinout ad, worst, wrong Vgs, so I had latch-up, too!
But I am learning from errors (I hope! 😀 )
@boggiano Remember if it's an N chan MOSFET then the Source goes to ground, Drain goes to load -ve and when you give the gate some +ve volts (5?) the MOSFET will conduct.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting