danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Mon Feb 04, 2019 7:13 pm

You need a load on the gate. If you touch the gate with the 3.3V. It will turn on.

This is what you describe right?

Then you need to discharge the gate. Use a load resistor. A resistor attached to ground on one side and the gate on the other.

Or simply use a gnd wire and touch the gate. It should turn off.

If it works then you need to check if you toggle the correct gpio when you have your gpio connect to it.

Please figure out how your multimeter works. Check it against the 12V.
Your picture is ok but I will connect the ground directly . Not with a resistor in serie! I will put the resistor on the gpio. Looks the same until you used another gpio on the circuit.

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Mon Feb 04, 2019 7:25 pm

Are you using python for your code?

According to your picture you are using GPIO21 which is pin 40.

Did you set the correct GPIO mode if you are using RPi.GPIO ?

If the touch with a wire using 3.3V and GND toggles your valve could you try this python script

Code: Select all

#!/usr/bin/env python3

import RPi.GPIO as GPIO
import time

GPIO_COIL = 21
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_COIL,GPIO.OUT)

print("Press ctr-c to quit")

try:

  while True:

    GPIO.output(GPIO_COIL,True)
    print("COIL  ON\r",end="")
    time.sleep(1)

    GPIO.output(GPIO_COIL,False)
    print("COIL OFF\r",end="")
    time.sleep(1)

except KeyboardInterrupt:
    pass

print("")
python3 togglecoil.py

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Mon Feb 04, 2019 7:58 pm

Ok. Thanks so much! Had to walk away for about 2 hrs (appt), but super-excited to get back and finish this up...

I obviously have to figure out hardware (your reply 1) before the Python stuff, but I didn't know about that PCM mode change.

Not sure exactly where you're saying to move the resistor, though.

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Mon Feb 04, 2019 9:12 pm

RPi to Mosfet.png
Rpi with a mosfet to activate a selenoid
RPi to Mosfet.png (79.72 KiB) Viewed 953 times
I added a 10K resistor to discharge the gate if you disconnect the GPIO from the gate.

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Mon Feb 04, 2019 11:36 pm

Another project delay now. Pretty sure I blew out the entire RPi. When I left for my appt, it worked fine. I unplugged everything, because I'm careful like that. Came back, plugged it in and...nothing. No Wifi apparently, no monitor, no yellow activity light, SD Card contents seem as fine as I'd expect (viewing EXT3 content on a Windows box, anyway)...so...@#$%$@^.

Ordered another via Amazon. Take 2 days. Then back at it. So...pause.

Thanks a million for all this support, folks. :-)

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Wed Feb 06, 2019 3:27 pm

I don't want to break another RPi...or maybe it wasn't even me.

My new Rpi should be here sometime today...and I'm already thinking (of course), did I break it or do they sometimes just go bad (defect)? The last time it was fine, I was touching the gate wire (literally, the resistor end directly under your GPIO21 label in the photo above) against the 3.3V pin on the GPIO...and, as I noted, I'd get 1 "response" from the solenoid. I wonder, if anything, if it's possible that I linked the 5V GPIO pin with the 3.3V pin and if that would've caused a short.

Importantly, though, the RPi still worked after several of these tests. I left and it was working and came back later and it was not...no Wifi, no monitor, nothing. I did, though, install Ubuntu on a spare hard drive I had, and then hook the Raspbian SD Card up to it and got my code..whew!...so I'm NOT thinking it was a software failure. (I'm thinking I may do some research on looking at log files that probably exist somewhere to maybe figure out the cause for the failure, though...but I know that's not part of this thread).

Anyway, here's a photo of what I think are the two "paths" of electricity from the RPi. Yellow from GPIO21 through that resistor to the GATE on the FET, then back out through the SOURCE to the...power supply AND the GPIO GND pin...and the Red from the same GPIO21 pin (of course NOT the hole as it looks, lol) through the [new] resistor and then immediately back to the same 2 places: power supply and the RPi GND pin.

