Security system based on microcontrollers