Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: Mayfly v1.1 technical questions forum thread

Home Forums Mayfly Data Logger Mayfly v1.1 technical questions forum thread Reply To: Mayfly v1.1 technical questions forum thread

Shannon Hicks

    The ATmega1284P processor of the Mayfly is similar to other basic Arduino boards with the 324P processor in that it has an internal 10-bit Analog-to-Digital converter (ADC).  There are 8 ADC pins on the 1284P (not all 8 are available on the Mayfly header because some are permanently designated for certain measurements or functions), so these ADC pins can be used to read analog voltages, however at a pretty coarse resolution (1024 bits over the 3.3v sample range).  But these analog pins can also be used as digital pins just like the regular digital pins (D6, D7, etc).  So you can use statements like digitalWrite(A2) or digitalread(A2) if you’ve run out of regular digital pins and need some extra inputs or outputs.

    The AuxAnalog pins on the Mayfly are unique in the Arduino board ecosystem because it’s a separate ADS1115 16-bit ADC that included on the Mayfly board.  That chip allows multiple high resolution readings (either 4 single-ended or 2 differential) and faster sample rates, so if you’re trying to precisely read an analog voltage with a Mayfly, then using the AuxAnalog pins will usually give you better and more accurate readings (when done properly).