Maker Pro
Maker Pro

Adc of atmega32

asad1234

Apr 10, 2013
9
Joined
Apr 10, 2013
Messages
9
I want to use atmega32 adc i want to use its 4 channel (in single end mode) to convert four analouge signals into digital (one at a time) i have written the c code what i cannot figure out is what should i do with the ground pins of those four analog signals should i common them and give them to controller ground?and why there are two ground pins in atmega 32 (11 and 31) is one of them is for analouge signal ground?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, the grounds of your analog signals can go to ground, but what are you going to do about measuring the negative half of the waveform then (assuming it's something like audio)?

The analog ground and digital ground are usually kept separate except for single join. This minimizes the injection of digital noise into your analogue circuitry.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yes, as Steve said, it depends on what kind of signals they are.
If they are unipolar voltages, i.e. one wire is always positive relative to the other, then you can connect the negative wires to AGND.
If the signal is bipolar, i.e. an AC voltage, you may be able to connect the return wires to an intermediate voltage - typically half of the VREF voltage.

Give us a lot more information on these signals you want to measure. What do they come from? Are they fully isolated from the microcontroller circuit?
 

asad1234

Apr 10, 2013
9
Joined
Apr 10, 2013
Messages
9
Yes, as Steve said, it depends on what kind of signals they are.
If they are unipolar voltages, i.e. one wire is always positive relative to the other, then you can connect the negative wires to AGND.
If the signal is bipolar, i.e. an AC voltage, you may be able to connect the return wires to an intermediate voltage - typically half of the VREF voltage.

Give us a lot more information on these signals you want to measure. What do they come from? Are they fully isolated from the microcontroller circuit?

Yes they are coming from completely different source they are isolated by transformers.4 transformers generate four analouge signals.Then they are converted into unipolar signals using rectifiers(4 different) and which pin is AGND ?(11 or 31 because both are labelled GND) should i connect two GND pins together and all the 4 -ve terminal of analoge signals with them?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, good. The analogue circuitry should be grounded to an AGND rail, which should be kept separate from the circuit's main GND rail. At a single point, connect together the AGND rail, both of the MCU's GND pins (using short wires) (you don't need to bring the two GND pins to the single point separately, as long as you use short connections), and the main circuit ground rail.
 
Top