Can I switch from INTERNAL to EXTERNAL through out the sketch? If so how long should I wait before performing an anologueRead?
I would like to get the highest resolution possible when measuring a sensor that measures from 0v - 200mv max.
But I would also like to measure a temperature sensor up to 1.1 volt.
Can I put a voltage divider across the TMP36 sensor to drop its output down from the 500mv-1100mv range to the 50-110mv range?
The other question is can I read AREF? As in can I connect it direct to the battery powering the board and use it as a battery voltage monitor? While I understand I can use any analogue input to do that I dont have any left.
I would like to get the highest resolution possible when measuring a sensor that measures from 0v - 200mv max.
An op-amp to boost the signal to the Arduino 0 to 5 range would be better.
But I would also like to measure a temperature sensor up to 1.1 volt.
Ditto.
Can I put a voltage divider across the TMP36 sensor to drop its output down from the 500mv-1100mv range to the 50-110mv range?
Yes, but why?
The other question is can I read AREF? As in can I connect it direct to the battery powering the board and use it as a battery voltage monitor? While I understand I can use any analogue input to do that I dont have any left.
Perhaps you have a misunderstanding of what the REF in AREF stands for. Every voltage measured by the Arduino is relative to AREF. If AREF is not a constant voltage (i.e. comes from a battery), the "highest resolution possible" you are looking for is a joke.
If I can drop the output of the temperature sensor to the same range as the other sensor (0-200mv) then use 200mv as the EXTERNAL reference I would get the resolution I require for reading both sensor types.
Packhorse:
Can I switch from INTERNAL to EXTERNAL through out the sketch?
No. When you select internal, the reference voltage appears on the AREF pin, so you can't drive it externally as well.
Packhorse:
The other question is can I read AREF? As in can I connect it direct to the battery powering the board and use it as a battery voltage monitor? While I understand I can use any analogue input to do that I dont have any left.
You can indirectly read AREF by reading the voltage of the internal bandgap reference. Unfortunately, that reference can be anything between 1.0 and 1.2v, so you would need to calibrate it. However, deriving AREF from an unstable voltage like the battery is not a good idea because it will make all your analog readings unstable. I guess you could filter the AREF source it with a RC network, but you would need to correct each analog reading you make by also reading from the bandgap reference.
If I can drop the output of the temperature sensor to the same range as the other sensor (0-200mv) then use 200mv as the EXTERNAL reference I would get the resolution I require for reading both sensor types.
Ah yes. Brain fart moment sorry. :*
The external AREF input is only rated for 1.0V or more, IIRC the specs correctly (and certainly the noise performance will become worse and worse as you reduce it)
An opamp (better still instrumentation amp) would boost the low signal to the range the ADC handles most accurately - you could add low-pass filtering at the same time for noise-suppression. The LSB of the ADC with 5V reference is about 5mV, boosting your signal with an opamp by a factor of 10 would make the effective LSB step 0.5mV - in other words you improve your accuracy tenfold, in an ideal world.
in other words you improve your accuracy tenfold, in an ideal world.
While it will improve the resolution, accuracy is a whole other subject. Keep in mind that the AVR total accuracy specification for ADC is +/- 2 LSB, not very impressive. The AVR ADC pins are useful for many uses, but if accuracy is important one is better off considering external ADC modules. My current favorite is the TI ADS1115, 16 bit I2C 4 channel (or 2 channel differential) ADC module. It's coolest feature is progammable gain settings which can provide down to a +/- .256 volt 16 bit conversion.
Resolution is probably more important than accuracy in this case.
Really? That's quite unusual. Usually, one wants accuracy first, then resolution. It doesn't matter if the third decimal point is distinguishable of the whole number is wrong.