growatt-esp8266

所属分类:通讯编程
开发工具:PLSQL
文件大小:3918KB
下载次数:0
上传日期:2020-02-29 22:48:39
上 传 者sh-1993
说明:  使用ESP8266 modbus接口通过MQTT监测Growtt逆变器
(Growatt Inverter monitoring via MQTT using ESP8266 modbus interface)

文件列表:
LICENSE (1070, 2020-03-01)
board (0, 2020-03-01)
board\growatt-wemos (0, 2020-03-01)
board\growatt-wemos\eagle.epf (17951, 2020-03-01)
board\growatt-wemos\wemos-board.b#1 (76112, 2020-03-01)
board\growatt-wemos\wemos-board.b#2 (76112, 2020-03-01)
board\growatt-wemos\wemos-board.b#3 (68976, 2020-03-01)
board\growatt-wemos\wemos-board.brd (75905, 2020-03-01)
board\growatt-wemos\wemos-board.cam (10490, 2020-03-01)
board\growatt-wemos\wemos-board.cmp (29784, 2020-03-01)
board\growatt-wemos\wemos-board.plc (227564, 2020-03-01)
board\growatt-wemos\wemos-board.pls (203552, 2020-03-01)
board\growatt-wemos\wemos-board.s#1 (312348, 2020-03-01)
board\growatt-wemos\wemos-board.s#2 (197794, 2020-03-01)
board\growatt-wemos\wemos-board.sch (312344, 2020-03-01)
board\growatt-wemos\wemos-board.sol (3692, 2020-03-01)
board\growatt-wemos\wemos-board.stc (12393, 2020-03-01)
board\growatt-wemos\wemos-board.sts (14673, 2020-03-01)
board\growatt-wemos\wemos-board_2020-02-09.zip (74674, 2020-03-01)
board\wemos-esp8266-schematic.png (95912, 2020-03-01)
deprecated (0, 2020-03-01)
deprecated\growatt-mqtt.ino (4306, 2020-03-01)
deprecated\growatt-mqtt.ino.deprecated (4254, 2020-03-01)
doc (0, 2020-03-01)
doc\Growatt PV Inverter Modbus RS485 RTU Protocol V3.04.pdf (825149, 2020-03-01)
doc\Growatt_User_Manual_2500_3000_MLT.pdf (1733587, 2020-03-01)
doc\db9-pinout.png (34569, 2020-03-01)
doc\growatt-wifi-dongle (0, 2020-03-01)
doc\growatt-wifi-dongle\Growatt-Server-API-Guide.pdf (306641, 2020-03-01)
doc\growatt-wifi-dongle\Growatt-Server-Open-API-protocol-standards.pdf (591567, 2020-03-01)
doc\growatt-wifi-dongle\Growatt-WiFi-Module-Protocol.pdf (595024, 2020-03-01)
doc\growatt-wifi-dongle\GrowattWifiModuleviaRaspberryPitoPVOutputv2.3.pdf (402831, 2020-03-01)
examples (0, 2020-03-01)
examples\growatt-mqtt (0, 2020-03-01)
examples\growatt-mqtt\LICENSE (1070, 2020-03-01)
... ...

# growatt-esp8266 A library to monitor a Growatt MTL-5000 using an ESP8266 (Wemos D1) via a modbus over RS232 interface. ## Software The library uses a software serial port to connect to the inverter to retrieve data using its Modbus interface. Modbus provides a set of predefined parameters available at certain addresses, which can be queried using a "read register" commmand. This library will: * Create a software serial port on the pins you specify * Create a modbus master using this serial port * Read data from the modbus client (the inverter) registers, decode it and make it available via the library ### Using the library ``` #include #define PIN_TX D5 #define PIN_RX D6 #define SLAVE_ADDRESS 1 GrowattInverter inverter(PIN_RX, PIN_TX, SLAVE_ADDRESS); void setup(){ Serial.begin(9600); } void loop(){ inverter.read(); if(inverter.valid){ // Power output from the PV panels Serial.println(inverter.Ppv); // Power output from the inverter Serial.println(inverter.Pac1); }else{ Serial.println("Inverter read failed"); } delay(1000); } ``` ## Hardware See the `hardware/` directory for EAGLE schematic and circuit board design. To simplify board design and fabrication, the board uses a module for the esp8266 and all through hole components beyond this. The board itself is comprised of: * Wemos D1 Mini * LM7805 voltage regulator * 1x330uF capacitor (for main power) * MAX232 level converter * 3x 1uF capacitors (for MAX232) * 3x 3mm leds + 1/4W resistors (optional) ### Pinout The growatt inverter I have has a DB9 connector for an RS232 connection, which has the pinout: ``` FROM INVERTER ----------------------- 2 = TX \ (5) (4) (3) (2) (1) / 3 = RX \ (9) (8) (7) (6) / 5 = GND \_________________/ 9 = V+ (about 8 volts) Inverter DB9 Our DB9 PCB Wemos (female) (male) (J4) (pins) 2 ---(TX)----(RX)--- 2 --------- 3 ---(RX)--- D6 3 ---(RX)----(TX)--- 3 --------- 4 ---(TX)--- D5 5 ---(GND)---------- 5 --------- 1 ---------- GND 9 ---(V+)----------- 9 --------- 2 -- VREG -- VCC ``` ## Sample project I've included a complete sample project using the board and software library if you just want to get this running on your own inverter. It uses an MQTT + WiFi wrapper library I put together a while ago called _iot-thing_ but you should be easily able to rip this out and use your own code for the internet / wifi connectivity side of things. ## Enclosure Coming soon... ## Todo * Example project should use self configuring captive portal for wifi setup * Add a simple web UI to show present values from the inverter * WiFi Serial debugging using socket

近期下载者

相关文件


收藏者