Digital noise on buzzer
T Chap
Posts: 4,223
An LM386 is driving several buzzers from a Prop pin to increase the volume. There is a high pitched noise that is always audible if I2C is scanning some devices. I need a board fix to solve this, it is not possible to redesign the layout right now. There is already an FET that acts as a shunt to GND on the input of the 386, which serves to allow variable buzzer volume. When the FET is open(megohm), the digital noise is lowest, but when it is closed (~32ohms) and shorting the input to GND, then the noise is higher. I had hoped the shunt could be used to turn off the noise when buzzer is not in use, but as you can see the opposite effect occurs.
Can anyone suggest a quick and easy board fix? The buzzer operates from 1k to 3k, so I am guessing a filter may work, but really don't want to alter the buzzer sound as it is required for feedback.
Can anyone suggest a quick and easy board fix? The buzzer operates from 1k to 3k, so I am guessing a filter may work, but really don't want to alter the buzzer sound as it is required for feedback.
Comments
-Phil
-Phil
It uses the timer to generate a DUTY mode output on the positive swings of the square wave, and a low on negative swings, thus effectively modulating the volume by the value of frqb. I've set it up for a 12-level, exponentially increasing volume range, but the range and taper can be programmed any way you like it. Or just use the raw frqb values for voll. The routine returns without doing anything if freqq is above 10KHz at 80MHz clock speed, although this is a very conservative limit.
BTW, if you need additional filtering to accommodate the DUTY mode output, you should be able to replace your shunt transistor with a cap and adjust the series resistor for the right time constant.
-Phil
-Phil