offset with dac on teensy 3.6

Status
Not open for further replies.

biogene

New member
hello ,
i need to use the DAC at very low voltage, and to get it work from 0 volts .

so i change the analog reference to INTERNAL to have a lower step

but the output from DAC always start at 2.8 mV even when i'm sending analogwrite = 0, after the step is 0.3mV which correspond to 1.2 / 4096

i read the kinetis 66 datasheet and it's write at page 52 that the offset is corresponding to "±0.4 ±0.8 %FSR " but i don't know what is fsr

if someone can explain me the offset and if there a way to avoid this offset

Code:
int fadeAmount = 1;    // how many points to fade the LED by
int bright = 0 ;

void setup() {
  // put your setup code here, to run once:
  analogReference(1);
  analogWriteResolution(12);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  analogWrite(A21, (int)bright);
  Serial.println(bright);

  // change the brightness for next time through the loop:
  bright = bright + fadeAmount;
  
  // reverse the direction of the fading at the ends of the fade:
  if (bright <= 0 || bright >= 5) {
    fadeAmount = -fadeAmount;
  }
  // wait for 30 milliseconds to see the dimming effect
  delay(2000);
}
 
i read the kinetis 66 datasheet and it's write at page 52 that the offset is corresponding to "±0.4 ±0.8 %FSR " but i don't know what is fsr

FSR means Full Scale Reading. In your case 1.2V. Worst case offset is thus 0.4*1.2V/4096 + 0.8*1.2V/100 = 0.1mV + 9.6mV = 9.7mV. Thus, your 2.8mV offset is already not too bad. If you need offset compensation, this is generally achieved with the help of a symmetrically powered (i.e. +/-5V) opamp circuit and a trim potentiometer.
 
Status
Not open for further replies.
Back
Top