reading mV

Hello all
I'm a newbee so forgive me.

I've been playing with the Arduino Uno. I'd like to measure 0-100mV with 0.1mV resolution. I used the Internal 1.1 reference and got the about 10mV resolution. Can I use the Aref pin at 100mV to get the 0.1mV resolution I want?
When I tried it the read value just stayed at max (1023). Also I have read that if I use the Exertnal reference I can't use the internal reference in another part of the code since it will short the internal with the external on Aref... is this correct?

Well that's what I'm trying yo pull off thanks in advance

I think you'd be better off passing that signal through an op-amp to boost it to the 0 to 5V range that the Arduino normally supports. Op-amps are cheap, and the associated resistors and capacitors will hardly break the bank.

Yea I tried that but for some reason the Op-amp out was not linear throu out the range. I could tune it for the upper or lower range. Maybe I need a better op-amp circuit.

Can you show us the op-amp circuit you tried?
Gain of 50 to get .1V up to 5V should not be hard to do.

Another option is to use higher bit resolution external A/D.

If you had the internal 1.1V reference, than 1 bit represents 1.07mV,
so you should be able to get readings of 0 to 100 (0x64) with 100mV signal.
I dont follow your 10mV resolution comment.

I used the Non-Inverting with a LM358n ( so I could use the 0-5V as a source)
R1 9K (pot for fine tuning)
R2 1K

Total gain 10
Still used the 1.1 reference

I got the 10mV since the LCD only read 0.00 and I only see the last digit change. haven't figured out how to make the float display more digits yet. :cry:

here is my code

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//Variable to hold A0 reading 0-1023
int A0_Value=0; 
float F1=0;
float PercentOfInput=0.0;

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Hello, world!");
  // Set Analog reference to Internal 1.1Volts

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  // Set the curser to column 6 row 2
  lcd.setCursor(6, 1); 
  lcd.print("          ");
  lcd.setCursor(6, 1); 

  A0_Value = analogRead(A0); // read A0 value
  PercentOfInput = float(A0_Value)/1023*100;
 // lcd.print(A0_Value);
  F1= (PercentOfInput)*0.011;
  lcd.print(F1);  // Print to LCD

Why not have your answer display in mV?
result = A0_value * (1.1/1023)*1000 (with no gain)

so that 0b0000000001 = 1.07 (mv)
0b0000000010 = 2.14mV
0b0000001010 = 10.75mV

Thank you for how to read it in mV But if I understand this I still only have 1.07mV resolution.

So back to the original question. Can I use ARef to get there (0.1mV) and if I do am I stuck with the ARef voltage for all my Analog input?

Building the 50 Gain circuit to see what happens


I would experiment - I don't think anything is set in stone as to when


analogReference(EXTERNAL); // ??

is called - maybe just a time thing to let the voltages settle before taking a reading.

Apply a 1/2 volt, write a little code to change back & forth, see what happens.

Even if you just use a gain of 10 to get your signal to 1V, you could use the 1.1V internal reference, and then 1 bit would represent 0.1075mV for your display.

According to the 328 datasheet there is an electrical specification limit of minimum Aref voltage of +1vdc, so getting resolution of .1mv per count just isn't possible without external amplification. There should be no problem using an external opamp to get the resolution you are looking for.

According to the 328 datasheet there is an electrical specification limit of minimum Aref voltage of +1vdc, so getting resolution of .1mv per count just isn't possible without external amplification.

The MEGA (atmega2560) has 4 ADC channels with optional 10x and 200x gain. If you used that one with the internal 1.1v reference you could get pretty close to 0.1mv per count. Of course, reading the datasheet further you can see that the last two bits are garbage (this is a sad fact of life with most ADCs, especially those integrated into uCs), so in the 0-100mv range (with 10x gain on and 1.1v ref) the best you can do is about 1/2mv.

There are however many nice and easy to use ADCs out there. TI may even give you a free sample.