Why do you need to wire a diode?
To protect the lock in the circuit, avoid damage to the lock due to excessive current or voltage.
So, it is suggested that connect it with door lock. Where is the diode connected?
Connect the anode with lock's negative.
Connect the cathode with lock's positive. How to connect the diode?
You can secure the diode with a lock directly.
If your lock does not support the wiring way that mentioned previously,
you can connect the anode with lock's negative cable and power adpater's negative cable and connect the cathode with lock's positive.
This post contains more resources
You have to Login for download or view attachment(s). No Account? Register