Electronics > Beginners

(1/6) > >>

Raxios:
Hello, I've been following the EEV blog for quite a while, but I just decided to join this community.
I'm an EE student, just finished my first year, and I have run into a problem.

I'm designing a simple PSU, and I want a LCD displaying the output voltage and current, at the moment I'm on the voltage part of it, but this is where the problem occurs.

When I'm in the low ranges (about 1-1.5V) it shoots about 80mV under my fluke, and in the high end (about 26V), it shoots about 350mV above!

I could understand it if it was linear mistake, but it's fairly accurate at around 7-13V, but then starts to over- and undershoot. Is the ADC in an ATmega32 unreliable? (I'm taking the average of 3000 samples at the moment, to debug), or is my fluke out of spec? Or what is happening here? Should I get an external 12bit ADC?

Ed.Kloonk:
Not sure as the info you provided is sparse. But have you by any chance fried the chip?

Edit: Where are my manners? Welcome to the forums.  :)

Raxios:

--- Quote from: Ed.Kloonk on May 25, 2012, 02:57:02 pm ---Not sure as the info you provided is sparse. But have you by any chance fried the chip?

Edit: Where are my manners? Welcome to the forums.  :)

--- End quote ---

Thank you. :)

The chip is brand-spaking new, so I don't hope that it's flawed from the beginning.

What's basically happening is that my PSU goes from 0-~30V, I'm running my ADC from a voltage-divider between 100k and 20k, so 1/6*(<30V) = <5V, and then I'm oversampling quite a lot at the moment (I'm taking the average of 3000 samples and divide that number with 1023, then multiplies that with my max voltage).

And again, a linear offset would make sense in my head, but since it first undershoots, and then overshoots doesn't make sense to me.

Ed.Kloonk:
OK. That's good info. So now my problem I have is I have very limited experience with this type of device though I've made many a arduino smoke. A bigger problem is I have consumed an entire bottle of wine.

Raxios:

--- Quote from: Ed.Kloonk on May 25, 2012, 03:10:09 pm ---OK. That's good info. So now my problem I have is I have very limited experience with this type of device though I've made many a arduino smoke. A bigger problem is I have consumed an entire bottle of wine.