-1
\$\begingroup\$

Did I draw my circuit correctly?

My project consist of one 5 V solenoid (but uses 3.3 V), one voltage regulator (5 V to 3.3 V), one diode, two N-channel MOSFET transistors, and one 5 V LED strip all control by a Raspberry Pi zero. According to my power supply it said the solenoid pulls 0.75 A at 3.3 V and the LED strip pulls 0.19 A.

I was planning to use only one resistor with each MOSFET, but someone told me I should get a low-value resistor between the Raspberry Pi's GPIO pins and the MOSFET and another high-value resistor between the gate and source to discharge the gate and turn off the MOSFET when I no longer send a signal to it.

Is that correct? I also read someone saying that if you don't put a resistor, you would have to make sure the current flowing into the input capacitance of your MOSFET will not burn your driver. However, most MOSFETs are self-regulated to not burn, and this can end up just slowing switching speeds.

Also this is my first time making a circuit diagram on my own, please critique me if it looks awful and wrong! enter image description here

Here's a old sketch if this helps picture what I'm trying to explain enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Welcome! There are some connections you may want to break: M1 drain to its own gate. M1 drain to gnd. R4 right-side pin to gnd. You might want to put values for each resistor. Also, is the solenoid rated for 5V or 3.3V? If 5V, then probably belongs on the 5V side of the voltage regulator. \$\endgroup\$ Commented May 14 at 22:07
  • \$\begingroup\$ Hi Fabio, Thank you! I edited my post a little bit to make it clearer. The solenoid's max is 5V, but it gets too hot, so I'm using 3.3V. This is my first draft so I'll definitely put values but I just wanted to know first if my circuit is right. I thought for a N channel MOSFET that I have the M1 source to gnd, did I swap it? Also do you recommend a better placement for R4 that doesn't interference with the line I have from the regulator to ground? \$\endgroup\$
    – alxzhu
    Commented May 14 at 22:52

2 Answers 2

2
\$\begingroup\$

Suggest remove these wiring joints (dots) as per the diagram below:

enter image description here

The LED strip pulls 0.19A?? That seem to me to be too much current for a LED strip, I would expect something 10 times smaller, say, 2mA to 20mA. What is the lowest current it needs to provide the light you need? If 1mA to 3mA is sufficient, then insert a resistor between LED cathode and MOSFET, set this to about 1kΩ to start with, and adjust this value to give you the light output required.

Also, try these values for resistors:
R3, R2 = 10kΩ
R1, R4 = 1kΩ

How fast will you be switching the output at node GPIO, will it be over 1kHz? If yes, then you may need a buffer between the GPIO node and the MOSFET gates; this post will help you with that:
https://electronics.stackexchange.com/a/712545/341959

Good luck, and let us know how it went.

\$\endgroup\$
7
  • \$\begingroup\$ Hi, I posted an updated post bc this one got closed if u want to see! I'll measure what's the lowest amount of current the LED strip needed when I return home but I think it's so high because I turned the current on max for some reason XD. Using Ohm's Law, I put a 200 ohm resistor between the LED strip and MOSFET, would it be better if I tried 1k first? Also thank you for the help and link, I'll start reading! \$\endgroup\$
    – alxzhu
    Commented May 20 at 20:45
  • \$\begingroup\$ Yes, it is always bettter to run LEDs with a small current first, then increase current if light output is not sufficient. So, yes, try the 1k first. \$\endgroup\$ Commented May 20 at 20:57
  • \$\begingroup\$ Where is the updated post? \$\endgroup\$ Commented May 20 at 20:57
  • \$\begingroup\$ electronics.stackexchange.com/questions/713864/… \$\endgroup\$
    – alxzhu
    Commented May 20 at 22:05
  • \$\begingroup\$ it pulls 0.19A :/, maybe I'm measuring it wrong! \$\endgroup\$
    – alxzhu
    Commented May 21 at 20:59
0
\$\begingroup\$

I assume the source of M2 is connected to ground? I'm not sure what you are referring to when you say that MOSFETs are "self regulating" but a resistor to control current entering or leaving the gate is usually a good idea. Also the GPIO signal to M2 looks like it's accidentally creating two very problematic junctions on its way there. M1 and M2 should be logic level MOSFETs (are you driving them with 5 or 3.3V?). Make sure the datasheet specifies operation at the voltage you intend to use; a 200 microamp Ids at 4.5 Vth does not indicate logic level operation.

\$\endgroup\$
1
  • \$\begingroup\$ Hi, yes, M2 is supposed to be connected to the ground. I meant to say it is supposed to self-regulate and not burn itself. I fixed that in the post. My apologies. My solenoid is running on 3.3V and my LEDs are running on 5V. I'll look at more circuit examples with logic level operations and fix it but do you mind explain more about what you mean 200mA Ids at 4.5 Vth? I'm not sure what you mean \$\endgroup\$
    – alxzhu
    Commented May 14 at 22:12

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