Skip to content

Fully open source Bidirectional Power Meter (Hardware and Software)

Notifications You must be signed in to change notification settings

jrmfrbg/MeinLieberScholli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Mein Lieber Scholli!" - Bidirectional Power Meter

"Mein Lieber Scholli!" is a versatile and open-source power meter, conceived as a powerful alternative to popular smart home devices like "Shelly" products. It's designed for detailed energy monitoring, including bidirectional power flow for applications like solar PV installations.

This project provides real-time insights into power consumption and generation. It features standard Schuko connectors (male and female) for easy inline measurement of AC appliances and circuits. The name "Mein Lieber Scholli!" (a German exclamation of surprise or astonishment) playfully reflects the surprise one might feel when seeing how much power some devices consume, or how much a solar setup is generating, while also hinting at its "Shelly" alternative nature.


Core Features:

  • Accurate Measurements: Utilizes dedicated ICs for precise measurement of current (Amps) and voltage (Volts).
  • MSP430 Processing: A Texas Instruments MSP430 microcontroller reads the raw sensor data. It performs the integral calculation to determine instantaneous power.
  • Data Transmission: The MSP430 sends calculated Root Mean Square (RMS) values for Watts (Wrms), Amps (Arms), and Volts (Vrms) to an ESP32 via the SPI protocol.
  • ESP32 Powerhouse: An ESP32 microcontroller serves as the main brain for connectivity and user interface. It:
    • Receives data from the MSP430.
    • Calculates energy consumption over time (Watt-hours, Wh).
    • Provides data access via an HTTP API.
    • Hosts a user-friendly web interface to display real-time data and accumulated energy.
  • Bidirectional Measurement: Uniquely, "Mein Lieber Scholli!" can measure power flow in both directions. This is particularly useful for monitoring energy export in grid-tied solar power systems, effectively showing when you are "selling" power back to the grid.
  • Schuko Connectors: Equipped with a male Schuko plug on one side and a female Schuko socket on the other, allowing it to be easily inserted between a device and a wall outlet (or an extension cord).
  • 7 Segment Display Integration: The "Mein Lieber Scholli! is directly compatible with our other project the "Open7Segment". It can be used to directly display the values the "Mein Lieber Scholli!" is measuring. (See also Open7Segment.)

Functionality:

The system works by having the MSP430 continuously sample voltage and current. It then calculates the true RMS power. This data (Wrms, Arms, Vrms) is then passed to the ESP32. The ESP32 handles the network communication, accumulates the energy usage (Wh), and presents this information through a web browser or via an API for integration with other systems (An Example would be a server logging the data and creating statistics).


Hardware Overview:

  • Custom PCB: Houses the measurement ICs, the internal 5v PSU, the MSP430 and a Port for the ESP32-S3-Zero or other Microcontrollers of the same formfactor.
  • TI MSP430: Microcontroller for primary data acquisition and power calculation.
  • ESP32: Microcontroller for Wi-Fi connectivity, web server, API, and Wh calculation.
  • WIFI and BT module: Currently unused, opens the possibility to operate only with MPS430 without the ESP32.
  • Schuko Connectors: Male input and female output.

Click to expand Image of PCB with only the SMD components soldered on

PCB Image


Software Stack:

  • MSP430 Firmware: C for data acquisition and initial processing.
  • ESP32 Firmware: C++ (Arduino Core for ESP32) for networking, API, and web interface.
  • Web Interface: HTML, CSS for the user-facing dashboard.
  • API HTTP API with JSON Formating. Documentation found in the api_readme.md

Contributors:


About

Fully open source Bidirectional Power Meter (Hardware and Software)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages