read data with ESP8266 from a power-meter over ModbusTCP with HTML dashboard

ยกเลิก โพสต์แล้ว 5 ปีที่ผ่านมา ชำระเงินเมื่อจัดส่ง
ยกเลิก ชำระเงินเมื่อจัดส่ง

I need sketch for esp8266 for reading data from power meter trought RS485 TTL and store data on SD card shield and present current data on HTML dashboard.

Hardware:

- Esp8266 connected via pins Rx and Tx with RS485 TTL adapter

- RS485 TTL adapter is connected with Power meter trought terminal A and B.

- Esp8266 is having connected SD card for data storage .

- Modbus power meter

What I want:

When esp8266 is connected to power supply trought USB (5V), user can can see over wifi esp8266 on avaliable networks and set new IP address for esp8266.

When he set new IP in browser HTML page is opened as power meter dashboard, where user can see current data of power meter:

Voltage, Current, Frequency, Active power, Reactive power, Apparent Power, Power factor, Active energy, Reative energy, Serial No, BaudRate, Meter address, Time table, DateTime.

Esp8266 schould send every 1 second request over RS485 TTL to power meter and receive all data, which are preseneted on HTML dashboard. Also all data are arhived in some file on SD card.

On dashboard must be possibilityy to download archive for 6 month as xls file.

To read data from power meter you can use next modbus values:

Slave ID: 1

Read Holding Registers (FC=03)

Right now I can get data from power meter with program Modbus poll.

I have esp-link flash on esp8266 so I can get data over wifi:

So program is sending next codes to receive data:

01 03 00 00 00 01 84 0a Voltage

01 03 00 01 00 01 d5 ca Current

01 03 00 02 00 01 25 ca Frequency

01 03 00 03 00 01 74 0a Active power

01 03 00 04 00 01 c5 cb Reactive power

01 03 00 05 00 01 94 0b Apparent Power

01 03 00 06 00 01 64 0b Power factor

01 03 00 07 00 0a 74 0c Active energy

01 03 00 11 00 0a 95 c8 Reative energy

01 03 00 27 00 03 b5 c0 Serial No

01 03 00 2a 00 01 a5 c2 BaudRate

01 03 00 2b 00 01 f4 02 Meter address

01 03 00 1b 00 06 b5 cf Time table

01 03 00 21 00 04 14 03 DateTime

Please see how I read power meter data now with modbus program (attached file)

So, actually I want to have online power meter data, with nice HTML dashboard and archive of 6 month (please see example of dashboard, attached file web-server)

Regards,

Peter

Arduino วิศวกรรมไฟฟ้า อิเล็กทรอนิกส์ ไมโครคอนโทรลเลอร์ โครงร่าง PCB

หมายเลขโปรเจค: #18716284

เกี่ยวกับโปรเจกต์

ข้อเสนอ 1 ใบ โปรเจกต์ระยะไกล ใช้งาน %project.latestActivity_relativeTime|แทนที่%