r/ArduinoHelp • • Nov 02 '26

solenoid project connectivity help

hiii i have a question, im trying to build a 12V solenoid powered refreshable braille device and idk how to go about it. is the connection in the first or second better? im using a irlz44n mosfet

1 Upvotes

51 comments sorted by

View all comments

Show parent comment

1

u/not_its_me Nov 02 '26

forgive me for asking but the gate doesnt connect to ground right? isnt gate the green wire? did you mean source or am i misunderstanding? and as for connecting the solenoid to +5 directly, i need to use 6 solenoids in this project. im starting with js one for now.

1

u/CueAnon420 Nov 02 '26

The mosfet is like a remote control switch that connects the Drain and Source pins together when the Gate sees the trigger voltage. The drain is connected to the negative wire of the part you want to control (solenoid) and when the Gate sees the tirgger coltage it completes the circuit by connecting the Drain to the Source (which is the power ground). It's the same idea as if you put a simple switch between the solenoid negative wire and the power supply ground.

Mosfets are triggered by voltage at the Gate - but because they have internal capacitance, the gate likes to be 'pulled down' to ground to keep it off. That is why you connect a 10K resistor between the Gate and ground. When the Arduino wants to turn on the solenoid, it sends 5V out the pin (preferrably through a small 100 ish ohm resistor for protection) to the gate - this overcomes the 10K 'pulling down' and the Gate sees the +5V and connects the Drain and Source pins together. When the Ardino is done, it removes the 5V and the 10K resistor helps 'pull' the Gate back down to ground. Without the 10K resistor, the Gate can 'float' and find itself at some random value.

So - to your question - you DO WANT the gate tied to ground through a 10K resistor. The Arduino pin goes through a ~100 ohm resistor and then also to the Gate pin.

ALSO - try this without the Arduino pin (green wire)... Connect a 10K resistor from the mosfet gate to ground, Drain to solenoid black wire and Source to common ground. Then take a wire and touch 5V from the Arduino board to the mosfet gate. The solenoid should pull in without the Ardunio controlling it. Once you get this far, remove the 5V wire from the mosfet and go back to trying the Ardunio to control the gate.

EDIT - all this assumes you have confirmed that the 12V supply is capable of operating the solenoid and it pulls in correctly if you hard wirer the solenoid to the power supply.

1

u/not_its_me Nov 02 '26

yes my 12V supply has 4.5 or 5A each solenoid requires only 0.4A

1

u/not_its_me Nov 02 '26

is this what you meant?

1

u/CueAnon420 Nov 02 '26

Yes ;-)

That should work. And you should be able to prove it by removing the green wire from the Arduino pin and touching it to the 5V rail from the Arduino board (basically acting like the program pin by hand). That should turn on the solenoid - if it doesn't, that mosfet may be bad (which can also be confirmed by using a wire to jump the Drain and Source pins together).

1

u/not_its_me Nov 02 '26

okayyyy tyyyy im gonna try it ill update in some time. lets hope i dont end up blowing it up again if it works i will be forever indebted to you

1

u/CueAnon420 Nov 02 '26

If you are worried about blowing things up, try without the Arduino pin first (so you just have the +5V and ground from Arduino board to breadboard). Use a jumper wire and touch the gate to the 5V from the Arduino board. Solenoid should pull in. Once you confirm this, go back to trying the program.

1

u/not_its_me Nov 02 '26

so like this?

1

u/CueAnon420 Nov 02 '26

100%

If the solenoid doesn't pull in when wired like that, something is very wrong and it's possible the mosfet has blown from prior experiements gone south. If you pull the red 5V wire, solenoid should turn off.

I will also say that I am not familiar with that breadboard app and I am assuming that the mosfet pins are the standard G-D-S

1

u/not_its_me Nov 03 '26

hiii i tried it and nothing happened. my parts are all brand new so i dont understand what could've gone wrong and yes its is G-D-S. the website is tinkercad

1

u/CueAnon420 Nov 04 '26

Did you try the 5V jump test?

Failing that, try jumping the Drain and Source pins - that eliminates the mosfet entirely and will prove if you have some wiring issue in your solenoid circuit, which seems more likely than a blown mosfet to me.

→ More replies