Electromagnet with relay reset arduino

Untill you show us how you have things connected and a picture of your relay board, we can't help