XMega128A4U DAC won't output 0 volts

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

XMega128A4U DAC outputs 22mV with '0' command value; cannot get 0 volt output. Have been adjusting offset and gain, but to no avail.

I can adjust the gain, for instance, to get exactly 1.00V with 0xfff command (with 0x800 giving exactly .500V), but the '0' point is still 22mV.

Have tried jacking the offset low, but it still doesn't seem to affect the output at '0' command.

The DAC output is attached to the input of an analog switch.

Any suggestions?

Thanks,

Bob Wirka

"No matter where you go; there you are"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, i observed the same with my XMega256A3BU. This seems to be related with the output OpAmp Buffer that doesn't seem to be a rail2rail OpAmp. Too bad, if you indeed want DC coupling of the analog output voltage (like me).

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The offset and gain won't change the lower limit of the DAC regardless of what you do. This is a limitation of the DAC. The datasheet says a code of 0 can be as high as 0.15V.

I am interested in a solution to this problem as well. I want to DC couple the DAC to a simple non-inverting amplifier, but it is imperative that a code of 0 gives a 0V output. I really don't want to have to use a discrete DAC or switch to another microcontroller. This behavior is unacceptable Atmel.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply.

Yes, this is a problem as this is part of a 0-10V analog I/O system that has 10:1 scaling on in and out. So, the 22mV turns out to be ~1/4 volt on the output. Unacceptable.

Will have to fiddle with the analog output circuit.

"No matter where you go; there you are"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There seems to be a misconception about what "rail-rail" means for op-amps.

In this case, it JUST means "close to the rail". I know of no rail-rail single supply op-amp that will go all the way to zero. Every one comes close - 20mv, 30mv, 50mv, all far better than the 1-2V that used to be the norm.

So the simple fact that there IS an op-amp between the DAC and the output pin means that, with existing technology, it will never go absolutely to zero.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim,
Thanks,
Bob Wirka

"No matter where you go; there you are"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
There seems to be a misconception about what "rail-rail" means for op-amps.

Thanks, Jim, for pointing that out. But that only explains that my explanation didn't work ;-). In fact we still face a high-speed 12bit DAC that is simply unable to use its full output range down to exactly zero volt when being feeded with a zero value. Every simple self-built 50 penny R2R ladder will do that job. I for myself went the route of using an external DAC while having an unused/unusable one on-chip now.

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DO1THL wrote:
In fact we still face a high-speed 12bit DAC that is simply unable to use its full output range down to exactly zero
It's full output range is not down to zero. Where did you read/hear that?

This isn't anything specific to XMega, for example a quick check on a STM32 gives me 56 mV out with the output buffer activated (ok you can disable the output buffer on those and come significantly lower, but not to zero).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, for me the full output range is the range being covered from all bits being zero up to all bits being one. My particular device starts to increase the output voltage level from the minimum of about 30 mV with a digital output value of 100(dec). That's why i stated that i cannot use the full output range but only the range from 100 - 4095.

Yes i did read about the minimum output voltage, but i didn't state the chip doesn't adhere to the data sheet, i did state that this behaviour is annoying and simply not tolerable for some configurations. And a selective output buffer as in the STM32 would have been an easy solution.

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't think the output of even an R-2R network can go all the way to zero volts. With all the inputs to the network at a logic low, the output of the network would be just a tiny bit less than Vol of the logic driving the network. For TTL logic, that's about 400mV. For CMOS, about 5% of VCC, or somewhere around 250mV for a 5V supply. It's because of the fact that the saturation voltage of the output transistors is not zero.
the only way I can see to get around the problem is to add a negative power supply and run the output op-amps off that. There's no other way to get an output range that includes zero.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Building one, or one million?

If you are only making a few devices the cost of adding a bi-polar power supply so that your analog signal(s) can truely go to or through zero is minimal.

One other approach, rather than add a bi-polar power supply, that can sometimes be useful is to generate a "ground" level for the circuit at, for the sake of argument, 1 V. A 0-5 V supply is now a -1 to +4 V supply, with a "ground" rail that sits between the two.

One can obviously make the "driven ground" at any level, 1 V, 2.5 V, etc., between the power supply's output range of 0-5 V.

Caveats exits. To the outside world, (or the rest of the circuitry), one only presents the 0 V driven ground as "The Ground" level. The most negative terminal of the supply is no longer "ground".

One also needs to make sure the power supply can source or sink current from the most negative terminal. For low current analog signal processing this isn't usually a problem.

With this design one can use a rail-to-rail op-amp, now running on -1 V to + 4 V, and easily drive one's signal to ground, or through ground. Note that some care must be taken on the op-amp circuitry if one runs them on an asymmetric supply. One can avoid this if the driven ground is at mid-range, 2.5 V, in this example.

I can recall several designs that used bi-polar op-amps running on +/- 4.5 V from a 9 V battery, with a driven ground at 4.5 V above the battery's minus terminal's voltage.

Some power supply designs use this technique, with an internally shifted ground, so that the variable supply can go all the way down to 0 V. Again, what one sees on the front panel as "ground", is sitting a bit above what the power supply's internal power supply is generating.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all your replies.

I believe the simplest solution for RevB of this board is to add a -3V supply for the op-amps and adjust the feedback circuit to give 0-10V in the stated linear range of the DAC. I'd use a -3V charge pump like the LTC1983.

If one of you analog guru's could give a look at this approach, I'd appreciate it.

Thanks,

Bob Wirka

Attachment(s): 

"No matter where you go; there you are"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know this is an old thread but ran into the same problem, solved by using an op amp as a differential amplifier with a tuneable offset to get down to 0V (pretend there's a trim pot where R5 and R6 meet R2). You can then throw in some offset to the DAC internally through:

DACB.OFFSETCAL = 0xFF;          //Gives about 20mV offset

Which for me got pretty close to removing the "deadband" 20mV at the beginning of the DAC range, put that 20mV offset into a differential opamp and you get a nice linear 0-1V range.