Has anyone tried to read IrDA data from an electricity meter optical port?

Jeremy Harris

Senior Member
I've had a search, but can't see any mention of this, so thought I'd ask.

The majority of digital electricity meters (and some gas meters, I believe) now have an IrDA port from which the meter can be read. The great thing about this is that I understand that quite a bit of data can be extracted from the meter registers via this port, opening up the opportunity for some interesting Picaxe monitoring and control projects. The data is received/transmitted at 9600 baud I believe, which again suits a Picaxe pretty well.

It seems easy and cheap enough to get hold of an IrDA module (like this: http://www.mcustore.com/irda-board-old-version.html) so I'm wondering if anyone here has tried to do something like this.

One really nice thing about this approach is that it is intrinsically safe, and offers a way to monitor energy use without any connection to the household electricity supply.
 
Last edited:

hippy

Technical Support
Staff member
IrDA output can be more complicated than 'simply bunging a LED on the end of a UART' -

http://www.palantirisystems.com/publications/IntroductiontoIrDA.pdf

Even if you can master converting the light pulses to a UART stream there may be additional levels of protocol you have to get through to have usable data.

Assuming it the simplest UART->LED system, MCP21xx decoders as used in the link would seem a good place to start. Note only some chips have the IrCOMM protocol layer included ( the linked board does ) -

http://ww1.microchip.com/downloads/en/DeviceDoc/21840b.pdf
 

Jeremy Harris

Senior Member
Thanks hippy, I'm beginning to realise that the data transmission protocol is fairly comprehensive for IrDA. It seems that each of the registers inside the meter can be interrogated, allowing several multi-byte parameters to be read, including total imported kWh (for each tariff the meter supports), exported kWh, times for each mode, meter serial number, manufacturer code etc. It is a bidirectional protocol, I think, where an interrogation command is transmitted to the meter and it responds with the data that's been requested. I need to do some more digging around to find out how IrDA really works in this application.

erco, I've looked at the way the Black and Decker (and similar) gadgets work. Unfortunately they don't connect to the IrDA port, they use the visible LED on the meter that just pulses every set number of watt hours imported (typically this is either 1, 5 or 10 watt hours per LED pulse). There's no way to read data, as such, from this visible LED, all you can do is count pulses and use them to try and keep track of imported power (bt with no means of recording exported power).
 

Jeremy Harris

Senior Member
Unfortunately the Owl doesn't seem to use the IrDA port either. AFAIK, it uses a current transformer clipped around one of the meter tails and cannot interrogate the meter internal registers via the IrDA serial port on the meter. The IrDA port looks like two small windows in the front of the meter surrounded by a metal annular ring. One of the windows has an infra red transmitter, the other an infrared receiver, so together they form a bidirectional optical data port.
 

Buzby

Senior Member
.... The IrDA port looks like two small windows in the front of the meter surrounded by a metal annular ring. .... together they form a bidirectional optical data port.
The two small window are not IrDA protocol, they are RS232. IIRC, the protocol starts at a low baud ( 110 ? ) for reading, then uses a secret handshake to switch to a higher baud for writing. This method has been used for years on both gas and electric meters. The metal ring is there to hold the magnetised communication head in place during operation. The protocol is standardised, and widely documented on the web.

The IrDA port on more recent meters transmits continuously, and is a great way to get the power readings. There are a few web pages showing reading this signal with an Arduino, and the code looks quite easy to replicate on a PICAXE.

I have been meaning to build a reader for my meter, a 'flashing LED' type, but have always had something else to do first. One day I'll do it !.

Cheers,

Buzby
 

westaust55

Moderator
I started to look into this some time ago but I suspect it will be far form simple.

IEC (and AS) 62056 Electricity metering—Data exchange for meter reading, tariff and load control Part 21 Direct local data exchange
applied to the meter comms protocol.

This standard covers the optical transmission port dimensions (including holding magnet), signal wavelength (800 to 1000 nm), and a lot more including:

Asynchronous serial bit (Start – Stop) transmission according to ISO/IEC 1177:1985, half-duplex

Initial baud rate – 300
Standard baud rates – 300, 600, 1 200, 2 400, 4 800, 9 600, 19 200 (for Protocol modes B, C and E only)
Protocol mode A is without baud rate changeover = 300 Bd only.
Note that for Protocol mode D (data transmission is only at 2 400 Bd) and you must first press a button on the meter.

Modes A, B, C and E need signon – read password ?

Comms uses 1 start bit, 7 data bits, 1 parity bit, 1 stop bit - with even parity.

So PICAXE programs needs to “massage the data values to 7 bit and use the last bit as a parity bit

The protocol offers five alternative protocol modes, which can be used by the tariff device: A,
B, C, D and E. Bi-directional for A, B, C and E and read only for D.




Supply Authorities can do some of their own programming to enable such features as:
1. Bi-directional power metering (for those with PV arrays etc)
2. Time of day metering tarriffs versus flat rate

To ensure the general public do not tinker, there are passwords in place to prevent access.
As far as I got was to udnerstand that without a password seemingly you cannot define the number of the register(s) you wish to read and at best you might get back the meter model number or similar.

From Google searching, I did find a website/thread out there (hard to be the first at anything these days) where someone had advaned to assembling hardware and code but without getting past the password have only been able to receive back something like the meter model or serial number.
 
Last edited:

Jeremy Harris

Senior Member
The two small window are not IrDA protocol, they are RS232. IIRC, the protocol starts at a low baud ( 110 ? ) for reading, then uses a secret handshake to switch to a higher baud for writing. This method has been used for years on both gas and electric meters. The metal ring is there to hold the magnetised communication head in place during operation. The protocol is standardised, and widely documented on the web.

The IrDA port on more recent meters transmits continuously, and is a great way to get the power readings. There are a few web pages showing reading this signal with an Arduino, and the code looks quite easy to replicate on a PICAXE.

I have been meaning to build a reader for my meter, a 'flashing LED' type, but have always had something else to do first. One day I'll do it !.

Cheers,

Buzby
That's useful, thanks. Not being IrDA looks like it could be an advantage when it comes to using a Picaxe to read the data. I have found a couple of articles on reading the IR transmit only port (not the flashing LED) fitted to the Elster meters that looks interesting, but this seems to be a non-standard interface. From what I've been able to glean the standard is IEC 62056 (http://en.wikipedia.org/wiki/IEC_62056) and I think it should be fairly straightforward to access the non-security group protected registers in the meter (which will probably be the read-only ones that hold the import/export energy readings).
 

Jeremy Harris

Senior Member
I started to look into this some time ago but I suspect it will be far form simple.

IEC (and AS) 62056 Electricity metering—Data exchange for meter reading, tariff and load control Part 21 Direct local data exchange
applied to the meter comms protocol.

This standard covers the optical transmission port dimensions (including holding magnet), signal wavelength (800 to 1000 nm), and a lot more including:

Asynchronous serial bit (Start – Stop) transmission according to ISO/IEC 1177:1985, half-duplex

Initial baud rate – 300
Standard baud rates – 300, 600, 1 200, 2 400, 4 800, 9 600, 19 200 (for Protocol modes B, C and E only)
Protocol mode A is without baud rate changeover = 300 Bd only.
Note that for Protocol mode D (data transmission is only at 2 400 Bd) and you must first press a button on the meter.

Modes A, B, C and E need signon – read password ?

Comms uses 1 start bit, 7 data bits, 1 parity bit, 1 stop bit - with even parity.

So PICAXE programs needs to “massage the data values to 7 bit and use the last bit as a parity bit

The protocol offers five alternative protocol modes, which can be used by the tariff device: A,
B, C, D and E. Bi-directional for A, B, C and E and read only for D.




Supply Authorities can do some of their own programming to enable such features as:
1. Bi-directional power metering (for those with PV arrays etc)
2. Time of day metering tarriffs versus flat rate

To ensure the general public do not tinker, there are passwords in place to prevent access.
As far as I got was to udnerstand that without a password seemingly you cannot define the number of the register(s) you wish to read and at best you might get back the meter model number or similar.

From Google searching, I did find a website/thread out there (hard to be the first at anything these days) where someone had advaned to assembling hardware and code but without getting past the password have only been able to receive back something like the meter model or serial number.
It does seem as if it will be challenging to even get to read data from this port, which is a shame, as there's no real reason for the protocol to be so complex, AFAICS. I can understand the need to keep the write registers securely locked down, but it would be nice if the energy imported/exported could be easily read, as it can with the Elster meters and their serial format IR port.
 

SAborn

Senior Member
I think the whole point behind not accessing the data is because they dont want you too.

I and many others have logged our power consumption and equate to a different figure than the meter value.

Also if we all had smart displays (which we should) that told us of our present usage of power we would likely reduce our consumption, not what you want people doing if you are in the business of supplying power.

The supply services like to keep us in the "Mushroom effect" with keeping us in the dark on consumption just produces bigger returns.
Why would they want us to become smarter on our energy consumption.

Personally i do all i can to eliminate them from my daily needs, then watch closely on their recorded usage i do pay for.

Logging the meter is just excepting what they claim as actual usage, which is still far better than no indication of consumption at all.

What happens is when we see a base load of X with no major appliances running, we question X and try to eliminate it, thats not good for energy sales of small amounts of X across a wider scale.

For example my reverse cycle Air Con draws about 20mA in standby just waiting for a remote control button to be pressed, i use it a few months in a year, but it uses around 1.7 - 2.0 kWh per year just being powered waiting for a remote button to be pressed.

Its money down the drain unless you are the service provider collecting revenue for every home with lots of devices drawing minor loads.

Why would they make it easy for you to display your consumption data, when there is big dollars in keeping you in the dark.
 

SAborn

Senior Member
Im sure the roll out will be as slow as allowable, with a extention past the expected date, mark my words, because there is $$$ in not informing you to your consumption.

Then the in house meter is a addition cost to the user, so how many people will pay a HIGH fee to monitor their power usage.......... Mushroom effect!
 

neiltechspec

Senior Member
Even more radio clutter in the air then, we'll all have to start wearing faraday cage clothing the way it's going.

Found this as part of a document for Tech Specs of Smart Meters on that link from 'srnet'.

5.2 Overview
In this Part A ESME shall mean Single Element Electricity Metering Equipment.

5.3 Physical Requirements
ESME shall as a minimum include the following components:

i.a Clock;
ii.a Data Store;
iii.an Electricity Meter containing one measuring element;
iv.a HAN Interface;
v.a Load Switch; and
vi.a User Interface,including a Keypad.

ESME shall be mains powered and be capable of operating at a nominal voltage of
230VAC and consuming no more than an average of 3watts of electricity under
normal operating conditions.

ESME shall be capable of automatically resuming operation after a power failure
in its operating state prior to such failure.

ESME shall:
vii.display the ESME Identifier (5.6.1.1); and
viii.have a Secure Perimeter.

The HAN Interface of ESME shall be capable of:
ix. joining a ZigBee network utilising the 2400–2483.5 MHz harmonised frequency band; and
x.supporting Communications Links based on ZigBee SEP v1 and DLMS COSEM.


The full doc is here :
https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/68898/smart_meters_equipment_technical_spec_version_2.pdf
 

inglewoodpete

Senior Member
Im sure the roll out will be as slow as allowable, with a extention past the expected date, mark my words, because there is $$$ in not informing you to your consumption.

Then the in house meter is a addition cost to the user, so how many people will pay a HIGH fee to monitor their power usage.......... Mushroom effect!
And if users do cut their usage as a result of being better informed, guess what will happen to their (our) tariffs?
 

SAborn

Senior Member
IWP, you are 100% correct, as demand goes down the price will go up.

As most people dont even know what a Kwh actually is, lead alone equate it to their power bill or their consumption, i think we are safe for a little while.

If industry was serious about reducing consumption, then every man, woman, and child would know what a Kwh was equal too.

Simply the mass is charged for such a unit but dont really know what it means except dollars added to their bill.

Most new home i go to here in Adelaide dont even have a clothesline outside, but all sprout a shiney new clothes dryer. $$$

There is $100-200 a year just to dry a household weekly laundry in energy costs (with our average climate, go figure???)

We or most are creatures of comfort, and just pay the price of energy to suit our comfort level, that wont change with any fancy display telling the user just how much energy they are using.

Those who want to change their energy use will, and the others will just pay the cost and bitch about it to everyone else.
I have not had a power bill in almost 3 years by adding solar and cutting out the wasted power sources. (Clothes dryers, standby loads on devices, etc.)
 
Top