Close
0%
0%

DC High Power Logger on the Cheap

A simple and low cost solution for logging power usage in a solar powered battery charger. Can be used for any high power DC system.

Public Chat
Similar projects worth following
I'm working on dimensioning a solar powered charging hub for electric boats. To get at good sense for the system it is desirable to measure it in use. More specifically see how much energy is used today in the existing grid connected battery chargers. Measurements of voltage and current with low demands on accuracy was enough. The focus was to get a measurement over a long period of time with short intervals. A low cost and portable system that can measure DC power in the low kilo-watt range over long time could not be found on the market and instead a device was build by low cost components.

Micro controller and logging 

The readily available and cost effective Arduino UNO was used as the logging device micro controller. However using only the Arduino and exernal sensors poses two problems. Firstly the internal EEPROM is only 1024 bytes. This is not enough to store the data generated by a frequent and long lasting measurement setup. The second issue is keeping time. The Arduino starts an internal timer when it's powered on and this timer counts as long as the power is not lost. With frequent power outages and risk of the device being unplugged it would be impossible to know when in time the charge events would happen after loosing power the first time.

The two issues presented above are solved by one shield, an add on board that easily connects to the Arduino. The shield features a SD card reader/writer and a real time clock. The SD card installed is 4GB and gives space for more than two years of measurements with a one second interval. The RTC, once set one time, keeps the time even when no external power is available with it's own back up battery. When the logger is restarted the new measurements will be saved with a correct time stamp. 

Sensors

The code will create a comma separated value (CSV) file on the SD card for each power on and start logging voltage and power. To reduce noise the system will make 15 measurements with the analog inputs every second. These 15 values are then averaged and only the average value are saved one time per second. 

\subsection{Sensors}
For measuring the charger currents up to 10A the ACS712 chip was used. It's supplied in handy modules in 5A, 20A and 30A ranges. I used the 20A. This uses a hall effect sensor and no current shunt resistor is needed. The high voltages around 50V can not be fed straight into the analog inputs of the micro controller but a 240k voltage divider with a reduction ratio of 12 was used. The total power draw of the divider is 15mW. With these two low cost and simple probes an error of less than 5% can be reached which is enough for the needs. The data logger can be seen in figure.

2021_03_08_currentDataLogger.ino

It heavily based on the example code from Adafruit.

ino - 7.71 kB - 03/10/2021 at 13:28

Download

  • 1 × Arduino Uno
  • 1 × Data Logger Shield Also needs battery if you want the RTC working
  • 1 × SD Card
  • 1 × ACS712 Module (20A) Can use 5A, 20A or 30A version
  • 4 × Resistors for voltage divider Depends on desired voltage level, I usesd 2x100K + 2x20k

View all 6 components

  • First measurements

    iSax03/10/2021 at 13:33 0 comments

    I've done a measurement on an almost full battery pack. This charge is from 96% to full. It worked nicely as shown in the plots below. I've now installed it with the fishermen that uses the charger and will return to collect the data after a week or so. The power and energy is calculated from the measured current and voltage. The noise on the current is from me putting zip ties on and fiddling with the Arduino while measuring. 

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates