Level Shifting to interface dsPIC DAC & ADC to +/- 15V Analogue Signals

Discussion in 'The Projects Forum' started by john-louis, Nov 1, 2010.

  1. john-louis

    Thread Starter New Member

    Oct 27, 2010
    5
    0
    Hello, I have been searching around for a suitable method of doing this but havent really come across anything so far, I was hoping someone here may be able to give me some tips or advice:

    I need to interface a dsPICs A-D converter and also its D-A converter to an analogue computer made up of integrators and differentiators and working on +/- 15v rails. The dsPIC will be clipped into the circuit as a test device and will allow observer / controller operations.

    However, the dsPICs A-D converter can only cope with 0-3.3v inputs and the D-A converter has two outputs which track each other (one is inverted in its operation) - they have a ~ 1v swing and are offset at about 1v (thus a 1-2v swing for the positive output and a 2-1v swing for the negative output).

    My question is how best to scale these signals up and down to match +/- 15v - especially the D-A converter!

    My Idea for the A-D converter is to use a matched resistor divider to feed 1.65v into an op-amp to offest the output to the middle of the scale, then just have a gain of less than 1 such that the input sig is scaled down accordingly - very similar to this...

    I am pretty stumped with the D-A though, the Microchip datasheet recommends using a OpAmp in differentual mode and to use both outputs to get a ~2v swing and apply whatever gain you like, but it will still be referenced above 0v IIRC?

    Probably worht mentioning that it will all be operating at about 1Hz so I cant just use a capacitor to trim out the DC!

    Thank You in advance for any suggestions or links :)
    - Alex
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    You can do the DAC level shifter/amp like this. You will need precision resistors. You may not need the input voltage followers if your DAC has ≈zero ohms output impedances. As an alternative, you might be able to find an instrumentation amp that will meet your needs.
     
  3. john-louis

    Thread Starter New Member

    Oct 27, 2010
    5
    0
    Hi Ron,

    Many thanks for the speedy and concise circuit! I assume the top input is the inverted output from the dsPIC and the bottom input is the normal output from the PIC (based on the output waveform tracking the bottom input)? I am still trying to wrap my head around it - opamps are not really my strong point - though I think I understand it ok, will sketch it up in spice here in a while and play with it!

    Cheers,
    - Alex
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Your assumption is correct.
    If you use LTspice, you won't have to redraw the circuit. I included the .ASC file.
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Hi Ron,

    I also thought the offset is referenced to ground but according to the poster's description, the two voltages from the DAC output have a 1V offset between them, not to ground.

    John, can you clarify this?
     
  6. john-louis

    Thread Starter New Member

    Oct 27, 2010
    5
    0
    Hi,
    The outputs from the PIC are not referanced to ground, they are designed to be treated as a pair (each channel of the DAC has two pins associated with it). Each pin, with respect to ground, can sweep between about 1.2v and 2.2 v and the two outputs for a channel track each other in the opposite sense. There is a continued debate on the microchip forum about the descrepancies between their datasheet and real life in regard to the actual voltage swings - microchip DAC's are not the best of modules and feature a good number of errata sheets...
    Many thanks for the input guys, you have given me the needed "prod"!
    - Alex
     
Loading...