Measuring voltage of various devices simultaneously

Hi all,

I was wondering whether it was possible to measure the voltage of various (4) devices (solar cells) simultaneously, or if I should prepare 4 Arduino circuits for this purpose? Also, the voltages are very low (around 0.5V), is there a way to get higher precision for the voltage measurement? (I don't need the info between 0.5V and 5V).

Thank you!

You can use 4 analog inputs to measure 4 voltages. It takes about 100 microseconds to measure one value.

Use the internal voltage reference to make the ADC range 0 to 1.1 volts (approximately). The reference needs to be calibrated against a known standard.

Thanks a lot. Would a 1V or 1.2V battery be a suitable standard? Or would a voltage drop occur and therefore cause erroneous voltge measurements? The device should take measurements during a whole day every minute or so.

Would a 1V or 1.2V battery be a suitable standard?

No.

Use a multimeter to calibrate your measurements.

I just realized that a built-in 1.1V reference is available for Arduino Mega. From what I understand, this means that I do not need to plug in any external reference. Do I need to calibrate the internal reference? If so, how should I do this?

The internal nominal 1.1V reference can be between 1.0 and 1.2V, so without calibration the accuracy should be within about 10%.

I just realized that a built-in 1.1V reference is available for Arduino Mega.

Amazing! Reread reply #1.

"Selectable 2.56V or 1.1V ADC Reference Voltage" Two, actually. See Section 26 of the datasheet, and this link from the Learning/Reference tab: https://www.arduino.cc/en/Reference/AnalogReference

Sorry for having answered too fast to the first reply. Thank you for this valuable info. I will find some tutorials regarding the internal voltage reference calibration, I believe it's quite widespread. Best wishes

You could connect a battery + to a 20K resistor then a 1.1V zener diode that you ground the other end of. Connect the reference pin between the zener and the resistor. You'll get what you can check, should be the zener voltage. Maybe a bigger resistor would work and the battery would last longer.

AVR chip has only 1 ADC. It reads 1 pin at a time and needs settle time between pin changes. Each 1-=bit read takes at least 105 microseconds. No, you can't make 4 simultaneous reads with 1 AVR but you can make 4 10-bit reads in about 1 millisecond, if that's close enough? Otherwise, look into breadboarding AVR chips like the cheaper 8-pin Tiny85 that also has ADC and can work with SPI, I2C and serial as a dedicated sensor controller. Look up MIT high low tech for files and instructions on the Tiny's. They went for less than $1.25 each in 10 or more at Mouser before, it has a full AVR core to handle its job. Even at 8MHz (internal clock saves 2 pins and it can run at 3.4V compatible with SD and other 3V devices) they can watch and change the heck out of a few pins.

Nongsai: I will find some tutorials regarding the internal voltage reference calibration,

The best source of information is the Atmel datasheet for the microprocessor you are using.

...R

Hi, An important question, the PV cells you are aiming to measure, are they connected together, if so how?

Can you please post a copy of the PV cell arrangement, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :)

Thanks for the most recent inputs. So connecting the reference pin between the zener diode and the resistance and measuring the voltage is the calibration procedure?
To answer Tom: I will measure the voltage of individual cells, so without any arrangement.
Best

Nongsai: So connecting the reference pin between the zener diode and the resistance and measuring the voltage is the calibration procedure? Best

No.

Just connect the four single cells to four analogue inputs, and get the A/D value of each input with the internal reference enabled in void setup(). That should give you A/D values of about 500-600. A maths line in your code can convert that A/D value to voltage. The maths line should contain the reference voltage of the Arduino you're working with.

Two ways to calibrate. 1) Measure voltage on the Aref pin with a DMM, and use that voltage in the maths line.

2) Measure e.g. voltage on first solar cell under direct sunlight with a DMM, and see if the serial monitor displays the same voltage. Change the Aref value in the maths line, and re-upload, untill the serial monitor displays the same as the DMM.

The second approach could be more precise.

Write the Aref voltage on the board for future reference. Leo..

Thanks Wawa for the very useful post. It gives me the procedure which I need to follow and still lets me work things out. Cheers!

If I may, I’d like to ask 2 questions regarding the last post:

  • When you say I should expect 500-600 for the A/D value, do you say this because solar cells usually give a voltage of around 0.5V, which is about 45% of 1.1V and thus about 45% of 1023, thus around 465? Or was there a completely different reasoning behind these numbers?

  • To calibrate: say I want to use method 1. I plug the DMM between the AREF pin and the GND pin of the Arduino, right? So the AREF pin takes the internal reference voltage value of 1.1V once it has been activated via the sketch? I mean, there are 2 possible internal voltages as mentioned before in this thread, one of 1.1V and one of 2.56V. Also, the AREF pin could be used to plug in an external voltage reference. So, is it the sketch that attributes the 1.1V voltage to the AREF pin?

Nongsai:
When you say I should expect 500-600 for the A/D value, do you say this because solar cells usually give a voltage of around 0.5V, which is about 45% of 1.1V and thus about 45% of 1023, thus around 465? Or was there a completely different reasoning behind these numbers?

  • To calibrate: say I want to use method 1. I plug the DMM between the AREF pin and the GND pin of the Arduino, right? So the AREF pin takes the internal reference voltage value of 1.1V once it has been activated via the sketch?

I mean, there are 2 possible internal voltages as mentioned before in this thread, one of 1.1V and one of 2.56V.

Also, the AREF pin could be used to plug in an external voltage reference.

So, is it the sketch that attributes the 1.1V voltage to the AREF pin?

  1. Correct, but I have seen more internal Aref voltages slightly below 1.1volt.

  2. Right again.

  3. Not all Arduinos have a 2.65volt Aref. The Mega does have one, the Uno and Nano not.

  4. Yes, with care. You MUST set Aref to EXTERNAL if you connect an external reference voltage.
    Failing to do so could damage the Aref pin (if the external voltage has enough power to do so).
    See the Aref page on this site.

  5. Yes. Default Aref is the 5volt supply. Others Aref modes have to be called.

Use 1.1volt Aref to measure one ~0.65volt solar cell. That gives a higher A/D resolution than 2.56volt Aref.
If you measure higher voltages than that, e.g. two or three cells in series, use 2.56volt Aref.
With more than one cell, it’s wise to use a resistor between cells and analogue input to limit possible fault current to <1mA. That stops phantom powering in case the Arduino is off.
Leo…

Perfectly clear and comprehensive answer. Thank you!

Nongsai: Thanks for the most recent inputs. So connecting the reference pin between the zener diode and the resistance and measuring the voltage is the calibration procedure? To answer Tom: I will measure the voltage of individual cells, so without any arrangement. Best

The Zener will conduct everything above its voltage. 1.2V will get clipped to 1.1V. You want like a 500K resistor before that so the 1.2V is weak to limit loss through the Zener. Then you got a reference until the battery drops below 1.1V.

A zener diode needs a certain current threshold for a stable zener voltage. That voltage has a temp coefficient if the zener is above or below ~5.6volt. Those two things make a ~1volt zener unsuitable as low current reference voltage. Leo..