Power Monitoring Project – Part 1

No Comments

Right now I am involved in a new project at work to monitor power consumption per machine. This kind of projects gets you excited and you find your self digging more and more and thinking out of the box to get things done.

The project will start with monitoring 10 machines only, but later it will be expanded. Two main components were bought for this project which are PM9C & EGX100.

PM9C – Power Meter

The PowerLogic Power Meter Series PM9C offers the basic measurement capabilities required to monitor an electrical installation in a 4-module case (18 mm modules).

 

They can be used to monitor 2-, 3- and 4-wire low-voltage systems and connect to external current transformers. With the large backlit display, you can monitor all three phases at the same time.

 

EGX-100  Ethernet® Gateway

 

EGX100 provides cost effective, reliable serial line to Ethernet connectivity in the most demanding applications:

  • Energy management
  • Power distribution
  • Building automation
  • Factory automation

 

It’s obvious from the above two components, that all what we need to do, is connecting a PM9C to each machines, and then having those PM9Cs connected to the EGX-100 through ModBus cables. EGX-100 is connected to the Ethernet Network, and thus, information can be accessed through any PC connected to the company network.

Software Part

When I ordered the PM9C and EGX-100, I had ordered the PowerView software provided by Schneider. The surprise was a wrong delivery (as usual). And thus I didn’t get the software.

 

At the beginning; that was sad, but later on I knew that I was lucky! Because I decided to write my own software to read data from the devices, and display them.

 

After thinking and studying what I have; and what’s required, I thought about having the below solution:

  1. One windows application (using C#.NET) that will read the data from the gateway, and then store the readings in MySQL database.
  2. Web Application built using CakePHP platform to view the information and carry out the required processing on the collected data.

 

I haven’t thought about those two application names yet, so I’ll call them Windows application, and Web application.

I started so far working on the windows application, and for that I had two main challenges, first one was something that I have not done before, which was having C#.NET to deal with MySQL database.

Why MySQL database? Of course license issues!!

 

This part has been accomplished successfully utilizing ODBC Driver for MySQL (Connector/ODBC) coming from MySQL website.

 

That worked out like magic for me, and I was able to deal easily with MySQL using my C#.NET codes.

 

Second part was reading the information from ModBus TCP network. I found one great open source library for that called “nmodbus”. It was really easy to use, and using some ModBus Emulators I was able to finish that part at home before even having the installation done at work place.

 

Below you can see the Windows application; but it’s still during its “Under Construction” phase.

This is for now, wait for Part-2 of this article, where I should have finished the windows application completely, and started working on the Web Application.

And if you can help me out with some names, that would be really nice of you 🙂 .