IEC 62056-21 Energy meter
I'm planning to build a MySensor node to read my energy meter using the optic interface.
That interface communicates through the protocol IEC62056-21 / IEC1107
Anyone have already used this procotol?
@diogoc Not familiar with that protocol, but it would be quite easy to read UART through an optical isolator, if you were to decide on that instead.
I have almost working this communication.
Comercial optical probes like this are expensive:
So I build a optical probe based on this schematic
Communication protocol tested on my meter:
Baudrate: 300 bps, 7 bits, parity even, 1 stop bit Send: /?!<CR><LF> (wake-up and sign-on) Receive: /XXX5YYYYY<CR><LF> (XXX is the manufacturer ID; YYYYY is the meter ID; 5 is the new baudrate = 9600 bps) Send: <ACK>050<CR><LF> (send ack; reading mode) Baudrate: 9600 bps, 7 bits, parity even, 1 stop bit Received: C.1(201236731.0(01:39 25-08-18) 1.8.1(0004398506*Wh) 1.8.2(0000000000*Wh) 1.8.3(0008198809*Wh) 1.8.4(0000000000*Wh) 1.8.5(0000000000*Wh) 1.8(0012597315*Wh) 2.8(0000000000*Wh) ! D
Now I only have to parse the values of tarif 1 (1.8.1), tarif 3 (1.8.3), and total (1.8)
megus last edited by
@diogoc Did you make it work eventually?
What code did you use?
Did you build optical probe only by the left part of the diagram, ignoring USB interface?
I found someone selling DIY kit as per diagram above https://ebay.us/ofmt8I
electrik last edited by
This looks like the DSMR meters, you can read it without optical isolation as the meter itself is already isolated.
Google on DSMR reading and you will find lots of examples
Yes I have it working.
Just send the commands "/?!<CR><LF>" and "<ACK>050<CR><LF>" and read the response back.
I used the left part of schematic and connected the RX and TX directly to the atmega328.
@electrik my meter don't have a physical communication port, so I have to use the optic interface
jogant last edited by
@diogoc do you have a working sketch? I worked on the same topic for a landys & gyr uh50 heat counter. It's not a real 62056-21 protocol, initialization is different.
BNS last edited by
@jogant hi, i am working on this project and made a probe according with schematic only left part,i test on actaris ace5000 and send that command unfortunately i dont recieve respond , can you help me?
jogant last edited by
@bns unfortunately not really. What I learned from reading alot on different internet pages is that there are many proprietary implementations of the standard IEC 62056-21 protocol.
The Landis & Gyr UH550 expects 40 NUL chars before the initial sequence "/?!<CR><LF>". This seems to be a kind of wake up of the IR interface and has to be sent with 7 bit and 300 baud. After that the meter answers with its model number and than switches to 2400 baud with 7 bits and parity and then sends the rest of its current values. But unfortunately not common used OBIS datagrams but only the correct form with own OBIS number format.
Hope this is of any help.