Digital Pot & Data Sheet Question

Discussion in 'General Electronics Chat' started by Management, Feb 6, 2008.

  1. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    It's me again, after solving my switch problem I have another question.

    I am looking at a Digital Pot to provide programmable gain and need to know the performance at the lowest and highest end of the wider. It is a 8 bit digital pot (10k resistor) and I programmed it to see if I indeed can get a gain of 255 (maximum) with it hooked up in an opamp inverting configuration.

    Gain = (256 - x) / x

    But after putting in 10 mV, I get a output of about -2V ... which is a gain of about 200. An input of 1mv gives me an output of -150mV. This is kind of confusing me.

    I looked at the data sheet and it says under Analog Resistor Characteristics, "Absolute Linearity" and "Relative Linearity" with Units LSB (Lowest Significant Bit), does this information help me understand what is going on? Can someone help me understand why I don't get a gain of 255 and why I don't have consistant gain by increasing the input from 1mV to 10 mV?

    Data Sheet: http://datasheets.maxim-ic.com/en/ds/DS1868.pdf
    Page 9

    Thank you.

    Dru
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Cab you post up a schematic of the op amp circuit? We have to guess otherwise. One of the confusing things is your expectation of a gain of 255. While the Dpot has 256 states, the resistance determines the gain, not the number of steps.

    Do you have experience with op amps? You only mention the one Dpot. An inverting amp configuration usually has two resistors involved. The signal comes through one to the inverting input, and the other is for feedback from the op amp output back to the inverting input, or summing junction.
     
  3. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    An inverting amp will have a gain equal to the feedback resistor value divided by the input resistor value.

    A non-inverting amp will have a gain equal to one plus the feedback resistor value divided by the input resistor value.
     
  4. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    I have experience with opamps. And I know where the signal comes and goes in an inverting configuration. Also, did you check out the data sheet?

    From reading the data sheet, the Dpot is a 10k and has 256 resistive sections with the position being controlled by an 8 bit value. Why should I mention two resistors? Also what does the resistors have to do with the gain in this situation? Isn't it just the ratio that matters in this situation?

    The wiper position is connected to the inverting pin and the input coming in on the Low End of the pot and the output taken at the high end of the pot. I think that if you would have looked at the data sheet it would have cleared up any confusion but I guess it is my responsibility to clearly state my problem.

    In the data sheet they state that the gain (Page 7) is what I said before for a pictured variable gain amplifier in the inverting configuration. Page 8 in Figure 7.

    For example, if I program the Dpot for position 64, I get a gain of 3 like I am expecting. Also if I program the Dpot for position 128 I get a gain of 1 like I am expecting. Like I was asking, doesn't only the ratio matter in this situation. But please look at the data sheet or ask a question that is not so condescending. I appreciate the response though.

    Thank you.

    Dru
     
  5. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    To make things simpler, can someone just help me understand the spec in this data sheet.

    I would like to understand absolute and relative linearity as well as the end to end resistor tolerance. That information would be appreciated.

    Data Sheet: Not sure what they are saying.

    Absolute linearity is used to determine wiper voltage versus expected voltage as determined by wiper
    position. Device test limits ±1.6 LSB.

    Relative linearity is used to determine the change in voltage between successive tap positions. Device
    test limits ±0.5 LSB.

    Also, from what I have been search and reading online. I would like to know what contributes to in accurate resistor values at the low and high end of the digital poten.

    Thank you.

    Dru
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The op amp in Fig. 8 of the data sheet is a follower with gain. It does not invert the input. The gain is determined by the ratio of the Dpot resistance on either side of the wiper. Position 128 in the center of the resistive elements, should give a gain of 2. If you want to work out gain as a function of wiper step, use 40 ohms per element (it's actually 39 and a fraction, but 40 is close enough).

    My confusion was from your assertion that the amp was inverting.

    The resistive elements are laser trimmed to some spec determined by Dallas. Occasional units are pulled as a QC measure. The published data state that statistically, the unit you are using will be within the min/max tolerances on the data sheet.

    For absolute linearity, assume that each resistance is precisely 10,000/255 ohms. Each step of the wiper should cause the voltage read out (assume the device is set up as a potentiometer) to change by an exact amount. Nonlinearity measures the deviation from the calculated reading.

    The relative linearity simply looks at the change from one element to the next, and says the deviation is so much. This test is probably conducted with the device set up as a variable resistor. The change in resistance is the measured variable.
     
  7. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    Sorry I meant to say similar to the pictured circuit but mine is in an inverting configuration because that is what I plan to use. But why should I get a gain of 2 at wiper position 128? Wouldn't the ratio be 1?

    From your description, is it safe to say that 1 LSB is the amount from one wiper position to the other? i.e. 10,000/255 = about 40? So 0.3 LSB would be 1/3 or 40 ohms?

    Just trying to understand the data sheet language.

    Thank you.

    Dru
     
  8. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    Also, how is this different from differential nonlinearity and integral nonlinearity use in other data sheets (similar to DACs from what I have read). I don't quite understand these specs and their uses.

    Can someone explain or point me in the right direction?

    Thank you.

    Andrew
     
  9. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    If you could post up a drawing of the circuit, it would be very helpful at this point. I can't follow your arrangement with the op amp and Dpot.
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    In addition to DAC nonlinearity, have you accounted for your generator source impedance (not a problem if you are measuring at the pot, with it connected in the circuit)? Also, what about op amp input offset? An offset voltage of 1mV will give you 256mV at the output at max gain, with zero input voltage.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Am I a party pooper or something? I would like to know what Management found out. Maybe he hasn't been online since Thursday?
     
  12. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Maybe he went (insert fun activity) for the weekend.
     
  13. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    I apologize but yes I haven't been online since then.

    Also, I am in Japan so I do try to do some activities on the weekends.

    I can say that I didn' explain my situation enough so beenthere keep misunderstanding what I was saying. Plus he did not have a picture to look at, which made the situation worse. I not in a position to make one at the moment so my apologies.

    I essential now understand what the data sheet means by Absolute Linearity and Relative Linearity. They are bought INL and DNL specs respectively, as you would see on a DAC data sheet. Also, LSB is what beenthere was getting at and what I saying in response to his post.

    Future reading told me that at each end of the Dpot is where the greatest error occurs. As you get closer to wiper position 128, the error is essentially zero.
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Did you read post number 10?
     
  15. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    I understand what you are saying in post 10. The source resistance can add to the R1 resistor in a (-R2/R1) inverting amp config. to reduce the gain, but I don't think that it was a problem in this case. Would the source resistance change if you change the voltage?

    Input offset voltage at the opamp could be a problem but I am not quite sure if it was. cut the voltage at the input and got essentially zero volts at the output.

    What do you recommend I look into further? Or, how do you recommend I further look into (combat) what you said in post 10?

    Thank you for the help and the responses.

    Andrew
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Source resistance of a commercially made generator should not vary significantly with voltage, and it is irrelevant if you measure the voltage at the pin on the pot.

    Hopefully, this was with the pot set at maximum gain. The input offset voltage gets multiplied by the gain.

    You are correct in saying that the potential gain error due to the pot will go up as the wiper approaches either end.
    Could you cascade two identical stages, with each variable over the range of -1/16 to -16, thereby staying nearer the center of each pot? Would that help reduce the maximum error?
     
  17. Management

    Thread Starter Active Member

    Sep 18, 2007
    306
    0
    Thank you for confirming this.

    At maximum gain a zero input has an output of about 81 mV while at unity gain the output is 0.3 mV.

    Nice suggestion. I think that is what is going to end up happening.

    Thank you for all your replies. Embedded a few things in my head that I should have already learned. I have a good grasp of what's going on now.

    Dru
     
Loading...