An electric lock is an electromechanical device designed to secure doors, gates, or other entry points by using an electrical current to control the locking mechanism. These locks are widely used in access control systems for residential, commercial, and industrial applications, offering enhanced security and convenience over traditional mechanical locks. Common applications include keyless entry systems, security checkpoints, and automated entry systems in smart homes and buildings.
Pin Number | Description | Notes |
---|---|---|
1 | Power (+) | Connect to positive voltage |
2 | Power (-) | Connect to ground |
3 | Control Input | Trigger for lock actuation |
4 | Normally Closed (NC) | Closed when lock is powered |
5 | Common (COM) | Common terminal for switches |
6 | Normally Open (NO) | Open when lock is powered |
Q: Can the electric lock be used outdoors? A: Yes, but ensure it is rated for outdoor use and properly sealed against the elements.
Q: How can I test if the lock is working? A: Apply the rated voltage to the Power (+) and (-) pins and use a multimeter to check continuity across the NC or NO pins.
Q: What happens if the power fails? A: Most electric locks are fail-secure, meaning they remain locked if power is lost. Fail-safe models unlock when power is lost.
// Example code to control an Electric Lock with an Arduino UNO
const int lockControlPin = 3; // Connect to Control Input of Electric Lock
void setup() {
pinMode(lockControlPin, OUTPUT); // Set lock control pin as an output
digitalWrite(lockControlPin, LOW); // Start with the lock disengaged
}
void loop() {
// Engage the lock for 5 seconds
digitalWrite(lockControlPin, HIGH); // Apply voltage to engage lock
delay(5000); // Wait for 5 seconds
// Disengage the lock
digitalWrite(lockControlPin, LOW); // Remove voltage to disengage lock
delay(5000); // Wait for 5 seconds before next cycle
}
Note: The above code assumes the electric lock is activated by applying a HIGH signal. Some locks may require a LOW signal to engage; adjust the code accordingly. Always include a current-limiting resistor if the control input is not designed for direct connection to a microcontroller.