Arduino energy monitor (ethernet, RS485, LCD display, RTC, electricity meter)


Glad to be here!
My goal is to build smart energy monitor, that can read real time data from energy meter via RS485 and send them thru ethernet to virtual cloud (, to store and show everything in graph.

I have Arduino UNO, ethernet shield, RS485, LCD display Serial IIC/I2C/TWI 2004 20X4 Character, RTC (real time clock) and eletricity meter DINmetering with impulse ports.

I have put them together and done some small projects but now I want to build energy monitor.
Have anyone written same code for this? Have same tips? Some projects are similar but they are slightly different.

I think parts of what you want to do have been attempted and reported here.

You could check the “Learn” section - we did have some data about reading energy meters via serial interface, but I don’t know if it is still available. Also, serial displays have been used.

Or you could search the “archive” forum.

We do pulse inputs as standard.

Hi @EriksPriedite ,

Just wonder why do you choose RS485 for the communication protocol?

It sounds as if that’s the protocol used by the energy meter he wants to read

Hi Bill,

Thanks I understand now, I did not know that some power meters can also output the pulse via RS485.
Also I just searched here in this forum and found some good posts with pictures and explanations.

Did you mean some power meters can also output the data via RS485?
I ask because typically the pulse output and RS485 outputs are separate ports that use different protocols.

It is much more likely, as Bill says, that much if not all the data held within the meter can be transmitted via the serial interface. From the Elster A100 manual:

The following data is available via the IrDA and Serial Data port or IEC 62056 port:

  1. Absolute meter readings
  2. Security register, status and identification data

The following information is available:
• Product Code (Product code number)
• Firmware Rev Code (Firmware revision)
• Manufacturing Serial Number (Specified serial number)
• Utility Serial Number (Utility specified serial number - 16 character maximum)
• Configuration Number (Programmed configuration)
• Energy Register Definitions
• Energy Registers Readings
• Status Flags
• Error Flags
• Anti-creep Time - Number of hours the meter has been in kWh anti-creep
• Time Powered-up - Time since last power up
• Time in Rate 1 - Number of whole hours Rate 1 has been active
• Time in Rate 2 - Number of whole hours Rate 2 has been active
• Power Fail Count - Total number of power fails
• Watchdog Reset Count - Total number of watchdog timer resets
• Reverse Energy Event Count - Number of times reverse energy was detected

Hi Bill and Robert,

No I meant the pulse, I thought it would be the pulse coming out digitally from RS485 port.

When I was searching old threads about RS485, I found in this thread a [datasheet] ( of a power meter made in china with RS485 port. I did not notice in the datasheet that there are two ports: pulse port and RS485 port, until Bill replied with the above and I checked the datasheet again and saw that ports in the datasheet.

So how the data will look like so that it can be interpreted as energy? I read the datasheet but it is not clearly explained.

Ah the datasheet said: “RS485 output for Modbus RTU”. So there must be registers for the absolute meter reading, instantaneous power, etc, is that correct? The problem is the datasheet does not provide any information about data addresses / registers to access the data?

This should help.
SDM220Modbus_protocol_V1.1.pdf (505.0 KB)

Remember, Google is your friend. :wink:

Yes thanks Bill, that data sheet is clearer - the register addresses are clearly mentioned.

I think my advice to OP @EriksPriedite: First make sure that the datasheet of the power meter that you are planning to use contain all the information about the modbus addresses. I am looking at other datasheet - also modbus rtu power meter - but from different make from what Bill has posted above - and the register addresses are different. So I think those addressing are not standardized, and may be different among brands/makes?

I think that will, almost certainly, be the case - and even between models from the same manufacturer too.

We are working with the same concept using three phase PID Controller( Honeywell DC 1040) and for communication purpose we are using RS485 TTL Module.We have added all address details as per communication manual but then too we aren’t getting any serial response from the RS485 TTL module.