User manual
LPCXpresso Experiment Kit - User’s Guide
Page 57
Copyright 2013 © Embedded Artists AB
Figure 26 – Breadboard Connections for Light Sensor R24
7.6.4 Lab 5d: ADC Noise Test
As seen and experimenting with in Lab 5a and 5b, here is noise in converted analog values. In this
experiment we shall investigate the ADC noise in more detail. We shall gather statistical information
about the noise distribution.
Create an application that gathers 1 000 000 samples from AIN0 and sort these values according to
frequency in occurrence. One solution is to create an array of 1023 32-bit variables and let each of
these variables be a counter representing the number of times that particular value has been
observed. This solution would require 4kByte of RAM, which is not a problem. It the resolution would
have been higher, for example 12 bits then the memory consumption might be too high. An alternative
solution would be to have a smaller array. Take one sample to determine in which range the vales
seems to be. Then set a range of for example +-32 around this value. Also have two special counters
that represent values under or above the edge values. This way it would be simple to check if the
range accidentally is bad.
The result shall also be printed in the console in a user-friendly way, so that the result is easy to
understand for the user.
What can the possible source of noise be?_____________________________________________