An audio signal analysis method is provided for detecting the opening and closing of a medicine bottle cap in a robust manner using a micro speaker and a microphone along with associated mixed signal electronics. It is also used for robust tamper detection and for monitoring liquid medication consumption accurately. In a preferred embodiment an un-modulated OFDM signal is used that covers the entire operating audio spectrum. In another embodiment, Complimentary code based phase encoding of the subcarrier phases is used to reduce the peak to average power of the OFDM signal, thereby enabling higher transmit power of the audio signal to mitigate against interference. A suitable wireless device can be co-located with the mixed signal electronics for sending the bottle usage, medication reminder alarm, and tamper status to the medication compliance monitoring system or to the user's cell phone. In some embodiments of the patent, electrical capacitance sensing is used to determine if the bottle is opened or closed.