OPTIMIZATION AND IMPLEMENTATION OF A THERMOACOUSTIC FLASHOVER DETECTOR