Peak-and-Hold Circuit using PWM

Hello everyone,

I was wondering if anybody could point me to some literature/tutorials on using the Arduino Uno to create a Peak-and-Hold Circuit that would turn a solenoid on and off. I was thinking about using the IRF640 for the switch, but other than that I'm free for suggestions. I have multiple inductors at hand as well as voltage supply sources and resistors.

I'm currently interested in a P+H Turn on aspect while involving a reverse current application to turn off the current flow, thus turning off the magnetic field in the system.

Any feedback is great, thanks.

I think you can see in the middle of the blog where i used IRL540 for controlling 40 solenoid valves.

cool project you got there.