I have made a simple circuit of by attaching a 10 ohm resistor in series with an LED and then attaching it to the solar panel. I use an AVR Microcontroller to measure voltage across the resistor through ADCs and then measure the current flowing at that point in time. I do this at a frequency of every 1 second for now (though I could do it at higher frequency). So I were to calculate the power generated by the solar panel over some time, how would I go about it? How do you calculate power generation or consumption digitally through a circuit in very basic setup?


Power = voltage x current so, decide what voltage you are interested in i.e.

  • Voltage across the LED
  • Voltage across the resistor and LED (solar panel output)

... and multiply instantaneous values of voltage with current (presumably the current mentioned in your question).

That gives you instantaneous watts and you can average this to give a decent picture of average power (what you would be billed on). If you want to calculate watt hours then you need to integrate the watts over time.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.