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 analog reference voltage (AREF) pin of the ATmega1284P is broken out to the left-hand 2×10 header if you wanted to apply a voltage other than (and less than) 3.3v.  If you leave it floating and don’t specify the AREF in your code, then it’ll use the default 10-bit setting for any regular analog reading like you’ll find in most code examples.  If you apply a voltage other than 3.3v to AREF, you’ll need to add code to tell the sketch that you want to use AREF as the reference, plus take that into account for any ADC calculations you make.  So follow examples you might find online for other Arduino boards for using a custom analog reference.  I broke out the AREF to the header in the rare chance that someone would want to use it, but we found that most people are much happier with the increased resolution and sample rate and code flexibility of the aux ADC that I don’t know of anyone actually modifying AREF, but the capability is there on the Mayfly board if you want it.