I put a 5V lamp in to simulate the arduino
I think that the resistors are right here to lower a 25V source signal to 5V that is safe for the arduino. I'd like to have something else in there for an extra level of safety, but I don't know what that would be other than a fuse
Your link is broken - can't tell if its a logic level MOSFET or not.
The diode across the relay should be a standard rectifier diode, not a zener.
I presume the 5V in the first circuit represents an Arduino output pin? You need a 150 ohm resistor perhaps to
limit transient gate current if its a big MOSFET.
The voltage divider in the second circuit is rather high current - use 10k and 39k and you won't have to worry about
calculating resistor heat dissipation.
The diode needs to handle the supply voltage in reverse bias, so 30V or more should do it, 50V would be a nice 2-fold safety
margin. The diode current rating is the same as the solenoid current - it takes over carrying that current when the mosfet
switches off, preventing any large inductive voltage spike.
Well the polarity shown for V1 and V2 are backwards. Be sure the drain lead is going to the +25 and source lead is going to ground. Don't use a zener diode, a simple 1N4002 will be just fine.
I've always used => X4 rated reverse breakdown voltage Vs circuit working voltage for my diodes used across inductive loads and never had a problem with one failing yet. But as the price seldom is much different in that 1N400x diode series go ahead and use a 1N4007 rated at 1Kv reverse voltage if you have one.
zacaj:
The solenoid is 2ohm, which comes out to 12.5A. The 1N4007 is rated for 1A continuous, 30A surge. Would it fall under surge?
Diode is not conducting when solenoid is turned on and drawing 12.5A, rather the diode is turned off (reversed biased) during that time. The diode conducts when the solenoid is turned off and the collapsing magnetic field creates a reversed polarity voltage spike that then turns on the diode (forward biased) and allow the current to recirculate between the coil resistance and the diode for several cycles. 30A surge rating is fine. The field is consumed in just a microsecond or so.