Go Down

Topic: Offset voltage on Arduino due DAC0 / DAC1 (Read 2449 times) previous topic - next topic

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

Gericom


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.
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3

masumi


HermannSW

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:
Code: [Select]
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.

Go Up