I am building a circuit to lock/unlock a door using a standard electromagnetic door lock (http://www.amazon.com/Seco-Larm-E-941SA-600-Enforcer-Electromagnetic-Holding/dp/B00196YB5Y) and controlling it with a PIC microcontroller. I selected an appropriate relay (http://www.digikey.com/short/7cdzzv) with a 13mA switching current that the PIC could drive safely.
I have read in a number of places that I need a freewheeling diode to protect against inductive loads, and as such I purchased a few 1N4007. My understanding is that I need one across the coil to protect the PIC, but I am wondering since the electromagnet is an inductive load, do I also need one to protect the relay? Most articles talk about the freewheeling diode in one place, but not the other.
Thanks!