Digital Controlled Analog Attenuator

Discussion in 'The Projects Forum' started by hannodewind, Sep 23, 2010.

  1. hannodewind

    Thread Starter New Member

    Sep 23, 2010
    3
    0
    Hi,

    I am building a function generator. The output functions (sine/traingle/square) all have amplitude 5V(thus 10Vpp). This is the maximum required output amplitude.
    I want to use a PIC to digitally attenuate the signal. Does anyone have any circuit ideas? Digital Pots with the required voltage ranges are quite expensive where I live and have only a maximum resolution of 8bits. I have seen circuits using 12bit DAC's, however, again these DAC's with +-5V support are expensive.

    maybe I can scale the signal first, then attenuate/amplify and scale again? this would probably create noise though....

    thanks
     
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    Think about using the PIC's push-pull IO. You can use the IO ports to sink current for resistors on a voltage divider. If you had a 1k resistor on the attenuator output, and then resistors of some form (perhaps in powers of two) you could control the divider and attenuate the signal.
     
  3. hannodewind

    Thread Starter New Member

    Sep 23, 2010
    3
    0
    Thanks for the reply...
    I bought the DAC0832 D/A converter... apparently it can act as an attenuator. However, I am struggling with the output.
    To test the DAC I connected it exactly as in figure 7 (in datasheet), using LF347 opamps with +-12V rails, and I gave it a +5V reference voltage.
    All digital inputs are tied to +5V and I made sure that all other digital connections are correct, adding a button to WR1 to write the input values to the DAC register.
    I expected the ouput to be ~5V, but the output of the opamp was at the negative rail (-12V). I changed the reference, the digital values etc, to no avail...output stays at -12V.
    It seems like the feedback is not working.. I don't know..is it the LF347 opamp?
    Can anybody suggest an opamp I should use or point out where I am going wrong?

    Thanks
     
  4. hannodewind

    Thread Starter New Member

    Sep 23, 2010
    3
    0
    Also, does anyone know where to find a multisim/pspice model for DAC0832?
     
Loading...