Support the Blog

Sunday, June 14, 2015

Arduino Power Logger

Measuring the voltage and current of a device to see the power output can be useful for DC or battery powered systems. This can be done with a digital voltmeter, but I wanted to log it (in a text file) also so I could graph it and run analysis on it. I found a similar Arduino power monitor project online, but I didn't need the screen display. So I added the Logger function with the Ethernet Shield Arduino. Here are the steps I took to make my own Power Logger.


List of Parts


I should note that the ACS715 current sensor requires you to power the device through this sensor, so you will need the leads from your device be connected to one end of this device and the power supply to run your device connected to the other end.

Build It

Setup the components with the Arduino as shown in the Fritzing Diagram below.

Note that the ACS715 hall sensor device has 5 connections. 3 plug into the breadboard: Gnd, Vcc, and Out. These plug into the breadboard and the Arduino respectively. The Fritzing Diagram does not show this 100% accurately since the Current sensor is not the same in the Fritzing program, but it should be easy to determine. The other two ports on the sensor run the current through your device when powered up.

Code It

The code can be broken up into 4 sections. Setup, Measuring voltage (with the voltage divider), measuring current with the ACS715 sensor, and logging the output to the SD card. The latest code for the Arduino Power Logger can be found here on Github.



Done!

I think a video goes a long way to help explain things and show the working setup. It's just on the lab bench but you should be able to get the idea of what's going on and what it is doing. If you have any questions about things, the comments are open and ready for them!



No comments:

Post a Comment