Increasing the voltage capacity of analog inputs

I need to read analog voltages between 0.5 and 11V using my Arduino. Since the voltage inputs of Arduino cannot exceed 5.5V, any suggestions other than voltage division technique?

Just for interest why don't you want to use a voltage divider? They're so simple they're just about foolproof.

Steve

Never mind :stuck_out_tongue:

rosh_kazhak62:
I need to read analog voltages between 0.5 and 11V using my Arduino. Since the voltage inputs of Arduino cannot exceed 5.5V, any suggestions other than voltage division technique?

You could use a capacitive divider if only interested in the ac component...

Thank you, Steve. By dividing the voltage you are reducing the accuracy of the measurement by the same value. Just hoping for any other methods without reducing the accuracy.

With a voltage divider and Arduino's 10-bit A/D you get a resolution (steps) of about 10mV over that range.

If you want a higher resolution, then you need a 12- or 16-bit A/D (with a voltage divider).
An ADS1115 breakout board could be ok.
Leo..

Wawa:
With a voltage divider and Arduino's 10-bit A/D you get a resolution (steps) of about 10mV over that range.

If you want a higher resolution, then you need a 12- or 16-bit A/D (with a voltage divider).
An ADS1115 breakout board could be ok.
Leo..

Thanks man. 10mV accuracy is more than sufficient to read the analog sensor output.

rosh_kazhak62:
Thank you, Steve. By dividing the voltage you are reducing the accuracy of the measurement by the same value. Just hoping for any other methods without reducing the accuracy.

No accuracy lost - provided you use good quality resistors (low noise, low temperature coefficient), and use values high enough to not overload the sensor, low enough to provide good input to the ADC. The resolution of the ADC remains the same.

One way to improve your accuracy is to bring the voltage down to 0-1V range, and use the internal 1.1V reference for the ADC. The actual value of that 1.1V has to be calibrated (it has a 10% tolerance), but it's a very stable value. Otherwise your reference is the 5V Vcc of the Arduino, and that's likely to be far less stable.

wvmarle:
No accuracy lost - provided you use good quality resistors (low noise, low temperature coefficient), and use values high enough to not overload the sensor, low enough to provide good input to the ADC. The resolution of the ADC remains the same.

One way to improve your accuracy is to bring the voltage down to 0-1V range, and use the internal 1.1V reference for the ADC. The actual value of that 1.1V has to be calibrated (it has a 10% tolerance), but it's a very stable value. Otherwise your reference is the 5V Vcc of the Arduino, and that's likely to be far less stable.

The range of output voltage from the sensor is wide, from 10.6V to 0.5V. I was trying to fit in the 5.5V (Vcc+0.5V) range of the Arduino analog input to record the data. To bring it down to 1.1V, might need a change in the circuit, a series of 1K with a 10K resistor, with the output measured from the 1K resistor.

Do you have any suggestions?

1k:10k could work for <=10.6volt, or even 10k:100k if battery powered.
Try this (untested).

float voltage;

void setup() {
  Serial.begin(9600);
  analogReference(INTERNAL); // enable ~1.1volt Aref
}

void loop() {
  voltage = analogRead(A0) * 0.01154; // calibrate by slightly changing the last digit(s) of this value
  Serial.print(voltage);
  Serial.println(" volt");
  delay(500);
}

Leo..

Wawa:
1k:10k could work for <=10.6volt, or even 10k:100k if battery powered.
Try this (untested).

float voltage;

void setup() {
  Serial.begin(9600);
  analogReference(INTERNAL); // enable ~1.1volt Aref
}

void loop() {
  voltage = analogRead(A0) * 0.01154; // calibrate by slightly changing the last digit(s) of this value
  Serial.print(voltage);
  Serial.println(" volt");
  delay(500);
}



Leo..

Hi, why did you multiply the input voltage by 0.01154? I am also a newbie with the coding as well.

Probably:

1.1 / 1023 * (10 + 1) / 1 = 0.01183

Digits a bit different; but this should be the calculation.

The first division is ADC reading to ADC input voltage; the second is the voltage divider.

Note that the 1.1V has a 10% tolerance so this value may be up to 10% off - it has to be calibrated using a known input.

wvmarle:
Probably:

1.1 / 1023 * (10 + 1) / 1 = 0.01183

Digits a bit different; but this should be the calculation.

The first division is ADC reading to ADC input voltage; the second is the voltage divider.

Note that the 1.1V has a 10% tolerance so this value may be up to 10% off - it has to be calibrated using a known input.

To calibrate we supply a known voltage to A0 and get the output from say A1. Is that the method?

No, known voltage to A0, get output from A0.
Best done with your voltage divider in place, as those resistors also have a tolerance. That way you can do the whole thing in one go. Best to apply a number of voltages - 0, 1, 2, ..., 10V. This should give a linear output, and for final calibration value you take the average of the reference voltages calculated from those inputs.

That is a wonderful idea. How do you read the output from the same pin? There is no display port with Arduino nano.

Print to the Serial console.

void setup() {
  Serial.begin(9600);
  analogReference(INTERNAL); // enable ~1.1volt Aref
}

void loop() {
  Serial.print(F("Reading: "));
  Serial.println(analogRead(A0))
  delay(500);
}

This will do. Just connect the voltage to your voltage divider, and write down the reading you see on the Serial monitor.

Formula is correct, but I used a slightly lower value for Aref than 1.1volt (about 1.074volt).

The sketch currently outputs 'voltage' from pin A0 to the serial monitor of the IDE, two times per second,
but it's up to you what, or what else to do with it.
Blink a LED when the voltage is too high and/or too low, or display the voltage on an LCD, or...
Leo..

slipstick:
Just for interest why don't you want to use a voltage divider? They're so simple they're just about foolproof.

Steve

Typically, we measure within 0-5V, but the max voltage I would be measuring will be 10.6V and the half of it comes to 5.3V exceeding the limit. Is there any way to overcome it.

Wawa:
Formula is correct, but I used a slightly lower value for Aref than 1.1volt (about 1.074volt).

The sketch currently outputs 'voltage' from pin A0 to the serial monitor of the IDE, two times per second,
but it's up to you what, or what else to do with it.
Blink a LED when the voltage is too high and/or too low, or display the voltage on an LCD, or...
Leo..

Yes, need to display this voltage in an LCD. I was thinking of connecting Arduino to a Rasp Pi 3B using a serial connection and then use Pi to display the data obtained to an LCD.

Why complicate things with a Pi? There are plenty of LCDs you can drive from an Arduino.