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.