-->
Page 1 of 2

ADC Solar Panel Voltage Reading

PostPosted: Wed Aug 10, 2016 8:30 am
by Mikecay
Hi All,

I am trying to read the voltage from a 6v solar panel using an ESP-12. I have a voltage divider made up of a 10k and 2k resistor. When I did my testing my voltmeter was reading 5v from the solar panel and analogread(A0) is giving me 803, from that I calculate 803/1024 * 6 to me 4.705v. This is a 6 to 7% difference, which I find pretty big. What could be causing such a large variation?

Mike

Re: ADC Solar Panel Voltage Reading

PostPosted: Wed Aug 10, 2016 10:05 am
by trackerj
Hi Mike,

What is your Measured Full scale voltage for your ADC input? This varies depending on the VCC value so might have some error from there.

Also I think I will choose the resistors a bit higher in values, like 54k/10k. This will give you a confortable max input voltage of about 0.938V for a 6V input.

For more details about ADC and voltage divider might worth to take a look at the Internal ADC - ESP8266 post. Take a look also at the comments, few good examples also there.

Re: ADC Solar Panel Voltage Reading

PostPosted: Wed Aug 10, 2016 2:15 pm
by Mikecay
trackerj wrote:What is your Measured Full scale voltage for your ADC input?


Are you referring to the actual voltage on the ADC rather than the calculated voltage based in Vin * (R2/(R1+R2))? I have not measured it but I guess it probably is not exactly 1v. I will increase the resistor sizes and check the actual voltage on the ADC pin. I also read carefully the site you linked to. A quick passed showed there was a lot they were considering that I was not.

Thank you for your help.

Re: ADC Solar Panel Voltage Reading

PostPosted: Wed Aug 10, 2016 3:01 pm
by rudy
The 1 volt reference is not made to supply an accurate reference for use with an A/D converter. The 1 volt is used for internal level and biasing functions. It is only being made available for the A/D converter because it already existed. Think of the reference as a byproduct of a different process.