Control of amplifier gain

Hi,

I have a sparkfun microphone pre-amplifier and a Chu Moy headphone amplifier and would like to control the gain of each from an arduino but i’m not sure how to go about it.

Would it be possible to use the arduino PWM for this function?

I have read and constructed the real-time audio processing experiment by Martin Nawrath in order to get better knowledge of it, but still scratch my head as how to implement my idea.

Any help would be greatly appreciated. :slight_smile:

I think you need to have some sort of digital potentiometer, that way you can control the resistance in the gain circuit.

figure 2 on this page shows you how to interface a potentiometer with a chu moy amp: http://headwize.com/projects/cmoy2_prj.htm

Would it be possible to use the arduino PWM for this function?

No, because the PWM switching fequency will get coupled into your audio signal. PWM is not a real analog voltage signal, it’s a digital signal that switches on and off rapidly to simulate an analog signal, when averaged.

Check out the PT2258 6-Channel Electronic Volume Controller

from:-
http://www.futurlec.com/ICSFOthers.shtml

This is I2C controlled and only $0.60