Electronic – Measure power of solar cell with an esp8266

esp8266power-measurementsolar cell

Scenario
I plan to buy some bigger solar cells (together around 500 W) and use them to make my electricity bill cheaper. But in order to find the perfect location on my roof before the purchase, I thought about placing an ESP8266 on my roof with a small 0.21 W solar cell that sends the power data every hour to my phone.

This way, I can leave my ESP on a certain location for a few days and check the data. After, let's say, a week, I will place it on a different location and check the data as well. After a few weeks, I should find the perfect location for the bigger cells. I know that this is just a reference and won't be that accurate.

Material

  • ESP8266
  • 3 V and 70 mA solar cell (= 0.21 W)
  • a few resistors

Ideas for implementation
My idea is to short-circuit the solar cell all the time and measure the current with a known resistor from the voltage drop across it. Additionally, I can measure the voltage by simply using one of the analog pins and converting the analog value into a real voltage. After that, I can multiply the current and the voltage and have the power (Watt) sent to my phone every hour.

Questions

  1. Is it accurate enough to use a resistor for measuring current?
  2. Will a permanent short-circuit damage my solar cell?
  3. Is the voltage during a short circuit the same as without a load or will it decrease?

(3) would make this whole project useless because I don't have accurate voltage values and so also a wrong measurement for the power.

Thanks in advance.

Best Answer

To measure the power, you need to measure both voltage and current. The maximum power a solar panel delivers depends on the resistance of the load; different measuring resistors, or temperature drift, etc. will show different power readings.

  • That said, yes, you can use a resistor to measure current, but it takes a bit of work to make it accurate.

  • Shorting a single panel is OK; they operate normally at near their short-circuit current anyway. Note that if you have a measuring resistor attached, it won't be short-circuited anymore.

  • The voltage won't be the same as without a load; the open voltage is higher than the normal operating voltage, and a shorted solar panel will show even less: 0V.

You could try the following: find out the MPP of your small measuring solar panel. It should be in the specification somewhere. It will show the voltage and current at maximum power, or at its normal operating point; terms used may differ.

Use those two values and \$\small R \normalsize = {V \over I}\$ to calculate a resistor value. This resistor will put the panel at or near its MPP. Use \$\small P = V \times I\$ to decide what wattage the resistor should be.

Use an INA260 measuring sensor module or some such in series with the resistor to measure current and voltage; it connects with the ESP8266 over I2C.

The INA260 actually uses a very small resistor to measure current, as you planned to do, but its resistance's value on its own is so small it would almost short the panel which would give you useless voltage readings close to 0V.

I wouldn't bother with the ESP8266's ADC (it is a pain to use and not very good), but use the ESP8266 to read the values the INA260 sends over I2C, and then send them on to wherever you want them.