ATtiny13L ADC (with internal Vref) Low Accuracy

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there,
I try a project using ATtiny13L debuging with MKII. I use the ADC module using the internal V Referance (1,1V), for single conversions in all ADC channels. The project Vcc voltage is from 5,5V to 2,0V. I have checked and set the ADC Clock, and all the internal registers. The problem is that in this mode the accuracy is very very low, in contrast with the other method using the Vcc Voltage as Vref.

For example:
Vref = Internal 1,1V (Data Sheet internal Vref accuracy is standart but 1,0V < Vref < 1,2V)
The input pin voltage is 0,7V and the 8bit ADC must be 163 (in theory), but the real ADC is between 145 and 170.

In the other case using the Vcc as Vref everything is fine.

Does anybody used the internal AVR Vref before, based on the Tiny13L or any other AVR (like Mega16L 2,56 internal Vref)?

If anybody knows something I miss, then please help.
------------------------------------------------------------------------------------------------------------
Thanks a lot,
Michael

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know if this is the problem or not, but the default for the reference is VCC. To switch to the internal reference you must set the REFS0 bit. There is a comment in the datasheet that the first conversion after switching the reference will likely be inaccurate and should be discarded.

Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The internal reference can be up to 9% above or below the nominal value (1.0V<1.1V<1.2V). Your results are a perfect validation of that. Your parts appear to be working perfectly.

5V, on the other hand, is probably coming from a regulator that didn't have to compromise analog and digital on one chip. It's common for lightly loaded 5V regulators to be within 2% of their specified value, and often you'll see 1%.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hallo Dave, thanks for your reply.
I have red about the first conversion in the past and I know exactly the reason, but there is no fully conversion. Try this (if you can) using the Tiny13 for auto running conversions, forget the first once and check all the others. Then you' ll understand how big is the problem.

For Mr "mneary", thanks a lot for your reply. There is no voltage regulator in my project. It is a low cost project using free voltage Vcc from 2,0V to 5,5V. Yes, you 're right about the Internal Aref accuracy but, let's say that the internal Vref is 1,04V (Ok it's Atmel's accuracy), but you know the Aref will be always 1,04V stable and the measurements must be always stable. What can I say.

Anyway thanks a lot,
Michael

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer