Considering the wide use of micro:bit and electromagnetic lock, we made a video that combines the two to apply in life.
What electromagnetic lock is?
Electromagnetic lock is a locking device that consists of an electromagnet and an armature plate. There are two main types of electric locking devices. Locking devices can be either "fail safe" or "fail secure". Electromagnetic locks are fail-safe by design. (Fail-safe means that if the power goes off the door will be unlocked). These types of locks use magnets to open and secure a wide variety of things, ranging from doors to hidden compartments.
How it works?
So how does it work ? As we all know,in a magnet, there is a North and South pole. Between similar poles, the magnets repel, and opposite poles attract.
Magnetic locks use electromagnetism to control the entire locking mechanism. When the magnet is energized, it bonds to the armature and locks the door. To allow access or egress, a switch must be provided to de-energize the magnet. As the electric power activates the magnet, the bolt locks the door. To unlock the door, simply remove power.
But how can i use micro:bit which is a tiny programmable computer to control the Electromagnetic lock?
Things what you need
A micro: bit
An Electromagnetic lock
A Crowtail-base shield for Micro: bit
A Crowtail- MOSFET
A 4 pin Crowtail cable
An external power cord
Micro USB Cable
A bolt driver
Process:
Step 1
At first, you should write the code on the micro:bit before you start to assemble these parts.
Connect the micro:bit to your computer via a micro USB cable.(You can also refer this link to use a phone to code:https://microbit.org/guide/mobile/)