Work In Progress!

Calibrating DAC channels

DACs have non-linearities that are repeatable, but are not usually periodic. Hence, generating a single calibration polynomial is difficult (At least up to a few orders ). A lookup table is the general solution for making an accurate programmable voltage source. Read more about INL errors here

The following image shows the deviation of one of the programmable voltage sources (resolution 1.6mV. +/-3.3V range) from the expected value(red trace) , and the accuracy of the same post-calibration(yellow trace ). The PIC has copious amounts of flash, and lookup tables and calibration constants can stored in it and loaded by Python upon initialization.

The overall slope and offset is caused by the amplifying op-amp and corresponding resistors, and can be fixed with a second order polynomial easily.

The jagged shape however, is a property of the DAC itself, and is corrected using a lookup table that stores the error in each code in terms of number of codes to skip forward/backward in order to achieve the highest resolution without compromising on accuracy.