Arduino to de-energize relay coil

I have a normally open micro switch that is connected to a SPST relay and then to a DC motor reversing circuit that is controlled by an arduino.

The micro switch will only be pressed for a small amount of time, but I need that to start the motor cycle. I achieved this through the use of the relay, but I now need the relay coil to be de-energized after a certain amount of time to stop the motor.

Can this be achieved through the arduino programming?


Don't show the code as a jpeg image. Post it according to the accepted forum methods mentioned in the sticky posts at the top of the forum.

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks... Tom.. :slight_smile: