Bit of a noob question...
I want to maximise the resolution on an analog input. So I understand the acceptable range is 0-5V, with a 10bit resolution, making 1,024 possible levels. That means one level is about 4.882 mV.
For various reasons, it would be easier for me to make my sensor provide a signal of say, 1V maximum. But then I suppose that I can't get full granularity on that weak signal... is that correct?
Or is there some way that I can say to the Arduino mega, the input is between 0 (minimum) and 1V (maximum), so give me your full 10bit resolution over that range. That would mean one level is about 0.977 mV
Not sure if I'm explaining this very well.
You can use the internal voltage reference, that is 1.1V so it spreads the 4096 levels over a smaller voltage and you have a step that is about five times smaller. Look up how to do this in the reference documentation built into the IDE.
This function: http://arduino.cc/it/Reference/AnalogReference can set the internal reference of 1.1V.
analogReference(INTERNAL); // set internal reference of 1.1V
delay(20); // wait some time for the analog reference to become stable
Also you'll probably have to calibrate the analog reference for your chip, they vary quite a bit between chips, and include the calibration value in your code. An external precision voltage reference would be another way to go (so long as its not less than 1V).
Another approach is amplify your signal before feeding to the ADC, yet another is to use an external ADC with the properties you desire.