This build should control a 12 V solenoid. Before I plug it to the outlet, could you please look, if the wiring and current supply is correct?
Additional question: What would I have to change to supply power to the Arduino from the same jack as to the solenoid, without USB?
The FET needs to be a logic level N channel MOSFET , not just any FET.
Replace the yellow wire with 180 Ohm resistor.
It is a IRLZ44N MOSFET.
A second resistor behind the 10kΩ-resistor?
That's a good transistor.
"Behind" is not an eletrical term. Just replace the yellow wire with the resistor.
Add a diode ( 1n4007 is ok ) in parallel to the solenoid: catode to 12V, anode to drain of mosfet
P.S.
I see 47A mosfets are very popular also to drive a load <1A
JCA34F
September 3, 2024, 2:47pm
6
If the MOSFET gate is the only output load on the UNO, you can connect 12V+ to UNO VIN pin, 12V ground to UNO GND.
As @Railroader said, 180Ω resistor between D5 and MOSFET gate.
Despite everything else - I was pleased to not see a TIP120.
M1 = "solenoid". Be sure to use a logic level MOSFET.