digital converter adc 23 a voltage signal output of the pwm module is sent to an audio power amplifier 24 which is connected to additional power vcc the amplifier amplifies the input pwm voltage signal and sends the amplified signal to speaker 25 when instructed to do so by the microcontroller in order to detect current to the speaker a current sensing resistor 26 is placed between the speaker leads and ground 27 the current sensing resistor is a very low value such as a few milliohms the signal produced by resistor 26 is then sent to adc 23 the microcontroller 21 a memory or has access to a memory with a computer program or software algorithm for determining whether the waveform detected is a match with an expected waveform from the speaker the upper portion of fig3 depicts a square wave signal as it is sent to the amplifier and the lower portion of fig3 depicts the signal as it looks after it is amplified and sent to speaker 25 the speaker produces tones whose fundamental frequency equals that of the input square wave the speaker produces a back electromotive force emf as seen in the lower portion of fig3 and each pulse.