Characterize Analog-Digital when using Internal Reference

mrburnette

Senior Member
Sometimes a design just begs to be simple. Such is true when using a PICAXE for AD when there is just no need to go to the expense of building/buying an external high quality voltage reference for the 10-bit output.

With some time on my hands today, I decided to characterize an internal reference source which is around 2.4 volts or so. To do this, I used my lab power supply and a lab meter to secure an rather accurate millivolt source. With the circuit on a stable breadboard, I tied the two AD inputs together and then fed the lab supply to this connection after establishing a common ground. I DID NOT make any attempts to bypass the AD leads, rather I did utilize a rock-stable 5V supply.

So, I took readings at various points... allowing the AD to stabilize for about 20 seconds, then I recorded the readings for 20 more seconds. For my calculations, I took the central 10 contiguous readings and loaded them into Excel. I started at 0.5V and repeated at 1.0V, 1.5B, 2.0V, 2.25V, 2.35V, and ended at 2.38V.

I graphed each series and noticed that a sinusoidal "noise" was obvious in my readings and accounted for a +/- 1 or 2 AD value... this really is a good thing to see, because it suggests that the AD circuitry inside the uC is doing a proper job and that I have enough values to show the mean arithmetic average.

Using the mean average across each of the test groups, I then graphed those values. The resulting graph shows a Regression Coefficient of 1.0, so I was either very lucky or I managed to get a good set of numbers for my test. The test was performed at 20C (68F) and would need to be repeated if I expected to need accurate results at an elevated or reduced temperature. As we know that R-squared is 1.0, the equation can be corrected by just adding or subtracting a constant in the PICAXE code.

This is not intended to be an elaborate or terribly accurate procedure, but one that you can utilize rather quickly so that you are assured that your AD output is reasonably accurate. Just use my Excel sheet as a starting point and you will be able to perform the same feat in a jiffy.

- Ray
View attachment 13109
View attachment 13108
 
Top