Power Measurement

To really understand what your solar power setup is doing, you need to measure voltage and current. There are three areas you might want to place an inline current/voltage sensor:

  • Between the panel and charge controller
  • Between the charge controller and battery
  • Between the battery and the load

Having two current and voltage sensors is very useful, allowing you to determine the efficiency of your charge controller (by comparing power generated by the panel to power added to the battery) or monitor the status of your battery (by comparing power added to the battery and power consumed by your load).

I use an INA219 breakout board, connected to an Arduino, to measure voltage and current. This device sits in between any two components to measure the flow of power from one to the other.  In order to be measure the power consumption of a device powered by a normal DC power supply, the input power source is expected to be a 2.1x5mm male barrel plug, which is plugged into the female barrel plug at the top of the photo. The INA-219 is connected to the Arduino via I2C, and shares a common ground so it can measure voltage. The INA-219 measures the voltage across an 0.1 ohm, 1% sense resistor, allowing it to measure currents up to 3.2A.



Follow Adafruit’s tutorial to put the INA219’s sense resistor in-line with the circuit:

  • Connect V+ to the positive terminal of the power supply for the circuit under test.
  • Connect V- to the positive terminal or lead of the load.


I also added a button hooked up to one of the Moteino’s GPIO pins, and a transistor on the output’s ground line in order to turn the power supply to the load on or off.


Running the Arduino sketch from My Github repo will log current and voltage to an Arduino’s SPI flash memory every 10 seconds, and also print the same info to a serial console. Here’s an example of the output of my sketch, measuring power consumption of the very cool Koruza Wireless Optical Device from wlan slovenija.


2013-10-02 13:39:05

Bus Voltage:   8.67 V

Shunt Voltage: 20.37 mV

Load Voltage:  8.69 V

Current:       203.80 mA

Power:         1.77 W

Energy per 24 hours:42.52 Wh



Leave a Reply

Your email address will not be published.