Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] adc power supply(linear or switching)

Status
Not open for further replies.

banner

Member level 1
Member level 1
Joined
Oct 6, 2009
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
iran
Activity points
1,529
hi
I have to implement an adc funcyion with microcontroller(using atmega16 adc), is it correct to drive the micro with switching power supply?or it may degrade adc function? is there any ripple rejection method inside the microcontroller for ADC power supply part?

thanks in advance
 

Hi,

it depends on your power supply filtering, but usually using a linear power supply is better and you can achieve better results. Normally in microcontrollers there is no internal ripple or switching noise rejection, (because it needs large capacitors or inductors (in Chip Scale)) , and usually they have an extra power pin for adc , so you can use external power supply filtering or even use a very precise reference regulator.

According to ATMEGA32 (i don't have ATMEGA16 datasheet at the moment), it has 3 adc/vcc related pins :

VCC : microcontroller power supply
AVCC : PortD+ A/D Power
Aref : A/D reference Voltage

According to datasheet : you should connect your AVCC to VCC Pin with a low pass filter.
You should connect a capacitor between AREF and GND.(Near Aref Pin)

you can use Aref (internal 2.56V) or AVCC as ADC reference in your program. You may use ADC in noise canceler mode (depends on your program) which halts the main core during the ADC sampling to eliminates negative effects of internal clocks on ADC Sample.
 
  • Like
Reactions: banner

    banner

    Points: 2
    Helpful Answer Positive Rating
Hello.

Also relevant to this subject is what are you going to measure with the ADC?

Regards
 

Hi,

I agree with memarian.
I want to comment one point. Memarian suggests to use the internal VRef. This I see as one very important point.
When you use VCC as ARef, then every change in VRef will affect the ADC result.

Besides this try to keep GND pin current of the complete microcontroller low. While the top level of thd ADC is dtermined by VRef, the bottom level is determined by GND. From PCB gnd there is an impedanc to the internal chip gnd. Every gnd pin current causes ground bouce causing an error in ADC reading.

VCC or better AVCC - when not used as VRef - is not that critical. You may find in datasheet ADC chapter a PSRR specification. This shows how much a change in VCC wil change the ADC result.

Use a gnd plane.
Use capacitors next to the ADC inputs to filter out unwanted noise.

Usea scope (AC mode) to see the noise on VCC - with varying power consumption.Often you will see the bigger noise with low current consumption when the SMPS is in burst mode.

****
I just tested a self made PCB, where a switch mode DCDC converter is 10mm away from a 16bit ADC. Split gnd plane, filers and capacitors next to the ADC inputs make the 10ksmpl/s readings stable to +/-1Lsb. Some experience and some effort in PCB layout was useful.

Hope this helps

Klaus
 
  • Like
Reactions: banner

    banner

    Points: 2
    Helpful Answer Positive Rating
Hi,
actually i can not use internal Vref as the reference,because I want to measure 1-5volt.
 

Hi,
actually i can not use internal Vref as the reference,because I want to measure 1-5volt.

Hi,
You can use internal reference voltage and use a simple 1/2 resistor voltage divider in ADC input if it's possible. (use precise 1% or 0.1% Resistors),
But if you really want to use the same 5V VCC as Reference voltage use a low pass filter and place it near AVCC Pin.
 
  • Like
Reactions: banner

    banner

    Points: 2
    Helpful Answer Positive Rating
Hi,

i fully agree with memarian.

Using a voktage reference instead of VCC is the way to go.
VCC is not to designed for low noise and low drift.

I always recommend to use an RC combination at each ADC input. With and additional resistor you have a voltage divider and you can measure 5V (and about any other higher voltage) precisely and reliably.

***

Klaus
 
  • Like
Reactions: banner

    banner

    Points: 2
    Helpful Answer Positive Rating
Hello.

I don't know if this is cost effective but to get a precise voltage divider one could use the LT5400, it contains 4 resistors in a 8-lead MSOP for 8USD.
The 4 resistors are of 2 different values(2 of each) in different ratios, though the absolute aaccuracy in resistanse might not be very good the matching between them are 0,01% for the better one and 0,025% for the cheaper one. Ether way the make for exelent voltage dividers for ADC measurements.

Regards
 

Hi,

It is a ATmeaga ADC with 10 bits resolution. Any precision better than 0.1% is overkill.

Klaus
 
  • Like
Reactions: David_

    David_

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top