does not store rfid tags in eeprom

Put a diode (1N4001 or higher) across the solenoid, cathode to the + side, anode to the - side. This will take care of the spike caused by the collapsing field.

It is needed any time you switch an inductive load.

/mike

n1ist:
Put a diode (1N4001 or higher) across the solenoid, cathode to the + side, anode to the - side. This will take care of the spike caused by the collapsing field.

It is needed any time you switch an inductive load.

/mike

I I’m pretty sure I have a bunch of those but if not, I have huge numbers of much heavier duty diodes.

The lock has a plate which covers the connections and there is plenty of room inside for a cap and diode.

The cap alone has cured the problem but I’ll add the diode as well as although its ‘fixed’ the problem, I suspect that the cap has just reduced the spike to a tolerable level and not removed it entirely.

It can only be getting though the ground but I’m surprised that its a problem seeing as the 5v side goes through a filtered regulator but I guess the spike is too much for the regulator to completely remove.

So far I’m on 3 days of normal use without a crash of the RC522, the rest of the system never crashed but I guess the RC522 being 3.3v makes it more susceptible.

Good to hear. With a capacitor over the relay contacts you decrease the potential sparks caused during opening contacts, with a diode you reduce the spikes caused by coil (as Mike also pointed out) with both you get the best solution.