eRCaGuy_NewAnalogRead (downloadable Arduino library)

$0+
5 ratings

Recommended donation: $5 for home use; $100+ for business use (please, be generous, depending on the value this adds to yourself or your business), for a copy of this code under the included copy-left, open-source GNU GPLV3 or later license. Otherwise contact me if you'd like to purchase an alternate, non-GPL commercial license for non-GPL-compatible business use.

Enter a donation amount, or $0, above. Donations are greatly appreciated. 

License: open-source, copy-left GNU GPLV3 or later license. Commercial (closed-source, proprietary) licenses sold at request. Contact me if desired.


Have you ever discovered that you can't detect small enough voltage changes on your analog pins when using the analogRead() function? Have you considered buying a higher-resolution external ADC (Analog to Digital Converter)? Have you ever wished you could take analog samples faster? If so, this library is for you.

"Hi, I have used your oversampling library in order to catch spectral information from a flame emission atomic spectrophotometer and the data obtained was really good. Thanks for your excellent library (see report in my blog, in Spanish). Regards." ~Alberto Villalobos, http://hombrosdegigantes.blogspot.com/2015/03/aumento-virtual-de-la-resolucion-de-un.html

"I use your library for measuring temperature with [a] Pt100 resistance thermometer (RTD). This library's advantage (besides the higher resolution) is a smoother line on the graph - and of course avoiding an ADC chip." ~Szőcs Márton

This library will save you money. On many projects, it works well enough to keep you from having to buy an external ADC that you would have otherwise had to purchase. It will just keep helping you on all future projects. Your donations provide a great value to you while they brighten my day, help support my family, and keep me doing and sharing my projects!

This is an Arduino library which does two things: 

1) You can call adc.setADCSpeed(ADCSpeed) to change or increase the speed of the ADC (Analog to Digital Converter). Ex: calling  adc.setADCSpeed(ADC_FAST) increases the max analog sampling rate, when at a resolution of 10-bit samples, from ~10kHz to 50kHz. 

2) The library uses oversampling to increase the analog sampling resolution of an Arduino. You can call adc.setBitsOfResolution(bitsOfResolution) to change the desired sampling resolution. Standard resolution is 10-bits, which returns values from 0 to 1023. Calling adc.setBitsOfResolution(12), for instance, increases the sampling resolution to 12-bits, which is 4x the resolution as 10-bit samples!

Once you configure the speed and resolution, call adc.newAnalogRead(pin) to take a sample. 

For additional functions and usage, refer to the included example code. 

Main library page: http://www.electricrcaircraftguy.com/2014/05/using-arduino-unos-built-in-16-bit-adc.html.

$
I want this!
1,448 downloads
Required Software
Arduino IDE
Required Hardware
Arduino Uno or similar
Size
402 KB
License
GPLV3 or later (contact me if you'd like to purchase an alternate license)
Copy product URL

Ratings

4.8
(5 ratings)
5 stars
80%
4 stars
20%
3 stars
0%
2 stars
0%
1 star
0%
$0+

eRCaGuy_NewAnalogRead (downloadable Arduino library)

5 ratings
I want this!