Nowadays, monitor camera abounds in almost every street and alley. But it can only be used to get the clues afterwards, and if there could be an alarm used to inform the people around and to deter crime while buildings or area is being invaded, then something disastrous might be stopped and dealt with in time to prevent any irreparable things. The main propose of this research is to develop a smart relative infrared detector with auto-matching function with vary frequency. By this it creates the smart relative infrared detector with both functions mentioned above (i) possessing auto-matching function, (ii) auto-switching function with vary frequency.