This is the setup I currently use. Feel free to use it for inspiration!
This version isn't intended to be plug and play like the other examples as it is specific to my needs.
I have 3 solar charge controllers, one for the front, side, and back arrays. They feed into the ESP32 which collects the data and publishes it to an MQTT server that clients (such as the web-ui) can connect to.
I also have an ESP8266 with an LCD attached that subscribes to the MQTT feed to display some data in a convenient location around the house.
The libraries this project uses are:
- https://github.com/4-20ma/ModbusMaster
- https://github.com/bblanchon/ArduinoJson
- https://github.com/knolleary/pubsubclient
- https://github.com/plerup/espsoftwareserial/ (Optional, needed for >2 controllers)
- https://github.com/ayushsharma82/AsyncElegantOTA (Optional, Over the air updates)
- https://github.com/ayushsharma82/WebSerial (Optional, Over the air debugging)
- https://github.com/me-no-dev/ESPAsyncWebServer/ (Dependency of OTA and WebSerial)
- https://github.com/me-no-dev/AsyncTCP/ (Dependency of OTA and WebSerial)
- https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library (Optional, for receiver)
I designed a custom PCB for this, have a look at the PCB files and schematic.
Each PCB can handle up to 6 charge controllers at once!
NOTE: If you do plan to use my PCB, make sure you verify the footprint of the ESP32 you plan to use. The ones I have are a bit narrower than most, so you may need to adjust the footprint.
This list is for a fully populated PCB, you may not need everything here, see schematic for details.
- 1 x ESP32 DevKit Narrow (Unless you adjusted the PCB footprint yourself)
- 3 x MAX3232 (Or equivalent)
- 3 x 10uF Capacitor
- 9 x 0.47uF Capacitor
- 3 x 0.1uF Capacitor
- 6 x 1kOhm Resistor
- 6 x 6P6C Jack
- 6 x 6P6C Straight Cable
- 2 x 1000uF Capacitor (Recommended)
- 2 x 19 Position Female Header (Recommended, for ESP32)
- 3 x 16 Pin Dip Socket (Recommended, for MAX3232)
- 1 x 3 position screw terminal (Optional)
This is a customized version of the example web interface. It has a different layout since I needed to display data from 3 charge controllers while also having smart plug controls.
- The Web interface was originally based on https://github.com/fabaff/mqtt-panel
- Server icon in diagram is from Roundicons.