This thesis uses magnetic force to make a new lock system. It uses magnet as the key and the lock part of the system uses sensor to sense magnet’s angle and magnetic force. Then we can get the magnet’s angle by observing the sensor’s output signal, and then according to the signal to create the angle password due to each angle has its corresponding output signal. This system uses the microcontroller as mathematics core to check whether the password is correct or not. If correct, the microcontroller will control the lock to open the door. Besides, this system has the change password function and LED state light. The change password function can increase the password flexibility, and LED state light indicates the lock’s operation status.