Tuesday 11 September 2018

Advanced Power Monitoring System

For as long as the lab had been an idea in my head, a power monitoring system was also. The premise for this project is simple: a system that monitors the power entering the lab and displays it on a screen on the power cabinet. And since I have finally had a load of time in the lab, I have designed and built that very power monitoring system and its more advanced than any other on youtube.

Simply put, my power monitoring system is the most advanced there is, not because I'm egocentric, but because it measures every possible piece of data you could want to measure on the power flowing into the lab. It measures:
  • Voltage
  • Current
  • Power Factor
  • Phase Angle
  • Apparent Power
  • Real Power
Voltage and current are a given, but I have also decided to make the system measure power factor. The reason for this is because, voltage times current does not tell the full picture of power.

For a detailed explanation of power factor and phase angle, see a proper video but here is the basic principle. Power in a DC circuit is calculated by multiplying voltage and current, in AC its more complicated. When reactive loads are placed in an AC circuit, the voltage and current sine waves become out of phase as current either leads or lags voltage. This means simply doing RMS voltage times RMS current does not give the correct value for power. Proper measurements can be derived using the power factor.

The cosine of the phase shift between the two wave forms gives the power factor. Current times voltage results in a measurement called the apparent power; apparent power multiplied by the power factor gives the real power. The difference is known as the reactive power.

My system is more than just a simple voltage current monitoring system since it records the power factor by measuring the time difference between the zero crossing of each wave form enabling the system to measure and calculate all of the different power values.

Despite this, current is arguably the most important and useful parameter to measure as it allows me to see the current a project or a particular set of systems draws. The other parameters will not be used much but it is still handy to have them recorded.

The main purpose of the project was not just to present the power consumption of the lab on a screen but also as a learning experience to expand my Arduino and programming skills. This project was actually very multifaceted as it involved electrics, electronics, programming and mathematics/data processing. And at the end of the day, it was fun to do and an achievement.

The hardware required for this project is quite extensive. Current transformers were used for current monitoring, a step down transformer was used for voltage and multiple IC chips, diodes and potential dividers were needed for all the rest. Not to mention the the OLED screen for presenting the data, numerous wires/cabling as well as the Arduino Nano that sat at the heart of it. All of this took up a lot of room, luckily there was a lot of room left in the power cabinet to facilitate this.

Here is a view of the cabinet before the instillation of the power monitoring system. The empty space is ample to contain the power monitoring and backup power systems that would soon be added.






Testing and refining of the circuits happened outside of the cabinet. Once I had the system working as I intended it was mounted inside and wired up to the labs power supply. My new mini oscilloscope was instrumental in the completion of this project and has convinced me to get a much bigger and better one in the future.




The components were mounted inside the cabinet and a long USB cable was used to program it.





Finally, I programmed the system to display all of the relevant information on the small yet versatile OLED screen.








Observant viewers will notice information pertaining to a backup battery, this is for the backup power system which will be explained in the next post.

Mistakes were made in the construction of the project, it took me three attempts at making the primary circuit board as parts kept breaking!


The system had to be carefully calibrated in order for it to turn the recorded value into meaningful voltage and current values. This was done by placing a dummy load on the system and measuring values at incremental power consumption. Graphing and regression analysis could then take place to determine the constant of proportionality needed to obtain the true values. It should be noted the system isn't perfectly accurate but functions well enough for anything I need and can be improved further if needs be.



Once the server is set up in the lab, the data will be recorded and logged. This data will then be able to be viewed in a graph of power consumption. Finally, the price per kilowatt will be factored in and the electricity usage of the lab annually or daily can be calculated!

For much more information, circuit diagrams and a much closer look at the system whilst running, check out the video overview I have made on the project here:


20 comments:

  1. Hi can u plz share the code and schematic. I really love this project and want to try it.
    Hope for the positive reply Asap.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Greetings! Can you kindly teach me how to program the arduino how to sample voltage and current accurately. I do have an idea on how to do this project another way around, and would like to discuss it with you it that's possible.

    ReplyDelete
  4. This code I will run on thingspeak ?

    ReplyDelete
  5. Please post the code of Arduino

    ReplyDelete
  6. Please post the code of Arduino

    ReplyDelete
  7. It's great project. could you share the code of arduino?

    ReplyDelete
  8. code plsss. i just need the calculation to get the current and voltage

    ReplyDelete
  9. Can i get arduino code. Please

    ReplyDelete
  10. Hi there, I am doing my fyp on net metering. This project is very helpful for me, can you please share the arduino code

    ReplyDelete
  11. Can you please help me how you have calibrated the voltage & current

    ReplyDelete
  12. can u please give how we make zero cross detector . i have lm358 for this but i cant get desired square wave

    ReplyDelete
  13. Pls can I have your schematic diagram ...really great work

    ReplyDelete
  14. Pls can I have your schematic diagram ...really great work

    ReplyDelete
  15. lokk here!!!http://www.energialternativa.org/cgi-bin/yabb2/YaBB.pl?num=1360348380/255

    ReplyDelete
  16. www.energialternativa.org/cgi-bin/yabb2/YaBB.pl?num=1360348380/240

    ReplyDelete
  17. Can I get the Arduino code of this project please

    ReplyDelete
  18. Can I get Arduino code of this project please please šŸ™

    ReplyDelete