I want to measure the amount of power provided by a solar panel by this circuit. I'll break the 20V voltage of panel to about its fifth to become less than 5 volts and then, try to read it with analogRead() but, the number that the code shows is somehow the exact half of the number that the multimeter shows. How can I find the real voltage that the multimeter shows by Arduino analogRead()?
The two resistors that break the whole voltage of the panel are R and 4R and the - port of the panel is connected to the Arduino's GND. Port A14 Reads the voltage of a point between R and 4R. The order of the circuit is as follows: Port "-" of the panel -----> resistor R -----(A14)----->resistor 4R------> Port "+" of the panel.
You need to condition the value of analogRead() by appropriate gain and offset factors which must be determined by two-point measurements known as calibration.
Are your R values so small that they are overloading and dragging the voltage of your PV cell down?
What is the short circuit current rating of said cell?
spycatcher2k:
Put a know voltage across your voltage divider : E.G. 5V 10V 20V and post the raw analogRead value you get for each. This will give you the actual reading for each, it's very basic maths when you have these values.
I have done that with Arduino's 5v port. It gave me the right numbers and equal to the multimeter.
JCA34F:
Are your R values so small that they are overloading and dragging the voltage of your PV cell down?
What is the short circuit current rating of said cell?
I have chosen them to cause the maximum power provided by the panel. Isc is about 1 amp.
GolamMostafa:
You need to condition the value of analogRead() by appropriate gain and offset factors which must be determined by two-point measurements known as calibration.
I have added the code. would you give me an example of what you mean?
I have tested the code by connecting the circuit to the 5v port of Arduino and it resulted in the right numbers and equal to the multimeter but I do not understand why the code result becomes half of the multimeter when it is connected to the solar panel.
gcjr:
isn't R/ (R+4R) 1/5. so wouldn't your 20V be dropped to 4V?
and the max analogRead() value will be the voltage at the Aref pin. it may not be 5V
yes, I would be dropped to 4 volts and as I have mentioned "less than 5". sometimes the PV voltage would exceed 20v (based on the resistors implemented on the board) so the dropped voltage would exceed 4v too.
I have connected nothing to Aref port so wouldn't it be 5v?
I tried your code with a 3.3V input on A14 and it showed ~3.29V on the serial monitor. Are you "doubly-sure" about your meter readings and the ground reference?