i will show you how you can make a simple security alarm using hall sensor.
hall sensors is used in many field like automaotive,dc motors,cellphone magnetic flip cover. i got mine from a old dusty pc
1. HALL SENSOR FROM PC FAN
4. LED'S [OPTIONAL]
take a pc fan apply some brute force and open it
inside you will get sensor these are positive and negetive pins in middile two pins are output pins
built a buzzer circuit (led's are optional)yellow wire will be connected to positive,two black wire will receive output and red wire is from buzzer it will be connected with one of output.
here is the complete circuit diagram again led's are optional for better understanding check datasheet of sensor
lets test the circuit when it sense a magnetic field it gets high to low and buzzer gets off