Offset voltage on Arduino due DAC0 / DAC1

Hi,

with statement:

analogWrite(DAC0, 0);

instead of 0 volt output I find 0,540 volt. It seems as an offset voltage.

Is it normal? Is my Arduino damaged?

How I can avoid such offset to obtain output of 0 Volt with input value = 0?

Thank you

Domenico

dformenton:
Hi,

with statement:

analogWrite(DAC0, 0);

instead of 0 volt output I find 0,540 volt. It seems as an offset voltage.

Is it normal? Is my Arduino damaged?

How I can avoid such offset to obtain output of 0 Volt with input value = 0?

Thank you

Domenico

Yes, that's normal.

it seems that many people have this trap.
Me too.:slight_smile:
http://forum.arduino.cc/index.php?topic=173747

OK, I did run into this issue as well and did measure complete curve, after having measured 0.5V/1.51V/2.41V on DAC1 when writing 0/2048/4095 to DAC1 with "analogWriteResolution(12)".

Then I used direct connection between DAC1 and A11, with just a cable and with a 1kΩ resistor.
The middle part of the curve is quite linear, but it does not start at 0 and does not end at 1023:

This is the small sketch used:

void setup() {
  pinMode(A10, INPUT);
  pinMode(DAC1, OUTPUT);
  analogWriteResolution(12);
  Serial.begin(9600);
}

void loop() {
  for(int i=0; i<4095; i+=100) {
    Serial.print(i);
    Serial.print(" ");
    analogWrite(DAC1, i);
    Serial.print(analogRead(A10));
    Serial.print(" ");
    delay(100);
    Serial.println(analogRead(A10));
  }
}

I plan to use one of DAC0-1 to one of A0-11 connection for playing with PID library.
First test on UNO with PWM showed that DAC is desirable for that.

Hermann.