I would like to discuss two ADC reading approaches that I have been tossing around in my mind to increase your sample accuracy.
Consider a Arduino Uno,Mega etc connected to a analog sensor producing a 0-5V output.
The high level concept 1 is as follows:
Set the ADC Internal AREF to max i.e Vcc and sample.
If the value is below 226 set the Internal AREF to 1.1 and resample.
If the value is between 226 and 525 set the AREF to 2.56 and resample.
Concept 2 is even more fun.
Create a 10k,100k voltage divider with the center to A0 as input (such that A0 is 1/10 Vcc).
Tie Aref pin to An Analog Out (A1) ...with a basic low pass filter and possible buffer.
Set Aref to internal 1.1V ref read A0 and store value.
Set Aref to External and write 1.1 volts to A1.
read A0 and store.
Use the two reading to calibrate.
Now you can dynamically scale the Aref using the arduino analog out (A1).
Sampling would be similar to approach 1 but using our dynamic ARef.
You would then sample a value by setting A1 to 5V taking a sample,
You can then scale A1 lower according to your reading and resample.
Both concept 1 and 2 will require that your input have a low pass filter such that the input voltage can not significantly increase while sampling. if a sample takes 100 microseconds then a 1ms(1kHz) RC low pass filter should suffice.
What do you guys think? Am I just crazy or could this work?
first off, you are krazy, but both would work, and be in conflict with the subject line.
did you mean the subject line to say,
Method to obtain the best possible Analog reading discussion and limit the input to the 10 bit ADC ?
you can get much higher resolution from an external ADC and not need to alter the range.
don't forget that your data will be useless unless you also note the span setting at the time of the reading.
one reading could be the exact same input value, but the spanned input value might be an order of magnitude different
Lol, I do not believe this will limit the input at all?
If it works this will allow for better resolution the lower the analog voltage. with that said, take a temprature sensor for example, yes you have set the 0 - 5V to correspond to 0-100C but most of the time (depending on where you are/application) it will be running at 15-30C. Using this method will dynamically scale your Aref such that the best reading is obtained.
Yes, as you mentioned each reading will need to be in reference with the chosen Aref value.
If no one else sees a flaw in this, I would like to implement it in my application.
One big flaw, is that obtaining a stable, ripple free software controlled reference voltage requires a lot of external circuitry. More than you think, I believe. Anyway, why not go and do some experiments?
Thanks aarg for your feedback, I believe this would actually improve the "standard" Varef that we all use.
By default when we sample the Arduino is set to Varef of Vcc which is only as good as your 5V power supply.
My method (2) would calibrate the dynamic anolog output using the 1.1v internal vref circuitory thus improving in accuracy.
Yes, best would be to test it now that I know it could be feasible.
You would probably have answered your own questions more quickly by writing some simple code and doing tests. The Arduino system is great for learning-by-doing.
You need to have something independent (such as a reliable multimeter) to verify the Arduino results. This Forum cannot do that part.