Eastron Energy SDM220 Meter - EmonTX Direct Pulse Counting?

So, I picked up an Eastron SDM220-Pulse energy meter from China:
Aliexpress SDM220-Pulse link

Which is a DIN rail mounted power meter, I see some people in Europe are using the 3-phase versions for their monitoring but using the RS485 output. I bought the Pulse version, which looks to have the RS485 actually there but not labelled - RS485<-> USB interface in the post at the moment to test that theory.

It looks to reading this manual I found that it has a passive pulse output, so I feed in voltage and count the pulses out.

Reading the wiki page for optical sensors (now linked thanks!) page it would seem that I can just connect:
SDM220 Port 5 (Pulse -ve) = EmonTX Terminal 2 (3.3v)
SDM220 Port 4 (Pulse 1 +ve) = EmonTX Terminal 4 (IRQ1)

And I can then count 1/1000 imp/kWh like I would with an optical sensor - is anyone using the counting like this and confirm - or anyone with more experience than me on the EmonTX point out if I got this wrong?

If the “passive pulse output” is a switch (optical or mechanical), then there’s a lot about pulse counting in relation to gas meters over in the old forums. If it’s a semiconductor switch (i.e. the receiving side of an opto-isolator), then the polarity of the terminals will be important, but de-bouncing won’t be necessary. The meter manual isn’t clear. Also check which terminals you need on the emonTx - I think it’s 2 & 6.

I took the pins from the optical page which were for 3.2 it said, v3.4 [EmonTX Wiki Page] (EmonTx V3.4 - OpenEnergyMonitor Wiki) and this table says:

emonTx V3.4 pulse-counting screw terminal connections
Screw terminal pin Connection
1 5V (if powered via 5V USB)
2 3.3V
4 IRQ 1 / Dig3

Which seems its 2/4 - You may be talking about the RJ45 which is 2 & 6 and I am talking about the screw terminals?

Polarity is marked on the side of the monitor, there are two pulse output one fixed at 1000imp/kWh and the other configurable, they share a common -ve or input, see picture:

Will go read the gas meter counting, I need to check into that as it looks like our gas meter may also have an optical interface from the markings, but I can see no obvious LED.

Yes, it is 2 & 4 on the screw terminals. Note the top legend/silk screen on the pcb for terminal 4 is wrong!

There won’t be a LED on a gas meter - no electrical power (obviously!), what you’ll have is either a reed switch or - less likely - a reflective optical sensor that requires power. A reed switch is bad because it will need de-bouncing, anything optical will be not good news for battery life (though you can pulse the emitter and the sensors, which will give a useful improvement).

I ordered my EmonTX in a case, so lets hope the acrylic panel has the right numbers :wink:

Stupid statement I made about LED right! It says on the meter “Pulse=0.01m^3” but its no obvious where you get the pulse from - I need to google the model when I get a minute.

… and it’ll need to come out to get at the terminal screws!

:laughing: :laughing: :laughing:

I may even re-mount it in a plastic IP box to keep the dust in the garage out of it, but I didn’t want to make the mistake I made with EmonPi of ordering bare then just buying a case later as I ran out of time to adapt/make one so ordered complete this time :slight_smile:

Need to finish pulling the new 16mm2 SWA submain through garden into garage before electricians come to connect it up and install EVSE first :electric_plug::battery:

With some luck the cheaper “pulse” unit also has the RS485 stuff inside and I won’t need to count pulses anyway.

@TrystanLea I saw your tweet about “EmonESP” are there any more details anywhere? I just started working out how to take RS485 from the SDM220 into an ESP8266 directly back to EmonPi - but if you have a canned solution all the better!

Cannot see any code in GIT at the moment, what dev board are you using?