If you are dealing with solar or battery power, you might want to have one of these little energy meters built by [Open Green Energy] around. The Arduino-based instrument measures DC voltage, current, power, energy, capacity, and temperature. The range is only up to 26 volts and 3.2 amps, but you could extend that with some external circuitry.
Of course, measuring a voltage with the Arduino is old hat. But the addition of a INA219 current sensor provides voltage, current, and power measurements in a single module that talks I2C back to the host computer.
The layout is neat although he’s working on a PCB, as well. This basic circuit would work well for a data logger or current monitor with just a few software changes.
If you are into this sort of thing, the INA219 actually comes in two versions. The “A” version is not as precise as the “B” version. The difference, though, is small. According to the data sheet, the “A” version can be off as much as 1% on current measurement across the entire temperature range, while the “B” variant holds to 0.5%. Both devices are typically around 0.2% under normal operating conditions.
The device works with an external shunt resistor, so it measures the supply voltage on one side of the shunt and by observing the difference in voltage on the other side, it can calculate the amount of current.