Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. ovdleun
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by ovdleun

    • RE: ESP-12E as pulse sensor with Eastron SDM120

      ok, so the pull down resistor does make it a bit more stable. Still getting lot of more counts then what the meter is giving. A bit strange because the led I've added flashes only once at the same time as the led on the meter. The led on/off is within the same function:

      function pin1up(level)
      gpio.write(led, gpio.HIGH)
      pulse_detected = 1
      gpio.write(led, gpio.LOW)
      end

      But I'm getting closer. Will keep all updated. I think I'll make the pull down stronger, maybe that will filter out the noise.
      If someone has other/better ideas, please let me know.

      KR,
      Onno.

      posted in Hardware
      ovdleun
      ovdleun
    • RE: ESP-12E as pulse sensor with Eastron SDM120

      Thanks. Tried that however somehow the counter went bold and is counting 'something' but no kWh. Meter is still on the same kWh total while according to my mounter, it already used 2kWh since the start:
      2016-07-30;14:43:34;1469882614;26994;13
      2016-07-30;14:44:34;1469882674;29993;431
      2016-07-30;14:45:34;1469882734;32992;990
      2016-07-30;14:46:34;1469882794;35991;1529
      2016-07-30;14:47:34;1469882854;38990;2158

      Thing is that the manual that came with the meter doesn't show any information about input voltage etc for this meter like the one you've send. The PDF of this meter you can find here: sdm120c

      The lua script I'm using is like:
      pin = 2
      min_pw_ms = 20
      upload_rate_ms = 60000

      pulse_detected = 0
      timestamp = 0
      counter = 0
      conn = nil

      gpio.mode(pin, gpio.INT)

      function pin1up(level)
      pulse_detected = 1
      end

      function maintask()
      print("Counter is:"..counter)
      if not wifi.sta.getip() then
      print("Connecting to AP, Waiting...")
      else
      -- gpio.write(0, gpio.HIGH)
      print("Uploading to server...")
      upload()
      end
      end

      function pulsetask()
      timestamp = timestamp + 1
      if pulse_detected == 1 then
      counter = counter + 1
      pulse_detected = 0
      end
      end

      gpio.trig(pin, "up", pin1up)
      tmr.alarm(0, upload_rate_ms, 1, maintask);
      tmr.alarm(1, min_pw_ms, 1, pulsetask);

      maintask();

      Update: Just found some other schematics.. maybe I'm missing some pull-up/down ... going to do some more testing ;o)

      posted in Hardware
      ovdleun
      ovdleun
    • ESP-12E as pulse sensor with Eastron SDM120

      Hi all!
      I've bought an eastron sdm120 KWH meter. It has a pulse output which is set to 1000pulse/kwh; However I can't seem to figure out how to count those pulses. The output on the modules has a + and - terminal. So I connected the - to the common ground with the ESP and the + to one of the GPIO ports of the ESP-12E. I've found a script which puts the specific GPIO into INT mode. The script is for a 'pulse counter' based on a phototransistor. However like I said I'm using the output from the module.

      Anyone have some thoughts on the type of pulses would be generated by the SDM or how to find out. I've read about an open collector type, but don't know really how that works.

      I'd like to count the pulses and have them send like every minute to Domoticz.

      Any help appreciated.

      KR,
      Onno.

      posted in Hardware
      ovdleun
      ovdleun