1

I have my GPIOs doing PWM with pi-blaster.

Now I just need to figure out the wiring. I checked over electrical engineering, and found this question: https://electronics.stackexchange.com/questions/213914/using-mosfet-as-switch, but it hasn't helped me.

I also read through this: http://bildr.org/2012/03/rfp30n06le-arduino/

Anyways, this is, to the best of my knowledge, how I'm supposed to translate the links above into something real:

enter image description here

The issue is, it's not working. What needs to change in this diagram for it to be functional?

P.S. Please don't tell me to go over to Electrical Engineering, the expected baseline of knowledge there is way above this pi hobbyist's education.

1

I just want to post this here to help other absolute beginners like me. The circuit above is correct and imperfect. But if it isn't working, here are some cases to check:

My issue was the breadboard being finicky. If a single connection point on a breadboard is at the whim of chance (as in you have to wiggle it a bit to get a connection), then that's the chance you won't have a working circuit. Those chances compile too.

But also, if you're trying to get a circuit like this working, it is important to read the answer above about getting the right MOSFET. What matters most in a scenario like this is the minimum threshold being below 3.3V. Also, use an N-Channel MOSFET.

Finally, it is good practice (as said in the answer above) to have a resistor connecting the Gate and Source. I'll update this later with the resistor type that I know works (once I've found it). I believe it's because connecting these helps ensure that the MOSFET defaults to off if something goes awry.

0

You have not specified what MOSFET. Most will NOT switch reliably with 3.3V.

There are a few models which will work.

NOTE You should check the SDG, as there is no standard.

You should ALWAYS include a resistor (~100kΩ) between G and S.

See http://elinux.org/RPi_GPIO_Interface_Circuits#Using_a_FET

  • The MOSFET I have is correct. It is meant for 3v3 to 5v. Are you saying the thing I'm missing is a resistor between G and S, and that is it? I tried that to no avail. – Seph Reed Aug 9 '17 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.