Electric solenoid lock Intruduction :
The solenoid is a kind of electronic lock that you can find in a locker or in a cupboard. Normally the lock is active so you cannot open the door because of the piece of metal that is in the lock. In this state, the solenoid does not require power. But when 9-12VDC is added, the piece of metal retracts, allowing the door to open. The solenoids have a slanted-cut piece of metal (see photos). You can screw it open to turn 90, 180 or 270 degrees so that it fits your installation.
To control a solenoid you need a current transistor and a diode, click here for the diagram with all explanations. You will have to use a fairly good power supply to control a solenoid because a lot of power is required for the electromagnet, around 500 mA so don't try to provide it with a 9 V power supply!