Here is where it is getting problematic. I wired these up very simply. literally a wire from pin 9 to gate, source and drain with a big old magnet in middle and a flyback diode to handle things when the magnet turns off.
Also, don't forget to connect the ground of the +12V supply to the ground of the Arduino.
Also as drawn that diode is the wrong way round, the cathode should be to the positive side of the supply. In other words it is normally reversed biased.
Or does it matter?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16