I am VERY confused about the GND T'ing to 2 separate places: the GPIO GND pin AND the power supply GND pin. To a newbie, this feels like the exact kind of danger that defeats the purpose of the FET. I though the whole purpose was to allow the Rpi to interface with its' very low voltage to JUST the gate on the FET, so that a device, with who-knows-what-voltage inferfaces independently with the FET (i.e. if the FET specs allow for the starting of even a car motor or a house air condition or whatever, so be it...the RPi wouldn't even know about that part...totally only interfacing electrically with the GATE...but I'm obviously wrong.

Anyway, that's the long way of asking, Is my new RPi protected from shorts with this setup?
Attachments
Solenoid_GPIO.jpg
Solenoid_GPIO.jpg (46.08 KiB) Viewed 896 times

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Wed Feb 06, 2019 5:12 pm

I notice on one of your picture that the resistor was on the ground instead of the GPIO. Then The Raspberry Pi wasn't really at the same ground level than the rest of your setup.

Check this image https://imgur.com/DUVjwYr

You have a kind of faulty ground there.

The GPIO has no resistor to limit the current. so this is a no go at first.

Also it is possible to add a diode 1n4148 at the gate to limit the voltage to 5V. Since we have a resistor divider made by the two resistors it will limit the voltage to 3.3V. Anode to the gate and cathode to 5V supply. You should add another resistor to the gate in serie to limit the current if it goes above 5V.
ProtectionDiode.png
Protection diode
ProtectionDiode.png (111.79 KiB) Viewed 885 times

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 12:25 am

I only sort-of get it. If I connect the 5V pin at all, it will give constant voltage; I want to CONTROL the voltage, only sending through BPM mode in software here and there.

So, would I add a diode in-line with the wire to GPIO 40?

The question still is, 2 grounds?...going to the same place? I feel like these should be 2 separate circuits...1) the gate and 2) the source/drain. That T is very strange to me.

UPDATE:

I got frustrated and took both power sources away...no Rpi, no power source; used 2 9V batteries instead. I left the gate plugged into POS and NEG the whole time and by disconnecting/connecting the POS wire from the power source directly to the solenoid, it toggled the solenoid up and down as I need. Tomorrow, I'll rewire the whole thing opposite. NEGATIVE will go directly to the solenoid from Power source and POS with be gated through the MOSFET.
Last edited by theitguyfromny on Thu Feb 07, 2019 2:51 am, edited 1 time in total.

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 1:20 am

I only sort-of get it. If I connect the 5V pin at all, it will give constant voltage; I want to CONTROL the voltage, only sending through BPM mode in software here and there
No! the diode is in reverse. It will just prevent the gate , if the mosfet burned, in will prevent more than 3.3V on the GPIO.
Normally the diode won't do a thing. It is just in prevention. If the mosfet burn and 12V goes to the gate, the resistor 1K will limit the current to 7ma and it will go through the 5V supply. 7ma for the raspberry pi will be quickly absorb and the regulator on the Raspberry pi will deal with it.

The question still is, 2 grounds?...going to the same place? I feel like these should be 2 separate circuits...1) the gate and 2) the source/drain. That T is very strange to me.
the mosfet at the source is the reference ground. The drain side need the loop from the 12V to the valve to the drain , to the ground.
The gate need a loop also from source to GPIO , to the resistor and to the gate.

You have to always close the loop for current.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 3:36 am

theitguyfromny wrote:
Sat Feb 02, 2019 2:36 pm
2) a RFP30N06LE 30A 60V N-Channel Power Mosfet from Amazon
3) a DC12V Solenoid Valve. non-computerized test, Works perfect!
The plan here is to simply control this with my RPi/MOSFET.
(a) I think I need at least 1 resistor somewhere.
(b) If so, where, what size, and why?

Power MOSFET RFP30N06 Learning Notes

So your problem is how to play with the FairChild RFP30N06.

First thing first, let us check out the datasheet.

https://penzu.com/p/8ef0e7c8

/ to continue, ...
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 4:00 am

tlfong01 wrote:
Thu Feb 07, 2019 3:36 am
Power MOSFET RFP30N06 Learning Notes
So your problem is how to play with the FairChild RFP30N06.
First thing first, let us check out the datasheet.
https://penzu.com/p/8ef0e7c8

Rpi GPIO driving IRF540N Power MOSFET

A couple of weeks ago I did something similar - Rpi driving IRF540N.

I forgot the details, except I fried a power supply.

Now let me read my old posts to refresh my memory, ...


