Electronic – How to remove the offset from the DAC output and change the range

amplifierdacdc-offsetlevel-shifting

This DAC has an output range of 1-3 volts. Here's the datasheet:

Datasheet

I'm getting pulses with different amplitudes, frequencies, duty cycles and widths varying from 0.2 ms to 2 s from the DAC. I want an output range of 0-4 volts instead (Vcc=5v). I tried a high-pass RC filter, and then amplified it with an op-amp, but the output doesn't look like a pulse anymore. Also, I tried the circuit suggested in the datasheet (page 8) with no luck. I'm not sure what values I should assign to this circuit, since I don't understand how it functions.
How should I go about this?

Best Answer

If you want pulses to stay looking like pulses, you need to avoid any circuitry that has any frequency response at all, but this DAC is clearly intended for audio use, where the output would be AC coupled to the next stage by a capacitor, but that's not possible if you want a near-DC response. If the output at a '0' input is predictable at 2V, to get from a 1-3V output to your desired 0-4V output you need to to subtract 1V and multiply by 2. Fortunately that's easy to do with a single op-amp.

enter image description here

V2 is a reference voltage, you can do that with a divider of reasonably low impedance, or a reference voltage source. If you have a spare op-amp, using that as a buffer for the reference will stabilize things. V1 is the input from your DAC.