Connect with us

Adc of atmega32

Discussion in 'Microcontrollers, Programming and IoT' started by asad1234, Apr 27, 2013.

Scroll to continue with content
  1. asad1234

    asad1234

    9
    0
    Apr 10, 2013
    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?
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    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.
     
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    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?
     
  4. asad1234

    asad1234

    9
    0
    Apr 10, 2013
    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?
     
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    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.
     
  6. asad1234

    asad1234

    9
    0
    Apr 10, 2013
    thanks
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-