MOSFETs and Transis...
 
Notifications
Clear all

MOSFETs and Transistors with Arduino


DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 3 years ago
Posts: 1114
Topic starter  

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


Quote
Duce robot
(@duce-robot)
Honorable Member
Joined: 3 years ago
Posts: 673
 

Awesome video ! Can't say enough about how much I learn from this channel!     😁👍


Centari liked
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

I tried to download the pdf on the blog but it failed. Maybe the URL has changed?

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Biny
 Biny
(@binaryrhyme)
Reputable Member
Joined: 8 months ago
Posts: 270
 

@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.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

@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

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

Never mind, the pdf link at the bottom of the page works, it's only the button at the top that fails.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Will
 Will
(@will)
Noble Member
Joined: 1 year ago
Posts: 2017
 

@ronalex4203 

Maybe this is the document you're looking for ?

https://s3.amazonaws.com/download.dronebotworkshop.com/DBWS+-+Arduino+High-Current+Interfacing+–+Transistors+%26+MOSFETs.pdf

I was kidnapped by mimes.
They did unspeakable things to me.


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

@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.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
boggiano
(@boggiano)
Active Member
Joined: 2 years ago
Posts: 17
 

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!

 

 


ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 3 years ago
Posts: 1114
Topic starter  
Posted by: @binaryrhyme

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


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

@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.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
JS
 JS
(@js)
Eminent Member
Joined: 3 months ago
Posts: 23
 

@boggiano You may want to try a basic transistor to switch low current like a relay or LED..

Check out the link below.

    https://electronics.stackexchange.com/questions/403042/how-can-i-use-a-transistor-2n2222-to-act-as-a-switch-with-this-12v-momentary-s

J.S.

John Spear


ReplyQuote
boggiano
(@boggiano)
Active Member
Joined: 2 years ago
Posts: 17
 

@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! 😀 )


ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
 

@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.

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
boggiano
(@boggiano)
Active Member
Joined: 2 years ago
Posts: 17
 

@zander thanks and sorry for the thread hijacking.

 


ReplyQuote