I’m working on a keyless entry using Photon and a 12V door strike (similar to this one).
During my testing, (without the door strike setup), I was using a voltage bucker to take a 12V input down to 5v for the Photon, and passing the 12V to the relay that controls the door strike. Tests all worked out but once I hooked up the system to the door strike, the first activation of the door fried the Photon. After much exploring (and frying a spark core in the process) I figured out that the voltage spike is killing the Photon.
I’m really new to this and was wondering what is the best way to protect the Photon from a voltage spike?
Incidentally, I side-stepped this problem entirely by using two separate power supplies. I have a 12VDC 2A one that powers the lock strike solenoid and and a separate USB one that powers the controller and relay. They’re completely isolated from each other and don’t even share a ground.
Though if you really want to use one power supply you probably need a flyback diode across the lock solenoid. Also, depending on how you’ve hooked things up, you may also need a flyback diode across the relay coil. And possibly a transistor.
You need to make sure your relay coil draws less than 20 mA at 3.3V. Small signal relays usually fit within that limit, but most larger ones do not, and require a transistor. I won’t guarantee this will solve your problem, but you certainly need the two flyback diodes or, as you discovered, very bad things happen!
Oh, you have an isolated relay. I’d stick with that; it’s good. I’d then just use a separate power supply for the lock strike solenoid, but if you want to use just one the flyback diode on the lock strike will probably solve the problem. But don’t blame me if it doesn’t!