Skip to content

Instantly share code, notes, and snippets.

@erikzenker
Last active February 15, 2022 15:40
Show Gist options
  • Save erikzenker/c7c082db0377468c1f32368b9aaf247b to your computer and use it in GitHub Desktop.
Save erikzenker/c7c082db0377468c1f32368b9aaf247b to your computer and use it in GitHub Desktop.

DIY Solar Power System

In this document I want to describe my progress building an own solar load controller.

Problem

There exist a lot of solar load controller which you can use to build a simple solar power system. Usualy, these load controller do not provide open and well documented interfaces to access data such as:

  • Solar panel voltage/current
  • Battery voltage
  • Consumer current

Solution

  • Meassure voltage/current
  • Send meassured data via mqtt to an mqtt broker
  • Collect mqtt broker data and store it in a prometheus database
  • Visualize prometheus data on grafana

MARK I

  • Waveshare Solar Power Management Module
    • ~6V-24V max PV voltage
    • 3,7V Li Battery
  • INA260
    • 36V max input voltage
    • 15A max input current
  • Sparkfun Thing Plus is used to read sensor values and send them to the mqtt broker
    • Has builtin wifi capabilities for mqtt comunication
    • has an integrated i2c quiic port for simple sensor plugging
    • Is programmed in C++ using the arduino platform
  • All parts will not be fully integrated but left as single modules or will be modularized
    • Single modules will be connected via I2C for data exchange
    • The modules will be added to a base plate via screws
    • This allows to change the design during development and reuse parts for later designs
  • A public mqtt broker is be used
  • Mqtt is translated to prometheus via mqtt2prometheus
  • Prometheus data is vizualised using grafana
  • Source code on github

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment