Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 3.06 KB

README.md

File metadata and controls

69 lines (43 loc) · 3.06 KB

Sun2000MeterTransposer

-> Enable other Smartmeters like SDM630 to connect to Huawei Sun2000 and look like DTSU-666.

This was my solution to address the fact, that DTSU-666 and its variants availability was "null".

It works rock solid since several months without a single interruption.

The project is based on RP2040 Raspberry pi Zero module. It will work on the Wifi variant too, but there is no network access enabled.

Note: I did not document the HW very well (yet), but want to share it still with the community. Build it at your own risk. The pinning of the 2 UART channels can be seen in s2kserver.py module (or schematic).

Warning: This project works with high voltage AC supply. You risk killing yourself, your family and friends, your pets. Take care and only work with line voltages when you are experienced in how much pain it causes to touch 230V :-)

Folder structure

  • hw: contains schematic / PCB in Eagle format.
  • src: Micropython sourcecode - can be directly uploaded to RP2040 module using e.g. Thony IDE
  • DinRainHousing: STL files for the 3D printed Dinrail housing
  • photos: Some pictures of the actual build as inspiration

Adjustments to other meters

Copy file sdm630.py and rename it to your meter name. Adjust it, such that the equivalent registers of your meter are read out and written to s2k module registers. Within file s2kserver.py:

  • You might need to change the UART settings like baudrate, parity in s2kserver during instatiation of uModBusSerial module.
  • change from sdm630 import * to your module name

Sourcecode orientation

main.py purpose is only to start s2kserver.py. s2kserver instantiates 2 threads to server requests from Sun2000 inverter and poll SDM630 meter continously.

Credits

Credits go to:

  • uModbus [1] project. I changed the file slightly and included all dependencies within the src folder. Main modifications were done for speed/latency purposes
  • DTSU666-Modbus [2] project: This project was of major support for the idea and to get register details.
  • GitHub user salakrzy
  • Kai for testing it in endless debug sessions remotely whilr I was still busy ibstalling my solar installation and could not test myself
  • Radek for making and providing his Chint DTSU666 module

Compatibility

Tested with sun2000 3 phase 10kW inverters and proven working with spc147 and 148 firmware versions. As of now there is no newer one available.

Updates

21st December 2022:

Github user Radek made a module to support CHINT DTSU666 electricity meter (dtsu666.py). Thanks a lot for sharing it!

To make use of it adjust the settings within the user configurable settings in the file s2kserver.py.

Note that Chint DTSU666 usually uses those UART settings unless you configured it manually differently:

METER_UART_BAUDRATE = 9600
METER_UART_BITS     = 8
METER_UART_PARITY   = None
METER_UART_STOPBITS = 2

[1] https://github.com/pycom/pycom-modbus/tree/master/uModbus

[2] https://github.com/elfabriceu/DTSU666-Modbus