Skip to content

Bandit-17/PVBRAIN

Repository files navigation

PVbrain

PVbrain is an opensource/openhardware project to monitor/control simultaneously a PIPsolar/Voltronic Inverter (most of) and a BMS (JKBMS/AntBMS/DalyBMS). It adds also the possibility to control up to 16 relay allowing for example to control an Automatic Transfert Switch (ATS) (Offgrid<=>return to grid). The PCB board uses only crossing components or pluging ones in order to have an easy setup/maintenance. The MCU used is an ESP32 running ESPhome allowing communication by WiFi to Home Assistant (HA) natively (but MQTT can be added easily). Main features are:

  • Direct communication and control with (most) voltronic/pipsolar inverters via a direct ethernet cable (pvbrain got a builtin RS232=>TTL). RS485 communication is also possible for non-voltronic inverters, but not yet tested. Important parameters can be set directly from HA (or the webserver if activated)
  • Monitor a BMS (tested with JKBMS but should work with the antBMS or the daly)
  • Perform the detection up to 3xAC sources (solar/grid/other) (in order for example to make a soft switching for the ATS part)
  • Monitor via 2xPZEM-004T V3 (modbus) both the solar & grid productions
  • Control up to 16xrelays, i.e. for an ATS control or the inverter mode of modern voltronic inverter (Axpert max I & II for example)
  • Monitor temperature/humidity/pressure of your basement (you can setup alarms in case)
  • Free I2C ports available to plug extra I2C sensors

This PCB uses the excellent ESPhome integrations done by @syssi available at https://github.com/syssi. The PVbrain represents a joint work between e-2-nomy https://www.youtube.com/c/e2nomy/ and Bandit-17.

Main PCB Layout:

alt text alt text alt text

PCB assembly:

Please check this youtube video how to assemble your PVbrain PCB

IMAGE ALT TEXT HERE

Gerber files:

Please find all gerber files required for the PCB into the following zip file: https://github.com/Bandit-17/PVBRAIN/blob/main/Gerber_PCB_PV%20BRAIN%20V1.0.zip

additional daughter board addons:

An optional addon card can be pluged to monitor direct voltages of your PV strings (up to two)

alt text alt text alt text alt text

Gerber files:

Please find all gerber files required for the addon PCB into the following zip file: https://github.com/Bandit-17/PVBRAIN/blob/main/Gerber_PCB_pvbrain-carte-option1.zip

Additional Additions to Daughterboard #2:

Please check this youtube video explaining the operation of the OPTION2 board (in French) (https://youtu.be/SeJNZs6UUr4)

alt text alt text alt text

The 3 UART outputs are arranged on a terminal block -- one of the inputs has the RS323/TTL converter option (UART0) -- 3 PZEM connectors + one output on terminal block (UART2) -- one of the inputs has the Linky option (UART3) but also available on a terminal block without the option

A PCF8075 card for 16 I2c bus outputs -- Possibility of attaching a (4) Relay card to this card. -- 2 additional I2c bus outputs on terminal blocks

Options for future development: -- Two Dallas Probe outputs -- a dht22 sensor output -- A DC clamp input (I added an RC filter following the experience of the solar router). -- Two AC clamp inputs -- All usable GPIOs are output on terminal blocks so as to be able to upgrade as much as possible.

__Gerber files:

Please find all gerber files required for the PCB into the following zip file: https://github.com/Bandit-17/PVBRAIN/blob/main/Gerber_carte_option-2.zip with additional diagram: https://github.com/Bandit-17/PVBRAIN/blob/main/Schematic_carte_option-2.pdf to finish the list of components: https://github.com/Bandit-17/PVBRAIN/blob/main/BOM_Carte-option2.csv

Wiring your hybrid inverter and your BMS with the PVbrain PCB:

alt text alt text

Example of realization with an Voltronic Axpert max II (pip8048 branch) alt text alt text

Bill Of Materials (BOM):

please find all electronic parts required to assemble the PVBrain: https://github.com/Bandit-17/PVBRAIN/blob/main/BOM_PVBRAIN__OPTION1.xlsx

To compile the ESPhome pvbrain.yaml file:

Before to compile:

You can compile the yaml from a Linux, a Windows machine or from HASSIO with the ESPhome . The arduino library V2.0 is required to increase the loop stack memory and then execute all entities in memory.

Here is a (french) video showhing how to install ESPhome on a windows platform: https://www.youtube.com/watch?v=lawVsX6XMeE

compilation procedure with Windows:

step 1:

  • run anaconda powershell prompt (of course after anaconda been installed on your machine)
  • create a local folder via the mkdir command, e.g. >mkdir pvbrain and enter inside via the command cd, e.g >cd pvbrain
  • please download the code/pvbrain.yaml in your local folder
  • in the same folder, create an empty secrets.yaml file where you will write inside:
esphome_ssid: "your_SSID"
esphome_password: "your_wifi_password"
  • save the file

step 2:

From your console, compile and upload via the following command >esphome run pvbrain.yaml

If you want only to compile the file, please run instead >esphome compile pvbrain.yaml

Choose your PIPsolar/Voltronic inverter:

In the first header part of the pvbrain.yaml, you can find in the external section, the place where you can spefify your particular PIPsolar/voltronic inverter Actually, the current PVbrain.yaml uses the pip8048 branch (with 2xMPPT strings). N.B even with the pip8048 branch, it should work fine with Voltronic with one unique MPPT input.

external_components:
  - source: github://syssi/esphome-jk-bms@main
    refresh: 0s
  - source: github://syssi/esphome-pipsolar@pip8048
    refresh: 0s

Most of former models has one mppt and the main branch must be prefered:

external_components:
  - source: github://syssi/esphome-jk-bms@main
    refresh: 0s
  - source: github://syssi/esphome-pipsolar@main
    ref

For very old (24V) inverters, another branch can be used

external_components:
  - source: github://syssi/esphome-jk-bms@main
    refresh: 0s
  - source: github://syssi/esphome-pipsolar@hms-3k-24v
    ref

Home assistant entities import:

After a successful firmware update, Home assistant will auto discover the new integration. Please add (all) associated entities in your favorarite HA dashboard. Here is an example of my current PVbrain dashboard

alt text

Entities allowing to control some important inverter parameters:

alt text The yaml used last template number/select/switch esphome objects. Everything is directly imported from ESPhome into HA. No extra HA configuration required.

Multi-PZEM 004T V3 configuration:

If you install the two PZEM 004T V3, both have the same modbus adress by factory default. You need to change the adress for the second one. To do these please refer to this (french) video: https://www.youtube.com/watch?v=O6QESZfJMcM&t=58s

NEW it is possible to add up to 8 additional UARTs:

For this you will need the DF-ROBOT WK2132 card (ref.: DFR0627). You will need to modify the code and pass the uart_1 (pin 01 and 03) into a 2nd I2C bus.

Two cards are available for this:

-The 1st (the smallest) is used for serial sensors.

-The 2nd integrates the possibility of installing converters (Rs232/Rs485 and CAN).

alt text alt text alt text

The esphome integration was carried out by DrCoolZic. a second integration and in progress with another 2UART to SPI expansion card

If you need some extra informations, please feel free to contact us in Discord at: https://reseautono.me => channel #bla-bla-pvbrain

About

Permet de monitorer/commander un onduleur

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published