Rpi GPIO driving IRF540N Power MOSFET by tlfong01 2019-Jan-15
https://www.raspberrypi.org/forums/view ... 4#p1416399
https://www.raspberrypi.org/forums/view ... 4#p1416412
https://www.raspberrypi.org/forums/view ... 4#p1416619
https://www.raspberrypi.org/forums/view ... 4#p1416932
https://www.raspberrypi.org/forums/view ... 4#p1416940
https://www.raspberrypi.org/forums/view ... 4#p1417090
https://youtu.be/pmLlhG_-6BU
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 7:25 am

tlfong01 wrote:
Thu Feb 07, 2019 4:00 am
Rpi GPIO driving IRF540N Power MOSFET
A couple of weeks ago I did something similar - Rpi driving IRF540N

IRF540N Driving GB37528-70 Motor

You may like to check out my schematic below.

https://penzu.com/p/fcffa2a1
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 7:56 am

tlfong01 wrote:
Thu Feb 07, 2019 7:25 am
IRF540N Driving GB37528-70 Motor

Timer NE555 > Power MOSFET IRF540N > 12VDC Motor 37GB528-70

https://penzu.com/p/ee23c072 (penzu)

https://youtu.be/uLnZqEHCLNM (youtube)

/ to continue, ...
...
Attachments
motor_37gb52870_2019feb0702.jpg
motor_37gb52870_2019feb0702.jpg (125.02 KiB) Viewed 810 times
Last edited by tlfong01 on Thu Feb 07, 2019 8:42 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 8:38 am

tlfong01 wrote:
Thu Feb 07, 2019 7:56 am
Timer NE555 > Power MOSFET IRF540N > 12VDC Motor 37GB528-70
https://penzu.com/p/ee23c072
https://youtu.be/uLnZqEHCLNM

Rpi GPIO Pin 11, after converting to 5V, driving Power MOSFET IRF540N and Motor 37GB52870 OK

This is the full program listing.

https://penzu.com/p/a3258be9 (penzu)
...
I am an electronics and smart home hobbyist.

User avatar
Gavinmc42
Posts: 2882
Joined: Wed Aug 28, 2013 3:31 am

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 8:41 am

An optocoupler driving the gate will help.

If that Solenoid diode cannot handle the spikes then there will be induced spikes everywhere.
Solenoids are not much different than those ignition coils in cars, zap.

Try to electrically isolated high voltage/high current stuff from low voltage Pi's.
Opto relays make it simple and safer.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 9:38 am

Gavinmc42 wrote:
Thu Feb 07, 2019 8:41 am
An optocoupler driving the gate will help.
If that Solenoid diode cannot handle the spikes then there will be induced spikes everywhere.
Solenoids are not much different than those ignition coils in cars, zap.
Try to electrically isolated high voltage/high current stuff from low voltage Pi's.
Opto relays make it simple and safer.

IRF540N Back EMF Detection Results

I forgot if I checked the solenoid valve flyback spikes. But this time I am checking the power MOSFET switching 30mA of motor current.

It appears the MOSFET eats the 12V 30mA flyback spike like a piece of cake.


https://penzu.com/p/70597a2f (penzu)

Nothing interesting happens, so I will take a break and go back to play with the more exciting ECG thing.

https://www.raspberrypi.org/forums/view ... 5#p1426460
...
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 10:18 am

tlfong01 wrote:
Thu Feb 07, 2019 9:38 am
Nothing interesting happens, so I will take a break and go back to play with the more exciting ECG thing.

Hardware Debugging Suggestions

Before I go, perhaps I might share some hardware debugging tips.

Bon Qui Qui - I will cut you - 62,967 views
https://www.youtube.com/watch?v=sS2q6xIDRUc

/ to continue, ...
...
Attachments
power_mosfet_debugging_2019feb0701.jpg
power_mosfet_debugging_2019feb0701.jpg (132.86 KiB) Viewed 793 times
I am an electronics and smart home hobbyist.

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 5:08 pm

I see you have something (small orange box-ish thing...a Mylar capacitor??) on the gate of the NPN connected to your motor. I'm guessing w/o it, you'd have the same problem as me. Although a stepper has different electrical input properties than a solenoid, of course. (I have one of those and actually solved all my problems with a HAT from Adafruit. love it, works great.

In another post... https://electronics.stackexchange.com/q ... t-turn-off

...somebody has the same problem as me. Even when I use 9V batteries for all this (no Rpi...taking it back to simple for debugging), the solenoid turns on just once. I have to remove power source from it to reset everything back.

And then the recommendation comes out to add a capacitor...and I'm going to buy some immediately, because I only have a 10uF available to me (and that example, person is recommending a "large electrolyte capacitor (at least 220uF-470uF) near the motor's terminal from Vcc to GND and in parallel ceramic SMD as much higher you can find." <-- honestly not even sure if that means 1 cap. or 2??

...I'm not sure where to even look in spec sheets/etc to find out what size I'd need to "handle" this scenario...but it makes sense that the solenoid is "holding" power on purpose (to keep it in a position that is NOT its' unpowered position.)

Anybody have any educated guesses on the size capacitor I'd need, or if that's not even the problem here.

..and, without a huge debate [please..pretty-please], should I buy ceramic/aluminium/mylar/?other? capacitors? I'm seriously immediately going to buy a box from Amazon to deliver tomorrow as soon as I get a response. Is this ok?...

https://www.amazon.com/Hilitchi-Metalli ... itor&psc=1

User avatar
Burngate
Posts: 5863
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 7:02 pm

theitguyfromny wrote:
Thu Feb 07, 2019 12:25 am
The question still is, 2 grounds?...going to the same place? I feel like these should be 2 separate circuits...1) the gate and 2) the source/drain. That T is very strange to me.
There's only one ground - because "ground" is the point of reference for all voltage measurements.

As an output, a GPIO will attempt to maintain either 0v or 3v3 compared to ground, defined as the pin on the Pi, sinking or sourcing current in order to do so.
In danjperron's diagram, it will source 0.33mA through the 10k resistor, and that current will go back into the Pi at the ground pin.

In the process, it will take the gate of the FET up to 3v3, and the voltage difference between the gate and the source will (hopefully) reduce the resistance of the drain-source silicon to close to zero.

Current will then flow from the +12v, through the solenoid, through the grey wire, the FET's source, drain, black wire and back to the -12v.

The problem you're anticipating is that there's a path through which both the Pi's GPIO current and the solenoid current flow.
If the resistance of that path is non-zero (which it must be - copper wire isn't perfect, and nor is the pin of the FET) then the pin of the FET may not be at ground. The -12v as measured at the screw terminal will also not be at ground, but that shouldn't matter.

You can't avoid having some resistance between those three points - the Pi's ground pin, the FET's source, and the -12v, though you can make it as small as possible. By doing so, you limit the effect of the solenoid current on the gate-source voltage.

And, because the two current paths only coincide round the FET, no voltage will be created that can damage the Pi.

If you want to isolate the current paths completely, you could use an optoisolator.

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Thu Feb 07, 2019 9:20 pm

OMG! I got it!

So I went back to this video:
https://www.youtube.com/watch?v=BICMGcNw55g&t=87s

Guy touches the gate with finger (sending some minor "human" voltage) which activates it ("closes" it)
*** To open the gate back up **, he has to touch both the gate AND THE SOURCE with his fingers...which dis-activates the gate.

So...I ran a second GPIO wire to the source (with an in-line resistor, of course)...and when I turn on just the gate (GPIO.HIGH) it turns on.
When I then GPIO.HIGH both the pins, it turns off. :D I HAVE TO include a time.sleep(.1) between GPIO.HIGH and GPIO.LOW (for which I'll test the minimum of), but by sending either one HIGH or both of them HIGH (and then right back LOW again), I toggle it back and forth...and I presume I could toggle ANY 2-wire device from the Raspberry PI the same way.

I'll still be concerned with long-term protection of the RPI (I have the diode between the + and - and the 2 lines coming from the Pi with resistors).

Thanks again, all

BTW: My test code is:

Code: Select all

import RPi.GPIO as GPIO
import time

purple_wire = 22 #the one in the middle...purple
green_wire = 40 #the one at the bottom...green

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)

GPIO.setup(purple_wire,GPIO.OUT)
GPIO.setup(green_wire,GPIO.OUT)

x = .01

input('Turn it on...')

# to turn the solenoid ON
GPIO.output(purple_wire,GPIO.HIGH)
time.sleep(x)
GPIO.output(purple_wire,GPIO.LOW)

input('Turn it off')

#to turn it back off
GPIO.output(purple_wire,GPIO.HIGH)
GPIO.output(green_wire,GPIO.HIGH)
time.sleep(x)
GPIO.output(purple_wire,GPIO.LOW)
GPIO.output(green_wire,GPIO.LOW)


input('Turn it on')
# to turn the solenoid ON
GPIO.output(purple_wire,GPIO.HIGH)
time.sleep(x)
GPIO.output(purple_wire,GPIO.LOW)

input('Turn it off')

#to turn it back off
GPIO.output(purple_wire,GPIO.HIGH)
GPIO.output(green_wire,GPIO.HIGH)
time.sleep(x)
GPIO.output(purple_wire,GPIO.LOW)
GPIO.output(green_wire,GPIO.LOW)

input('done playing')

GPIO.output(purple_wire,GPIO.LOW)
GPIO.output(green_wire,GPIO.LOW)

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Fri Feb 08, 2019 12:00 am

Guy touches the gate with finger (sending some minor "human" voltage) which activates it ("closes" it)
*** To open the gate back up **, he has to touch both the gate AND THE SOURCE with his fingers...which dis-activates the gate.
This is what I meant . You need to discharge the gate. The gate is acting like a capacitor and depending of the gate-source voltage the resistance between the source and the drain change.

so when he touches the gate with his finger he was charging the gate. if you leave it like it was then the gate is charge. It's like charging a capacitor et leave there. So by touching the source and the gate he was discharging it. there is pratically no current going to the gate except to charge it.
I'll still be concerned with long-term protection of the RPI (I have the diode between the + and - and the 2 lines coming from the Pi with resistors)
No problem at all. even if the mosfet burned and the gate goes to 12V you won't burn the GPIO.

But. ******* you need to ground the source and the PI at the same potential ***** Not like your picture with a resistor between the two grounds.

theitguyfromny
Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Resistors and MOSFETs and fire-prevention, oh my

Fri Feb 08, 2019 1:15 am

I'll take a few more "almost end of thread pics" and see if anyone sees anything else obviously wrong/missing/dangerous.

The FET was getting real hot before (too hot to touch), but not w/ the set up I have now, I don'think. I'll have to check again. I think it's because I was keeping the solenoid in its'open, non-default, position.

I have to believe there's ways to keep FETs cooler..but that's a different thread.

User avatar
Gavinmc42
Posts: 2882
Joined: Wed Aug 28, 2013 3:31 am

Re: Resistors and MOSFETs and fire-prevention, oh my

Fri Feb 08, 2019 1:24 am

If the fet is getting hot then it is probably in the analog region.
A higher gate voltage turns it on more and so the resistance goes lower and hence heat goes down.

Most fets will have a 10 V gate voltage so driving them with 3V3 does not turn them on enough.
There are chips called gate drivers designed just to turn on/off fets
A logic level fet is designed to go on at a lower voltages.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

danjperron
Posts: 3307
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Resistors and MOSFETs and fire-prevention, oh my

Fri Feb 08, 2019 1:39 am

If you read his last post it is not getting hot right now and this mosfet could drive up to 20A at 3V according to the speck.

In my point of view all his problem was a faulty ground! He didn't hook up the ground of the Raspberry Pi and the ground of his 12V correctly.

He is using a RFP30N06LE! Not all mosfet needs 10V to the gate to be fully ON.

And on this particular mosfet the maximum source drain Voltage is 10V. So I won't put 10V on this gate. I will be exactly at the maximum limit of the spec!

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Resistors and MOSFETs and fire-prevention, oh my

Fri Feb 08, 2019 6:53 am

theitguyfromny wrote:
Thu Feb 07, 2019 5:08 pm
should I buy ceramic/aluminium/mylar/?other? capacitors? I'm seriously immediately going to buy a box from Amazon to deliver tomorrow as soon as I get a response. Is this ok?...

Power MOSFET Capacitors

Suggestion
Yes, go ahead and buy a big box, but only for your future projects, not for the one you are now messing around. I am 95% sure you don't need any capacitors.

My fact check yesterday
I applied Rpi GPIO Pin 11 3V/0V High/Low signal at 1Hz direct (no logical level up shifting, no Cgs, no Rin, no Rgs, no nothing) to the power MOSFET IRF540N gate.

At Vgs = 3V, IRF540N (Vth(gs) = 4V max) opened its gate a little bit, perhaps less than 10%, but more than enough for 30mA to flow from Vdd +12V to motor 37GB820-70, then to Drain, then passed through the barely opened Gate, then to Source, then hit Ground. The motor turned at 70 rpm full speed happily.

No smoke came out! :mrgreen:
I am an electronics and smart home hobbyist.

Return to “Beginners”