Eastrom SDM120 with RS485



  • Hi,

    I have an Eastrom SDM120 (power meter) connected to a Raspberry PI via a RS485 module.
    I can see all of the power units with a single script:

    pi@nettemp:~ $ sdm120c -a 1 -P N -S 2 -j 20 -z 1 /dev/ttyUSB0
    Voltage: 231.80 V
    Current: 0.93 A
    Power: -148.00 W
    Active Apparent Power: 218.27 VA
    Reactive Apparent Power: -160.30 VAR
    Power Factor: -0.68
    Phase Angle: 0.00 Degree
    Frequency: 50.04 Hz
    Import Active Energy: 7625036 Wh
    Export Active Energy: 144644 Wh
    Total Active Energy: 7769680 Wh
    Import Reactive Energy: 242763 VARh
    Export Reactive Energy: 1121995 VARh
    Total Reactive Energy: 1364758 VARh
    OK
    pi@nettemp:~ $
    

    (Yes, my power consumption at this moment is negative because my solar panels are producing more than what my house is consuming).

    Anyway, I wonder if it would be possible to create a mysensors node which each unit (voltage, current, etc) would be a child. I'm thinking about two possibilities:

    • Making the Raspberry PI a mysensors node (adding it a radio and make it behaving like a node)
    • Making a mysensors node (arduino based) with RS485 module code and "standard" mysensors code

    I have seen other posts regarding this SDM120, but I'd like to log specific units such as Import/Export active energy, and not limiting myself to the pulses.

    Anyone tried it? Any suggestion or comment?

    Thanks,


  • Mod

    Maybe you could compile the raspberry without the transport enabled, for arduino is working I'm not sure about the raspberry



  • @joaoabs If you want to go the "arduino-based" route:
    There seem to exist already a lot of projects reading this type of meter with a microcontroller e.g. an ESP8266.
    The code itself seems to be rather simple (assuming, the code provided eg here: https://github.com/reaper7/SDM_Energy_Meter/blob/master/examples/sdm_simple/sdm_simple.ino really works, but there seem to be some more working projects out there).

    So you may either combine this with normal mysensors-code and just use send commands instead of serial prints (at lower frequency). Could be you'll need a more powerfull mcu than the ATMega32, but most likely a STM32F103 will have enough resources to fullfill this task.


Log in to reply
 

Suggested Topics

  • 87
  • 2
  • 7
  • 8
  • 1
  • 3

56
Online

11.4k
Users

11.1k
Topics

112.7k
Posts