experiments with Pylontech/GroWatt PV tech
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
3.1 KiB

  1. # Pylontech Battery Monitoring via WiFi
  2. This project allows you to control and monitor Pylontech US2000B and US2000C batteries via console port over WiFi.
  3. It it's a great starting point to integrate battery with your home automation.
  4. **I ACCEPT NO RESPONSIBILTY FOR ANY DAMAGE CAUSED, PROCEED AT YOUR OWN RISK**
  5. # Features:
  6. * Low cost (around 20$ in total).
  7. * Adds WiFi capability to your Pylontech US2000B/C battery.
  8. * Device exposes web interface that allows to:
  9. * send console commands and read response over WiFi (no PC needed)
  10. * battery information can be retrevied also in JSON format for easy parsing
  11. * MQTT support:
  12. * device pushes basic battery data like SOC, temperature, state, etc to selected MQTT server
  13. * Easy to modify code using Arduino IDE and flash new firmware over WiFi (no need to disconnect from the battery).
  14. See the project in action on [Youtube](https://youtu.be/7VyQjKU3MsU):</br>
  15. <a href="http://www.youtube.com/watch?feature=player_embedded&v=7VyQjKU3MsU" target="_blank"><img src="http://img.youtube.com/vi/7VyQjKU3MsU/0.jpg" alt="See the project in action on YouTube" width="240" height="180" border="10" /></a>
  16. # Parts needed and schematics:
  17. * [Wemos D1 mini microcontroller](https://www.amazon.co.uk/Makerfire-NodeMcu-Development-ESP8266-Compatible/dp/B071S8MWTY/).
  18. * [SparkFun MAX3232 Transceiver](https://www.sparkfun.com/products/11189).
  19. * US2000B: Cable with RJ10 connector (some RJ10 cables have only two wires, make sure to buy one that has all four wires present).
  20. * US2000C: Cable with RJ45 connector (see below for more details).
  21. * Capacitors C1: 10uF, C2: 0.1uF (this is not strictly required, but recommended as Wemos D1 can have large current spikes).
  22. ![Schematics](Schemetics.png)
  23. # US2000C notes:
  24. This battery uses RJ45 cable instead of RJ10. Schematics is the same only plug differs:
  25. * RJ45 Pin 3 (white-green) = R1IN
  26. * RJ45 Pin 6 (green) = T1OUT
  27. * RJ45 Pin 8 (brown) = GND
  28. ![image](https://user-images.githubusercontent.com/19826327/146428324-29e3f9bf-6cc3-415c-9d60-fa5ee3d65613.png)
  29. # How to get going:
  30. * Get Wemos D1 mini
  31. * Install arduino IDE and ESP8266 libraries as [described here](https://averagemaker.com/2018/03/wemos-d1-mini-setup.html)
  32. * Open [PylontechMonitoring.ino](PylontechMonitoring.ino) in arduino IDE
  33. * Make sure to copy content of [libraries subdirectory](libraries) to [libraries of your Arduino IDE](https://forum.arduino.cc/index.php?topic=88380.0).
  34. * Specify your WiFi login and password at the top of the file (line 13-14)
  35. * If you want MQTT support, uncomment line 17 and fill details in lines 21-24
  36. * Upload project to your device
  37. * Connect Wemos D1 mini to the MAX3232 transreceiver
  38. * Connect transreceiver to RJ10/RJ45 as descibed in the schematics (all three lines need to be connected)
  39. * Connect RJ10/RJ45 to the serial port of the Pylontech US2000 battery. If you have multiple batteries - connect to the master one.
  40. * Connect Wemos D1 to the power via USB
  41. * Find what IP address was assigned to your Wemos by your router and open it in the web-browser
  42. * You should be able now to connunicate with the battery via WiFi