Discard first ADC result?

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

Hi!

Quote:
The first ADC conversion
result after switching voltage reference source may be inaccurate, and the user is
advised to discard this result.

I want to make single ADC conversions every 100 ms or so and turn the ADC off in between to save energy. Will the first results after turning on the ADC have the same inaccuracies as when switching voltage reference and is it then, too, recommended to discard them?

Thanks, Bernhard

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

I would say yes--take a few measurements after starting up the ADC.

Some/much of the answer will depend on what voltage reference you are using and the timer (or number of conversions) for it to stabilize.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I plan on measuring Vcc through a voltage divider against the internal 1.1 V reference.

I want to make a beeping throwie. Solar cells charge a capacitor. The uC beeps until Vcc comes near 2.7V and it goes to sleep, wakes up after 8 s from the watchdog. I don't want to go below the minimum nominal Vcc as I'm afraid this might lock up the uC. I could use the brown out detector, but this uses more current. Not much, really, about 20 uA and the solar cell delivers 1.8 mA when in the sun. But in the shade there is less current ... so I contemplate using the ADC.

If I had to do serveral ADCs each time this would use more energy. The ADC draws 150 uA, but only for 200 us each time.

Currently I have an ATtiny45.

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

Quote:

I plan on measuring Vcc through a voltage divider against the internal 1.1 V reference.

You might want to review this thread:
https://www.avrfreaks.net/index.p...

Perhaps you could use an analog comparator circuit that "floats" except when you are doing a reading?

Are you going to use a supercap?

Won't these uA for BOD be dwarfed by your beeper?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:

You might want to review this thread:
https://www.avrfreaks.net/index.p...

Interesting.
Quote:
Perhaps you could use an analog comparator circuit that "floats" except when you are doing a reading?

Yeah, that's probably a quick way to check if I have reached my threshold voltage. The AC draws 37 uA (according to the datasheet), so I could use the interrupt to put the uC to sleep just above 2.7V.
Quote:
Are you going to use a supercap

I don't think so. Not ATM. That might be an option for operation into the night.
Quote:
Won't these uA for BOD be dwarfed by your beeper?

Possibly, I haven't measured it yet. I can pull "arbitrary" currents from the cap. But while charging with a small solar module I want to minimize current consumption. The module gives me 3 mA short circuit current in full sun and 500 uA in the shade. That would actually allow using the BOD. But if I minimize current consumption I can operate longer into the dawn, especially in the shade or with overcast weather.