# Best way to change amplitude of AC signal

• Mindscrape
In summary, the conversation discussed the use of a 3-5kHz square wave to control a device that attenuates an optical signal. The voltage range for the device is 0-5V, with a maximum of 20V. The preferred method for producing the square wave is using a TCXO or crystal oscillator, followed by an op-amp with a potentiometer amplitude control. It was noted that this may be challenging with typical op-amps, but a solution could be found with careful selection. The use of a coupling capacitor and two op-amp stages was suggested for the output of the amplifier. It was also mentioned that a 741 op-amp could potentially work with a +/-15V supply.

#### Mindscrape

I am controlling a device with a 3-5kHz square wave. The device will attenuate an optical signal based on the voltage given to it, which should range from 0-5V (maximum of 20 V, but most extinction happens at 5V). I am wondering what the best way to go about doing this would be.

I was thinking of using a TCXO (or crystal oscillator) to produce the square wave, and then use either an inverting or non-inverting amplifier to change the amplitude of the wave. Most importantly, however, is that the device receives NO DC BIAS. I wasn't all that sure if an op-amp would create a DC bias at all because I only know the ideal op-amps, and don't really know about the practicalities of them.

This seems like a good way to me unless someone knows of something better or a potential pitfall with my idea.

An opamp with a potentiometer amplitude control should work, although the 20Vpp amplitude may be tough to accommodate with jellybean opamps. If you can find one that runs between +/-15V, then you could make it work.

Just use a coupling capacitor out of the output of the amplifier, connected in series with your device. You'll probably want two opamp stages, with the first buffering your oscillator square wave and AC coupled to the output amplifier/attenuator stage, which is AC coupled to your load.

BTW, TCXO means temperature controlled crystal oscillator, which it does not sound like what you need. You could start with a 32kHz watch crystal oscillator, and divide it by 8 or something to get into your target frequency range.

I think a plain old 741 can tolerate +/-15 volt supplies.