ActuatorsSolenoid
12V Electric Solenoid Door Lock
Fail-secure solenoid lock for DIY access-control projects.
Wiring & code for
Solenoid Lock 12V practical reference
A 12V solenoid lock commonly paired with RFID readers or keypads in DIY smart-lock and access-control builds.
Key specifications
- Operating voltage: 12V DC
- Current draw: ~350-500 mA while energized
- Lock type: Fail-secure on most DIY-market units — locked when unpowered, unlocks only while energized
- Duty cycle: Not rated for continuous hold on most models — leaving it energized long-term can overheat the coil, check your specific datasheet
Pinout and connection notes
Same inductive-load rules as any solenoid: drive it through a relay or MOSFET with a flyback diode across the coil. Confirm fail-secure vs fail-safe behavior on your specific unit before it goes into a real door.
- +: Coil positive lead — through a relay or MOSFET, never straight from a GPIO pin
- -: Coil negative lead
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.