Voltimeter Report
Below there is a representation of how the potentiometer was pluged to the hardware device - AVR ATMega 16:
Design (view source code for more details):
There are two classes. The main class is responsible for start the timer, initialize the apropriated registers and to show the conversion result in the leds. The timer class is the trigger source for the ADC conversion.
Sampling rate:
The sampling rate used was 0.25 seg.
Resolution:
The 10 bit value that represents the result of the conversion is converted into a 8 bit value (view showResults() method). This is because there are only 8 leds to represent the desired value.
Maximum error (theorical):
There is 3 sources of error.
One is the multimeter used (TOYO TY-1000), that has an error of +/- 0,8% for the readed values.
The second source of error is the hardware set. In accordance with the ATMega manual, the minimum absolute error is ½ LSB due to quantization. The offset and the gain error are also obtained consulting the manual.
The third source of error is the 10 to 8 bits conversion.
Measurements and errors:
Some values were measured to check the correct functionality of the converter:
Real Value Leds Value 0 0 1 1,01 2,5 2,5 4 4 4,9 4,9 According to this, the error obtained was of 1% in the worst case.