I`m mostly writing this topic to alert other designers about this.
I was using the MCP4725, thinking that a 12bit DAC would be good enough accuracy and resolution for my project. I wasn't aware however that these DAC's can easily have more than 5% output variances between each IC.
So if you hook up a 3volts or 3000mV reference voltage to this DAC you would theoretically expect that writing an decimal value of 4000 would give you the analog value output of 2930,4mV
1.
However in practice I measured values between 2880mV and 2975mV == +- 2%. (Measurements taken over 75 devices that I assembled.). Please note the +- sign, it does NOT mean approximately, but it means, for e.g. +-2%, it can go down by 2% and go up by 2% better said, it has an absolute error of 4%.
Which was to much variance to be acceptable for my project. Since I had no way to do a redesign, I had to do a device specific calibration using a DVM and store the calibration into the uP Flash memory. A 2 point calibration @100decimals and @4000 decimals did take away a lot of the error, but it was not enough for our project. I ended up doing a tree point calibration; @100,@2000 and @4000 decimals and extrapolate from there the correct output.
Because of this, I researched what specification I should look for, to minimize these output variances. These are the most important parts to watch for if you need
accuracy:
Gain error, Offset error, Integral nonlinearity error (acronym INL) and Differential nonlinearity error(acronym DNL) . I found this paper from TI (Texas Instruments) very helpful for my understanding:
http://www.ti.com/lit/an/slaa013/slaa013.pdfNow I will start doing some calculations, and hope to receive feedback about it. I want to know if I do the calculations right.
MCP4725 - 12 bit resolutionPowering from 3.0 volts ==> Each LSB equals: 3volts divided by 12bit(4095) = 0.73mV for each LSB
Specs from datasheet:INL Error +-14.5 LSB MAX ==> 29.00 LSB per part variation MAX ==> 29LSB equ 24.25mV
DNL Error +-0.75 LSB MAX ==> 1.50 LSB per part variation MAX ==> 1.50LSB equ 1.01mV
Offset error 0.75% of FSR ==> FSR = 3.0Volts, 0.75% from 3 volts = 22.5mV
Gain Error +-2% MAX of FSR ==> FSR = 3.0Volts, 4% from 3 volts = 120mV
With this information I made this plot, is it correct?
And also one in percentages:
1This is calculated by 3000mV dividing by 12bit (=4095), and then multiplying the result by 4000.
2Please also note that these MCP4725 DAC's are not specified beyond the 100..4000 range (they make an really small footnote about this in the datasheet that the specs are not valid beyond this region). Luckily for me, I used the DAC exclusively around 200...3500 decimals.