Switching heating of tanks for domestic water according to photovoltaic capacity with Rasberry Pi Pico
Using exces power from photovoltaic power plant to heat water in water heaters. For controling of the whole system is used Rasberry Pi Pico. Code has implemented priorities. If there is high demand from household or there is not enought sunlight to provide power disable individual water heaters in specific order (or turn on in specific order).
System has got several compoments. Rasberry Pi pico which is the "brain" and controls three output relays (with LED signalization, in electric switchboard mounted under the Pico). Data for evaluation are colected from baterry - Seplos BMS via comunication RS485 and from two electric consumption meter (CM, 2 phases). They are connected on the output side of PV inverters leading to the houshold with water heaters. CM has connectable output that switches according to the current load.
- Waveshare 2-chanell module RS485 - Used for communication with battery (or BMS) from Seplos. Protocol offers lot of informations which can be read. In this project there are only several parameters used: Current [A], Status of charge[%] and only for display purposes Voltage[V] and Cycles
- Waveshare RTC DS3231 - If there is blackout, this module can provide actual time after Pico boots up. Now it is used only for showing correct time.
- IPS LCD display 1,14" 240x160px - SPI - 65K RGB - Shows nessesary parameters voltage, current, SOC and cycles of battery and if heaters are enabled and if power plant disconected from grid.
- Pin 0, 1 - UART, comunication with battery
- Pin 8, 9, 10, 11, 12 - LCD display
- Pin 20, 21 - I2C, RTC synchronization
- Pin 26 - Switching output from electric consumption meter at phase 1
- Pin 27 - Switching output from electric consumption meter at phase 2
- Pin 6 - Water heater with highest priority, connected on phase 1
- Pin 7 - Water heater with normal priority, connected on phase 2
- Pin 14 - Water heater with low priority, connected on phase 1
- Pin 22 - Disconnect from grid.
22.5.2024 - There was update of old code. Mainly refactoring and simplifying code and logic. Added support for disconecting from grid if there is enough battery capacity (SOC). Logging of cycles to additional file. Loading and saving variables to config file.
*pc_communication.py file is additional. It is used to read data directly from Seplos BMS to PC via RS485 converter connected to USB.