# Calculating current...

You did not state the inductance of the solenoid, which needs to be known to check the validity of using Ohms' Law with presumption of ordinary resistive behavior. Just in case it is a monstrously big solendoid or might get switched suddenly, don't hook it up directly to anything as delicate as an arduino. Any fast switching of a solenoid can get much larger + or - voltages out of it than the input voltage. Consider an automotive ignition coil for example.

I'd budget \$0.50 for an op amp, \$0.5 for a capacitor, and a few cents for protection zeners, and build a x1 op amp voltage follower with some overvoltage protection diodes and a fat capacitor near to its input as

V_device --------=========---------======== V_input to follower R1 | R2 | C1 ===== | | GND ---------------------------------------------- GND

With R1 = R2 = 10k C1 >= 10 uF

The time_averaged voltage across your solenoid is much more likely to be useful in an Ohms Law estimate and much less likely to break an arduino than the instantaneous voltage.

If and only if your solenoid rated inductance is less than a few tens of microHenry's then you may skip the extra follower ic and connect the V_input of this smoothing circuit to your arduino a0 input.

Don't forget to be generous in choosing a C1 with a higher rated voltage than 5V, though with enough R1 it should not go over that.

The solenoid drive is IRL540 ttl mosfet with protection diode. Define monstrously big lol. Max current draw through the solenoid is 1.1A, , 12vdc. The actual moving parts of the solenoid are relatively small and lightweight(grams not ounces).

Bill