arduino home energy meter

Yes, you should be able to do the calibration with an iron although it would be better to do it with a load which is slightly more accurate such as a 100W light bulb. Other features of smart energy meter using Arduino are: Meter measures, record and integrate the energy consumption of the load connected. Thanks ! Great article, very informative and well thought out. 08:58:26.696 -> RMS Current : 8.78 Hi Jepoy, Vbat=6.5 when fully charged The two variables maxCurrent and minCurrent read the peak (minimum and maximum) values of the wave to calculate the RMS current at that point in time. Each time I change the load, I need to recalibrate. I was wondering if it is possible to use your project for any devices such as air conditioning units, refrigerators, etc? What if we use SCT-013-000 instead of TALEMA AC1030? I have simulated this setup with 2 arduino's 09:49:18.591 -> RMSPower : 1767 Serial.println(ret); To cut everything short, in order to obtain all the 6 parameters above, we need 2 sensors, the AC voltage sensor and AC Current Sensor . If you live in the USA then the supply voltage is 110VAC, your CT can only measure up to 10A so (very simplistically) you cant measure any device which uses more than 11010=1100w. If you stacked up a LCD Display Shield, Analog Pin A0 is automatically occupied by the button function. Your project has helped me understand many things. Is there a way to plot the AC Current waveform vs the AC Voltage waveform. If youve changed all of your electrical demand onto your inverter, there will be nothing to draw power from the mains when the power does come back on. Thanks sir.. Hi Mico, UNI-T Multimeteris a good quality with decent price. Firstly I really appreciate your project work. Vout=10/(10+10)*6.5=3.25v which is lower than 5v and suitable for ARDUINO analog pin while (Ethernet.begin(mac) != 1) 08:58:32.824 -> RMS Current : 8.78 Here I attached the complete code(beta version) for energy meter excluding SD card data logging which is attached separately in the next step. gsm-based smart energy meter with arduino uno prepaid energy meter circuit diagram prepaid energy meter project prepaid energy meter using gsm prepaid energy meter using gsm and arduino project prepaid energy meter using gsm documentation prepaid energy meter with theft detection 10,041 views 1 comment 5 respects Components and supplies Monitor Your Energy Bill with Modbus and the Arduino IoT Cloud Monitor Your Energy Bill with Modbus and the Arduino IoT Cloud Connect a Modbus energy meter to an Arduino MKR WiFi 1010 board and a MKR 485 Shield and monitor the power consumption of your home via an Arduino Cloud IoT dashboard. regarding the 3 phase can i connect all 3 cts on the 5V input on the arduino with the lcd? int ret = xivelyclient.put(feed, API_KEY); 09:49:20.637 -> RMSPower : 1767 thus it should sent as an sms what the LCD displays. Feature: How did this project go for you? Ok so i finally understand the solution of the factor problem..thank you sir. Serial.println(feed[0]); Thanks Clayton, 2. So this meter measures the supply current to your home through a CT (current transformer) and then does a couple of calculations to give you your current, power, maximum power and kilowatt hours consumed. It should preferably be an electrolytic, 10V, 10F capacitor. Just trying to figure this out and get it solved lol. Great Tutorial, Thanks again! After connecting (MM-93) to your PC, you can ask it to send you any input/ output measurements through the Serial monitor. Thanks a lot for all your Information. Between cycling across the rolling fields, sailing along the steady water and strolli. So do I have to change the calculation or will the scaling solve that? I tried with a light bulb of 28W on the 220V, I expected to have 0.127V. I have built with this a YHDC SCT013-030. It only makes around a half a percent improvement in the accuracy of the calculation but its the better way to do it. Shout for help again! sendData(); // send data to xively If i match the wattage with my kill a watt meter at ~750.0 w then its off at ~1500 w by about ~300.0 w. reading about ~1800. If you maximum current is 10A then use the AS-103, youll get better resolution. Power is product of voltage (volt) and current (Amp) I though ARDUINO CODE: For LCD tutorial clickhere, The following code is a format to display in LCD all the calculation for power and energy. And if is posible to do it using only one Arduino and show the measurements of each sensor in diffent LCDs? Step 1: Gather Components You will need: 1 x Arduino Current sensing electronics 1 x CT sensor YHDC SCT-013-000 1 x Burden resistor 18 Ohms if supply voltage is 3.3V, or 33 Ohms if supply voltage is 5V 2 x 10k Ohm resistors (or any equal value resistor pair up to 470k Ohm) 1 x 10uF capacitor Other A breadboard and some single core wire. Article is so good. Thank you and have a great day! I bought CTYRZCH SCT-013-000 (https://www.amazon.com/gp/product/B01C5JL5IY/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1). Using the millis function, record the start millis and finish millis, calculate the difference and that is your time period. You can adjust this line of code: double RMSCurrent = ((maxCurrent 516)*0.707)/11.8337. Heres some online info on your CT http://artofcircuits.com/product/zmct103c-5a-current-transformer You are correct, this meter only gives accurate results for resistive loads, as Ive said in previous comments. ?please help me, Hey buddy, know the local electric tariffs of your country! Thanks for the great feedback! 11.05A, 1215W 08:58:30.774 -> RMS Current : 8.78 now i having problem with my progress where all my readings on serial monitor shows zeroi been so frustrated with this situation as i cant find solutions to solve ithope i can solve it as soon as possible as death line is close. // MAC address for your Ethernet shield 08:58:30.774 -> MAX Current : 617 It seems that the meter is accurate on a specific scale and thats it, anything higher or lower goes out exponentially. The pulse output may be a flashing LED or a switching relay (usually solid state) or both. Hi Kevinoel, In this tutorial, I will show you how to make a Wemos ( ESP8266 ) based Multifunction Energy Meter. int ret = xivelyclient.get(feed, API_KEY); Sorry Im just really new to this as this is my first project. You could measure it with a small step down AC transformer and then plot it onto the LCD, feed the information to the Serial monitor or save the data to an SD card and then plot it on your PC. Please find it at our affiliate linkhere!!! A blog about DIY solar and arduino projects. thanks for your kind response, that really helps.. 09:49:18.591 -> analog input : 618 08:58:06.310 -> RMSPower : 100 You can easily interface this module to any microcontroller like Arduino, STM32, PIC, AVR etc. 1) I have an ADS1115 I2C 16-bit ADC, I was wondering if it would work? amps =actualval*10; For time measurement there is no need of any external hardware, as ARDUINO itself has inbuilt timer. Just connect the LED to the pin with a 220 ohm resistor and add a line of code to turn the pin on if the current is lower or higher than your range set points. You will burn your CT and its burden resistor out. Hope this helps, let us know how it goes! In this way the Apparent Power can be estimated. i get response like 0.00kwh for(int i=0;i<150;i++) VSS -> Arduino GND Get thefast connectorat our affiliate linkhere!!! Can you help me building almost same thing, but I need relay for a safe shutdown. 7.29A, 801W I use the ADS1115 16bit ADC to read the output from ACS712 and process it in the code. The main issues with a transformaer are the phase shift and distortion it induces to the waveform . Im using and adapting your project to build a PV monitor system. Due to this, other related electrical parameters such as the Real Power (watt) and power factor could also not be determined. Once you have downloaded the software, you may download the code file (.ino) for this application below (right click save link). There are essentially four components which need to be chosen or correctly sized for you energy meter. void sendData() Power factor is assumed to be one here while calculating power and that assumption is valid when all the appliances in home are purely resistive loads. 10.69A, 1176W yeah. Hi Stas, Ac Digital Multifunction Meter Watt Power Volt Amp Current Test Module Pzem-004t For Arduino Ttl Com2\com3\com4 0-100a 80-260v - Current Meters - AliExpress. If you like our post, we need your support to like and share our posts or videos so that it can reach more and more people like you !! I used a solar panel of 10 Watt ,6V for lighting few bright LEDs. I was walking through the hardware store the other day and I walked past an energy meter which clips onto your homes electricity mains and then provides you with information on your power consumption and cost estimates for the month. Thank you for the experience, it helped me lot . Peacefair PZEM-051 Energy meter is an compact DC energy meter that measures Voltage, Current, Power and Energy. If so, how do I go about it? The capacitor only sees around 2.5V so you can use a small 10V capacitor. You need an Ethernet shield which has a built in micro SD card reader, this can then be used for data logging. Thanks a lot for your quick feedback will you please share some technique how can I do that? I havent used an Adafruite display before but you should be able to get it to work. The problem is that the CT youve got is way bigger than what you need for the loads youre trying to measure. The Arduino sketch of the prepaid energy meter detects the blinks and runs a counter in descending order measuring consumption of each 1 KWH or unit electricity by 3200 blinks or pulses. I made the application in line with the information you provided. Finally you need two dividing resistors to get the 2.5V reference voltage from the Arduino. Check your local regulations first though as tampering with your electrical supply without a qualification may be illegal and can be dangerous. Exactly as Discribed. We have been using UNI-T multimeter for years has not been any issue. ! The CT doesnt measure if there power available, it can only measuring power flowing through it. How to claculate the maximum continous power ? Bring your ideas to life without considering that how to program a server to create a host for web communication using TheAmplituhedron. It is used to drive the LCD contrast. We built our source code to handle up to 5 inputs measuring and 5 out measuring you just need to add more CTs and PTs for each additional input / outputs as we will discuss that in Hardware section. Thanks for the great feedback! It compares the varying load to this factor in order to determine the actual power being used. //Remember to install all included libraries first. When the battery voltage is 6.5v I got 3.25v from the voltage divider and sample1 = 696 in serial monitor ,where sample1 is ADC value corresponds to 3.25v. The only problem is the the Ethernet Shield & this LCD shield share a common pin 10 and pin 4. Great! Make sure that you change line 27 where you read the analogue input to currentPin1, currentPin2 and currentPin3 so that the Arduino is reading inputs from the three different CTs. Thanks for the great feedback. Almost all code lines are with explanation. The one used here is the Talema AC1030 which can sense 30A nominal and 75A maximum current. Youll also need to store the time between data readings in order to plot the results on a graph or do anything meaningful with the array, make us of the millis function for this. Best Regards, I have just published a guide on how to make a 3 phase energy meter go have a look at it https://www.the-diy-life.com/simple-3-phase-arduino-energy-meter/. Yes, multiply the kilowatt hours by the price per kilowatt hour and set that to display on the screen to see your bill. NB Be careful when connecting the power meter to you homes mains and make sure that the power to your board is switched off before doing anything in the mains box. EthernetClient client; void setup() 11.71A, 1288W Hi Mico, Good day siri am using a 20A SCT013 with a built in burden resistors.. i use ur code with the serial monitor as my display and not lcd..my problem is all the four lines reads 0.. my load is a 300w rice cooker..can u please help me? The Hall Effect is the production of a voltage difference (the Hall voltage) across an electrical conductor, transverse to an electric current in the conductor and a magnetic field perpendicular to the current. I measured it with a multimeter on AC mode and Ive got 0. The Amps match my clamp meter. Arduino Energy Meter - V2.0 In this tutorial, I am going to show you how to make a simple WiFi-enabled AC Arduino Energy Meter by using Arduino/Wemos board. thank you for your reply My CT is TALEMA1020, and my computed burden resistor is 42Ohm so i used 39Ohm as a standard value nearest to my computed resistor value. This study presents a customized IoT-based Advanced Smart Energy Meter infrastructure with remote and local logging and monitoring of electrical parameters, and has provisions for connections to both web and cellular internet using ESP8266 and GSMsim800a. Each wall outlet socket can be installed one unit. http://hyperphysics.phy-astr.gsu.edu/hbase/electric/imgele/hse.gif Prepaid Electricity Energy Meter is a good concept in which you can recharge its balance, like we do in our mobile phones. 6. You can download the .ino file to see for your own. The capacitor youve used should be fine and sounds like its connected correctly. I do not know why, but all three give me exact same values and they do not change a bit. Just want to make sure before i blow something up :p. Hi Marius, This device is suitable only for DC loads such as Solar PV systems. If youre getting nothing on your display then theres probably a connection problem between your Arduino and the display. If you live in a 220VAC area then you should be able to measure 2200w so you wont have a problem with your heater. This means that with a 100A CT, you have an effective range of about 100 x 120 = 12,000W. Hope this helps and good luck with your project! If you are going a step further by adding Datalogger Shield, Analog Pin A4 and A5 are also occupied for I2C communication for the Real Time Cloak module in the Datalogger Shield. First of all great project here. Amsterdam. ZMCT103C high precision PCB mount micro current transformer converts a high primary current into a lower secondary current. Something like 10A would likely be fine. Can you help me out with that please? How would you save the information onto a SD card. The system. Thank you very much. stay healthy and happy. 09:45:53.195 -> analog input : 508 Step 5: 3D Base for the Circuit. Warning ! With nothing trying to draw power from the mains, the CT will still register no reading even when the mains comes back on. Hi Marvin, I still see a problem in the way you need the CT to detect juice back in the supply line. 2. Save my name, email, and website in this browser for the next time I comment. All of your values are based on your current measurement from your CT. Note that only the CT should be removed, not the capacitor and burden resistors. If you are simply trying this project for fun then a breadboard is perfect. Does the back light come on? Thank you for all the information. When reading an electric meter, read and write down the numbers as shown on the dials from right to left. Many thanks on the great project and the promptness of your responses. Both calibrations can be done manually (the harder way) or automatically by pressing the SELECT Button in the LCD Display Shield and wait for about 5 seconds. Serial.println(datastreams[0].getFloat()); First I want to say thank you for this tutoriel . You can recharge the electricity balance through this system, just by sending a SMS. An Arduino only has analogue voltage inputs which measure 0-5V DC, so you need to convert the current output from the CT into a voltage reference and then scale the voltage reference into a 0-5V range. It communicates with almost everything around the world. The 110V in the house is balanced between the two legs. Adafruit have a good library for driving these displays. 08:58:06.345 -> MAX Current : 521 Nothing else needs to be changed in the circuit. The line of code you mention is simply throwing out the negative half of the sine wave so it is unlikely to be giving you problems. US $7.77. There is one analog pin available in NodeMCU (ESP12), we could use that pin but ESP series can take upto 3.3 volts on their pins. Hi Jonathan, Send values from known variables which are non zero to the Serial monitor. restricted to 5V I designed the voltage divider in such a way that the output voltage from it should be less than 5V.My battery used for storing the power from the solar panel is rated 6v, 5.5Ah.So I have to step down this 6.5v to a voltage lower than 5V. AEDUINO ADC convert Analog signal to corresponding digital approximation . Then I change the input and I need to recalibrate. In the attachments section , you will find a technical eBook explains the Project processes from Zero to Hero. The current sensor that is widely used for Arduino is theACS712 Current Sensor Module. Hi Great project. 08:58:34.802 -> RMSPower : 2020. my formula is: Can you tell me what I could do? Yes, the AC1030 has quite a lot of space for components, it really is a nice unit to work with. can you please help to figure this out.. Circuits doesnt have a CT element so the signal generator was used in its place to generate a current sine wave. Thank you for the feedback. I have a question: I want to know if is possible to do this energy meter with four sensors, I mean, to measure the current of four different devices or four different breakers. #include <EmonLib.h> // Include Emon Library #include <SoftwareSerial.h> //This library will do serial communication b/w arduino and nodemcu. I try a 40watts soldering Iron but nothing change on its value. It sounds like youve got quite an interesting supply to your home. The energy meter is installed in the homes or offices. I was thinking of adding a GSM Sim800A so that if the user wants a limit with his or her power consumption, he or she will be notified via text message with the use of GSM Sim 800. These little devices clamp over an AC wire and detect how much current is passing through it via induction. Youll get better accuracy from a smaller CT. On 220V the laptop charger definitely wont even register as the current halves again. This project is shared under the Creative Commons License: The best resource for tech and electronics projects, tutorials and reviews. We have 2x 110 legs that when combined are 220. Either your CT is not sized correctly for the load you are trying to measure, or your circuit is faulty or there is an issue with your calibration. 2. { I think youd need to re-look the sketch entirely to achieve the sample rate you require. what is that 10k element that is used on the schematic from autodesk What are your advise on this ? the purpose of my project is definitely measure the main current and power but i just want to know that my ct is working on small loads and give me accurate readings (watts), or not before clipping on the mains thats why i use smaller load. Now, you explanation is clear and I understand my accuracy issue. You may grab the unit at our affiliate link here !!! You dont have to cut the wires but youll need a physical connection to both wires, possibly at the circuit breaker. Serial.print(Datastream is: ); I have looked at the data sheet from the supplier that supplied my CT sensor and i see that is has a built in burden resistor of 33 ohms. To know more about the LequidCrystal library clickhere 09:49:18.627 -> MAX Current : 624 }. Remote access energy data from web. 15. Did you cut the plug off and expose the wires? Other problem is when I start this without ON the bulb it gives me 184W and 0.84A. I cant comment on whether thats correct for a 65W fan as I dont know what your CT rating is or in what configuration its been connected to your Arduino. How do I do this? ARDUINO ETHERNET SHIELD, Power : IoT | TensorFlow Weather Station Predicts Rainfall Intensity, Smart Personal Money Vault Monitoring System Based on IoT, How To Use TheAmplituhedron.com To Improve IoT Projects. This project assumes you know the basics of Arduino programming, otherwise read our article on getting started with Arduino, and that you know how to connect an LCD screen to an Arduino. watt =voltage*amps; // power=voltage*current Serial.println(feed[0].getFloat()); Youd also need to place a millis check to time each sample to achieve the exact 600Hz sample rate. I may be wrong but if I remember correctly, the pin layout of the Ethernet shield and the LCD shield are different so you should be able to stack the two on top of each other to get the functionality of both. 138 /avg nightly. The Arduino has a resolution of 1023 increments on the analogue inputs so a CT which measures 100A will result in a resolution of 21.5 watts while one which measures 30A will result in a resolution of around 6.5 watts which is obviously much better for measuring smaller loads. Serial.begin(9600); Your burden resistor is fine although it is slightly undersized, you should probably go with a 43 resistor just to make sure you dont overload the CT when you are working at its upper limit (around 60A). Notify me of follow-up comments by email. Thanks. i used sct 013 and calibrated it to 3.9445. I have ohm the CT , 102 ohms. hi,i need to measure the power consumption with power factor value.how to modify this model for house hold appliances. The basic circuit for the connection of the CT to the Arduino is shown in the diagram below: A breadboard circuit layout is shown below. Actual value = (value-2.5) V If more modules or shields are stacked, if voltage dropped is obvious, you may consider using independent 5V power supply and not from the arduino board. You need to use around a 1/3W general circuit resistor. is there anything i am doing wrong? Get it at our affiliate link here !!! You could simply cycle between two display screens every few seconds. I am not calibrating it, which is the procedure? Everyone can own a 3D printer and print what ever object based on what you can imagine !! Serial.print(Read power ); Recommendations Eggs Challenge First Time Author Contest Fabric Challenge Thats all correct but the load is probably too little to register. 7.23A, 795W There may be a problem with the way the Arduino handles the different data types, being int, double and unsigned long. And can i calculate the bill using the kwh or units? It works now, We do several attempts and several trials in putting different appliances, and when I read some of the comments, I found out that, It only works In AC appliances. The output voltage of this sensor is2.5V +/- 0.625Vwith decent accuracy. I have: CK 10uF 50V 105C which is electrolyte, and connected negative pole to GND, positive to resistors (100K). or am i doing everything wrong This needs to be done with a load of around 2000-4000W for a 30A CT. Current Thank you from now. PZEM-014 or PZEM-016 AC Energy Meter. There is most likely something wrong with your voltage divider circuit. The Arduinos analogue map function maps from 0 to 1024. I am not too familiar with the ACS712 but it appears to be a scaled Hall effect sensor. You may have to wait about 5 seconds long until all values are re-calibrated. Im realizing a project in which I have to sample the current at a minimum of 600 Hz to reconstruct the synsoid. Thanks A lot:) I sorry again im a novice for this kind of things. 512 is therefore the middle/zero line of the sine wave in an ideal environment, in my case 516 was the calibrated zero line. So I removed the external burden resistor (as your blog suggested 130 ohms) and tried the system there after. The CT is a 100A rating. Hello I know that it is hard to identify the problem without seeing the code. You can stack up screw shield, Datalogger Shield and LCD Display Shield on top of Arduino UNO. sample2+=analogRead(A3); //read the current from sensor Serial.println(feed[1]); Hi Dani, The Arduino analog inputs can only handle up to 5V. PZEM-014 and PZEM-016 are the AC Energy Acquisition devices that measure Voltage, Current, Power, Energy, Frequency, and Power Factor. Hi Mateo, What resistors did you use and double check that the connections are correct. Your second problem is that a 9V battery and an LED light are DC, this software is written to measure AC power. In this case it was 11.8337, it may be higher or lower depending on your application. actualval =val-2.5; // offset voltage is 2.5v 3.25v equivalent to 696 Youll most likely need to drive the large relay using a smaller 5V relay which can be powered by the Arduinos on board power supply. If the voltage varies per house then Id suggest you measure it once off at each house with a multimeter and set that voltage in the Arduino for the duration that it is installed at the house. It is. It can also disconnect the home power supply . byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; A CT is an analogue device so you can effectively treat it as if it were a 10A CT for example and size the burden resistor as such and youll improve your resolution this way. maxCurrent 516 simply takes the value read for maxCurrent and references it to the neutral line. Youll then need to add an if statement to the code just after the kilowatt hours are calculated which turns the relay off if the power consumed exceeds 10kWh. Im looking to build one of these to measure power consumption of my PC. Unfortunately it does not have a low voltage relay in it to turn the inverter on and off. double RMSCurrent = ((maxCurrent 516)*0.707)/8.130; Michael please, have you any idea what I have wrong? These are not easy to come by in a normal household so you will need to find something which uses an established and consistent amount of power. Maximum is 32256 bytes. This value is an arbitrary constant used to calibrate the reading and wont be the same for your CT. Youll need to measure and calibrate your own meter to get it to work correctly. Good luck! If is posible, how would the code change? Yes, a 30A CT would give you more accurate results. I havent done one with a variable voltage measurement. Meet Temper, a compact, low power temperature sensor based onESP8266andSHT30with a large 137 pixel led, I knew there weredevicesthat could trigger a camera to fire during a lightning strike, but, Many of us have been asking for some time now where are our robot servants?, This project is a motion activated redstone lamp. If you do too, grab a cup of coffee and settle in, I'm happy to have you here. If you can make and program this meter then it really should be easy for your to add an extra item onto the display to show your monthly costing. You can get it at our affiliate link here !!! Completely new to electronics. ARDUINO ENERGY METER By opengreenenergy in Circuits Arduino 633,786 941 172 Featured Download Favorite 3 More Images By opengreenenergy Open Green Energy Follow More by the author: About: I am a DIY hobbyist by passion and a Power Engineer by profession. Be sure your connection cable is tight and module shall be installed in such a way no movement at all. it doesnt look like a CT, is there something else im missing? You need to either choose a CT which is more appropriately sized for the items youre trying to measure. Do I have to get into the wiring of each appliance and connect the leads to the Arduino, or do you have any suggestions for how I can rig this energy meter to simply plug an appliance into the meter? Vout = (4.669*sample1)/1000 volt The first number displayed is the instantaneous current followed by the instantaneous power. Serial.print(PUT return code: ); I can control contactor of heating resistors in boiler according to current. I saw when using the 3.3v with the lcd the contrast is verry light can hardly see anything on the lcd, And thanks again for all your help would not have been able to do without your help. Without the LCD Display, you can only monitor the measured current value on PC via Serial Monitor. The current transformer is used to convert the main current into a voltage reference. The burden resistor which youve used is correctly sized. RS -> Arduino pin 8 09:45:53.232 -> RMS Current : 0.00, with 100Wbulb and 800W toaster: Due to this problem I designed a solar system for my home on a experimental basis. Oh Forgot to mention that my CT i the SCT 013-000 the 100a max and 50ma. Yes thats correct. To calculate DC power you can simply multiply the measured battery voltage by the measured current through the ACS712. Arduino has the ability to measureAC current (via hall effect CT) by analog input pins. Decibel meter with Arduino & 162 I2C LCD Display. The good news is you do not need to manually calibrate the offset settings if you got theLCD Display Shieldwith you. Once you get your Hall effect split core transformercurrent sensor moduleandArduinoBoard ready, you may start to do hardware wiring. // Analog pin which were monitoring (0 and 1 are used by the Ethernet shield) int sensorPin = 2; And for Ac voltage calculation,can i use Ac-Ac 9v adaptor with some resistor and capacitor then connect it with the arduino? What may be the problem?? The reason I took such a big CT to start was my intention of using this with my 9000 watts gas generator and monitor my usage during an outtage. You can plot and analyze all the measurements using Mat lab/Simulink with a quiet simple modification, just install Mat lab / Simulink Arduino supporting package. From what I can tell, there are two possible reasons you are getting fluctuating values: Thanks. Great, thank you. a very nice work, thank you. Hi, It depends on you regions electricity supply. Now, I could get a smaller CT, but you also intrigue me on scaling down the current CT. Any information on how to achieve this ? Connect the I2C Pins (SDA, SCL) of LCD Display to A5 & A4 pin of Arduino. Voltage . Here is the link to download theMeter code. I am a newbie to coding and electronics and would greatly appreciate the help. We would need readers like you to support us in order to keep growing. Thesecond calibration is to further eliminate false signal value after RMS calculation. 13. is it ACS712? Open an account withhttp://xively.com(formerly pachube.com and cosm.com), Sign up for a free developer account athttp://xively.com, then click the activation link to activate your account. So this meter measures the supply current to your home through a CT (current transformer) and then does a couple of calculations to give you your current, power, maximum power and kilowatt hours consumed. Can I use this to remotely read my power/energy usage at home using my smartphone? First of all, this was a really great article and the best one yet for similar projects that me and my colleagues have found. Can you explain to me how you are coming up with kwh? I am an electrical engineering, final year student. You should be using around a 50 ohm resistor. Here is the circuit diagram for our AC Wattmeter using Arduino UNO: As you see, we hanged the voltage and current signal at 2.5V reference voltage. However, I am not sure what to do with that value. If I only hook up to one of the legs coming in it would read 1/2 of my 110 devices and the 220 devices correctly. Plug in a small light bulb (100W or so) and see what load is displayed. I used 3 items to test output and 2 other measuring devices (Kill-a-watt, Fluke Ammeter), Smeg kettle (constant 9.8A) (both fluke and killawatt same A rating) I should not have to recalibrate all the time. kilos = kilos + ((double)RMSPower * ((double)time/60/60/1000000)); hi, what do you mean for RMScurrent andd RMSpower. hello sir how can i display the voltage and cost in the display sir can u give me the code sir and how to do sir. minCurrent = current; hi,sir thank you for your good project i need to build it but i need to add a relay to cutt off the power if i will consume a certain amount of power, example when i consum 10 W i need that i catt off the house power till i will start again the arduino, thanks plz help me. I want to have some modifications with my energy meter. Serial.println(Initializing network); also I tried to connect water heater then I get 8A on clamp meter and get just 4A can you tell me what is the problem and why get fault reading if the load is linear? const unsigned long connectionInterval = 15000; // delay between connecting to Cosm in milliseconds I made such meter and it works, yet need some calibration. If you arent really measuring anything close to 60A then its not a problem and 39 is fine. If youre getting a number significantly less or more than 500, say 200 or 800 then your circuit isnt set up correctly. 09:49:18.627 -> RMS Current : 7.68 { I used R1=10k and R2 =10K. You can get it at our affiliate link here !!! The difference between a 25A and 50A CT will only affect your resolution, you should still be able to get your meter working with either. what to do??:(. As youve said, its best to get the smallest possible CT for the largest load you expect to measure. It monitors electricity consumption and sends the detected data to the cloud through the GSM cellular network; it is based on an Arduino Mega equipped with GSM Shield and an absorption detector board. This is Bittle, a ready-to-run advanced open-source robot dog by Petoi that is based on the OpenCat robotic pet framework. Your analogue reference voltage to the Arduino is 2.5V so to determine the resistance you use R=V/I R=2.5/0.042=59.5. You can get it at our affiliate linkhere!!! 1. We use 220V for power hungry appliances and 110V for the smaller stuff. my midpoint is ~1.63 v (NODEMCU) 3.3v max Vin burden resistor is ~47 ohms which gives me about ~50% of the max amps (50A). The SCT-013-000 is listed in the Sizing The Burden Resistor section along with the required burden resistor size. 08:58:30.702 -> RMSPower : 2020 To make this project you will need some component. Hi Pita, If there is no, is there a way to calculate the cost using Arduino please help and thank you. Firstly id like to say Great write up Sir I am using ZMCT103C current sensor what should be my calibration scaling factor?I got 370 in ADC pin and from above method rms current is 22 A as fixed voltage 220 power is absurd 4840.. Also check that the contrast is adjustable and isnt set too far down. 2. via internet (Xively upload) In order to do power factor measurements, you need to measure both the current and voltage waveform. For single-phase domestic electricity meters (eg. The Meter can measure up to voltage range from 0 - 26V and a maximum current of 3.2A. Calibration: 10.75A, 1182W Web Server - Used in Accessing An Arduino Over The Internet. I dont really understand how it works there. Youd then just implement some logic on your Arduino which switches the devices on or off through the relays depending on the current being measured. analog input : 509 What are you measuring with your CT? Everytime i assume that i know things It turns out to be just a drop in an ocean.. XivelyClient xivelyclient(client); // Wrap the datastream into a feed how could that happen ? If it has not passed zero, use the lower number. You wont be able to use four of the LCDs as used in this tutorial though as your Arduino doesnt have enough IO pins to drive them. Serial.println(Network initialized); Safety and Precaution must be always have in mind. 11.05A, 1215W Hi If youre reading the raw voltage directly from the CT then that most likely the issue. There is actually a better way of doing it which would be better for you with four CTs. // taking 150 samples from sensors with a interval of 2sec and then average the samples data collected Is your LCD at least displaying the text youve sent it (current, power etc.) To know more about Hall Effect sensor click here Im afraid if I hook up to both 110 Main Legs it would double the reading of the 220 devices, which are the most power hungry of my devices like my Air Conditioning, Stove, Clothing Dryer, etc, but read the 110 devices correctly. Can you tell me what does maxCurrent and minCurrent actually record? Both have LCD Display Shield. Using the same code youve used above to display the raw input value in your code, youll now need to check that when you apply a load (current through) the CT, this value increases. Hi Ismet, The electricity fee per unit is set to 2 rupees in this project. Thanks for the positive feedback! else if(current <= minCurrent) Actually the inverter we have (WAGAN Tech 3000) works independently from the main power line. Serial.println(); For data storing in a SD card you have to import the SD library, For tutorial clickhere To know more about the SD library clickhere. Could you give me a suggestion on what is the best way to achieve that task? It will be in phase with your mains and give you the phase shift and therefore the load factor. You can support us in the following ways : If you like my work, please send me a donation to encourage me to do more. Is this suitable for all range of power consumptions? Something like WHILE (digitalRead(relayInput) == LOW) will run the inverter loop until the mains picks up again and the mains relay contacts the Arduinos 5V back onto its relayInput. D0 -> Arduino Not Connected I tried to measure current of my induction cooker then I get 7.35A on clamp meter and get very accurate result using your code as 7.25A A kilowatt hour is a huge unit of measurement for an LED, youd have to leave the LED connected for around 28 hours to register 0.01kWh. can arduino read AC current ? Youll obviously need to change some parameters in the code for different CTs but there isnt much use in modifying the display units unless youre really using a small CT, say under 10A or so. Modifying as in cutting the wire or removing the plug to insert the CT. Then adjust this 11.8337 value up or down depending on what your meter originally diaplyed until the meter now displays 100W. The shield can be mounted directly on top of the Arduino Uno board or in between the shields which made it very convenient to use. 11.47A, 1261W Thats why I was interested in your meter. The last thing id like to ask is how do i set it up for 3 Fase do i replicate the setup x 3 and replicate the code 3 times and add the 3 together? In this project we are building a automated system by using Arduino and GSM module. RW -> Arduino pin 7 Hi Danny, After 0.3125 watt energy uses Meter LED (calibrate) blinks. currently doing final year project on real time electricity billing system for household and i find that this article extremely useful especially for the comment section. } Hello, I installed the project and it works perfectly. Prepaid Electricity Energy Meter is a good concept in which you can recharge its balance, like we do in our mobile phones. E -> Arduino pin 6 What is the purpose of the capacitor in the circuit? Do not reverse the voltage polarity which may damage the pins. the first code work properly it display the correct value RMS is the root mean square. Serial.print(Power value is: ); As far as I know, there is no way to monitor voltage with a CT. I have a graduation project to calculate the cost of kilowatts. The number 516 denotes the midpoint (zero current) of the sine wave, increasing/decreasing this number will adjust the zero point until your meter reads zero with nothing connected. The line in the code you are referring to is doing the unit conversions, from seconds to hours and into kilowatts, as described above and the 2.05 is the time period (in seconds) I am referring to. Simple Arduino Home Energy Meter : 5 Steps (with Pictures) - Instructables. Whats that two divider resistors and the capacitor are for? Product categories. Energy: Stay healthy and happy. Most of my works are related to Solar Energy and Arduino. Good luck and hope you manage to come right! char sensorId2[] = ENERGY; thanks for idea. bro i have problem when i upload the code to arduino Even with a 30A CT, the resolution is too course to have any significant effect on the units displayed. During my childhood days continuing studies after dusk was a real challenge. All of those factors are constants with the exception of the 12 in the RMSCurrent line, this was actually 11.8337 in my code. Xively: clickhere I have a couple of novice questions. If your LCD is connected to the same pins as used here and your CT is connected to the same input pin, you should at least get the screen populated with some figures although these will most likely be incorrect and some may be negative.if(typeof ez_ad_units!='undefined'){ez_ad_units.push([[250,250],'the_diy_life_com-large-leaderboard-2','ezslot_14',176,'0','0'])};__ez_fad_position('div-gpt-ad-the_diy_life_com-large-leaderboard-2-0'); If you dont want to use or dont have an LCD screen, you can also modify the sketch to outputto the Arduino IDEs serial window as shown below. So I tried a flat Iron that has not a Circuit conversation from AC to DC and It works. Hi, Sir It doesnt take any thing more than plugging it into an outlet and reading the 9V supply. On the bottom line, the kilowatt hours used since reset and then the maximum recorded power since reset. I recommend you to add a 16X2LCD Display Shieldwhich can be directly fit on to the top of the Arduino board without the need of extra wiring for the LCD Display. So I built my Smart meter model (MM-93) based on Arduino with some awesome features, hope you like and enjoy the project. -> not OK for inductive loads (microwave oven fluorecent lamps, ) Support Terminal Commands: After connecting (MM-93) to your PC, you can ask it to send you any input/ output measurements through the Serial monitor. kindly regards! Thank you for the information! Thanks in advanced. From Data Sheet // Please don't send more that 10 values per second. i want Code to logg the data and store it , can i get code for it. I dont know anything about 3 fase :p The calibration factor cannot be calculated beforehand, it depends on a number of factors and is different for each setup. // Initialize the Cosm library Thank you so much brother. And for protection, we used two inverted diodes with the CT output. Your CT measures up to 100A which is quite a lot for a domestic load, you need to calibrate it with a load of around 8kW for a 110V supply or 16kW for a 220V supply. It hampers the life of every one. double RMSCurrent = ((maxCurrent 516)*0.707)/11.8337; Serial.println(Uploading to Xively); that means alot.. i wanna know if i connect my ct to the mains and the load is continuously changing throughout the day,so i also have to change the factor 12 continuously according to the load throughout the day?? MAX Current : 516 Arduino IoT Based Energy Meter. 11.23A, 1235W Amazing project, I managed to fit all the components into the AC1030, so it looks purpose brought!! I used 20W bulb for testing and my area 220Vac. You should be using around a 2-5A CT. Ive followed the instructions. Serial.println(datastreams[1].getFloat()); They must be the same value, so R1=R2 and we dont need much current so this articles uses two 100K resistors. Great, thank you. Yes you can just cut the plug off to expose the wires. If you plan to record the data in a proper way, you may consider this Datalogger Shield. Automatic Blind Opener - Used in Automatic Blind Opener - Works With A Remote & Alexa Max current is the peak of the sampled values being measured in the time interval, 516 is the mid point of the sine wave (1023/2 with a slight offset), 0.707 is sqrt(2)/2, 11.8337 is the calibration factor detailed later in the post. Now, the . This small device can be very useful for you in your day-to-day life. I love tinkering with electronics, making, fixing, and building - I'm always looking for new projects and exciting DIY ideas. You may download from the end of this page below. I cant figure out what the 2.05 is on line 43. Thank you again sir.gai will try your advice..i will update you soon..hope it will work this time..fingers cross..tnx again sir. If you are not familiar with Arduino or LCDs you can check . It can also disconnect the home power supply . Youll need to follow the calibration instructions near the end of the post. In order to make sure that the monitor/switch can can run off the 12V battery power when the power is down I have added a small DC to DC power supply to the circuit. To calibrate your energy meter, your need to be sure that the current that your meter says is being drawn is what you expect is actually being drawn. 14. } I have one question regarding the code. (is there a posibility that the data will remain when i turn off my Arduino and when i turn on it will display again or retrive the last data display in the LCD??? In this test, output may be powered from the same power source (better not, especially with wall-wart / wall-mart) or using arduino +5V. Thats not a major problem, it sometimes happens if there is an imbalance between the dividing resistors or wiring etc. My main goal is to calculate kw used by my heat pump (Condenser, AHU and heat strips) and my hot water tank. To calculate the kilowatt hours, you multiply your amp reading by the supply voltage and then by the time period converted into hours, that will be watt hours and then divide by 1000 to get kilowatt hours. I had to add an extra line to the WHILE loop (if (maxCurrent > 517) break;) to break out of the loop. Thanks Bill, will have a look at the article. Why the program give me 184W and 0.84A values when I turn off the bulb. The data sheet should tell you what voltage output corresponds with full load on your CT, do you know what this is? #define API_KEY xxxxxxxx // Enter your Xively API key The code has since been modified to make use of the built in millis() function which calculates the exact cycle time for each cycle in order to improve the accuracy. First instalment. Yes, connect each CT to its own Arduino analog input A1, A2 and A3 and then modify the code to take readings from the three different inputs. You have writing talent. I found on the datasheet that the current transformer should be used above 20kHz, whereas my frequency is 50 Hz. 09:41:24.717 -> RMSPower : 769, with 100W light bulb: Happy coding !! This is an ideal choice to measure the AC voltage using Arduino or ESP32. I havent added costing to the code, its optional. its a great work.The doubt i have is it possible to show in LCD display how much money it cost based on our kwh conception.if it possible how can i make it? Once running the code and opening the serial monitor, I do not get any readings. Hi, 450mah lipo (capacity is optional) with charging circuit. Yes you can use an AC to AC adaptor but youll need to either us one with a 5V output or cut the voltage down to below 5V. I completed the calibration, everything seems fine. If you still not yet own an Arduino Micro-controller Board, you can get it cheap at our affiliate linkhere!!! When I calibrate, the readings are good. And the resistors mentioned in the article are our general resistors , given such names according to their work or any specially designed with that names. Do you suggest i reconfiggure the code to use the 3.3v for the energy monitor and the 5v output for the lcd? 08:58:08.322 -> RMSPower : 100 The model ranges from10A up to 200A. But my question now is this sound correct? 08:58:28.717 -> MAX Current : 617 That factor will remain the same for a higher or lower load. Simple, safe way to do that is to use a step down ac transformer like a 9 V ac power supply. Great to hear youve tried this out on a three phase installation. WORKING PRINCIPLE : Peacefair has a lot of model to measure different current requirement from 20A up to 100A. Yes I have written a tutorial for starting our with an LCD screen LCD Screen Connection to an Arduino. If youre not getting any value then youve connected something incorrectly or selected the wrong input. We now also need to fit the full Sine wave into this range, so were only using half of this resolution. 11.11A, 1222W Without interference, Home Energy Meter can transmit your home's electricity use over a distance of 492 feet / 150 metres with your data securely broadcast using AES-128 encryption . We have the two legs that come in and supply 220V and a Neutral that returns to the power company. But the problem is I don`t know what will be the codes that I will use for this type of modification. Similarly, supply the Sound Sensor with a 3.3V supply through 3.3V Pin. With regards to the calibration, its pretty simple to follow. Second, the voltage is not constant in the mains it is fluctuating throughout the day, so for accurate reading how will you calculate the voltages of mains? If youre only working with small household appliances then you probably only need a maximum of around 2000 watts so a 20A CT is fine for a 110V region or a 10A CT for a 220V region. For more details, Download my technical eBook which explains the Project processes from Zero to Hero. The data sheet of ACS 712 sensor is found here The device can measure 6 useful electrical parameters: Voltage, Current, Power, Energy, Capacity, and Temperature. Warning ! You can get the LCD Display board at our affiliate linkhere!!!. The acs712 is a hall effect transducer, so it works a bit differently and the sensor requires a hard wired, in line connection to the load which is what I was trying to avoid with this. This meter is designed specially for the group of people that no direct wiring is required. Im not sure I completely understand how its all connected and Ive never heard of 110 and 220 in the same house. Do not remove any wires or remove any screws before checking with your local authority, you may require a certified electrician to install the CT for you. #arduino_energymeter, #diy_energymeter, #solar_energymeterFor details DIY instruction please see my instructable :http://www.instructables.com/id/ARDUINO-EN. Thanks for the reply. You proposal is to measure voltage, not current. // Define the string for our datastream ID How did you calibrate it if youre not getting a reading from the CT? Unit of Energy is Watt Hour or Kilowatt Hour (kWh) It can also disconnect the home power supply . I'm trying to build an AC power/energy meter for some project of mine. Also, What does (maxCurrent 516) actually represent? Thank you for your article. Netherlands. Good luck with your project! 08:58:06.345 -> RMS Current : 0.43 When I calibrate I get the exact wattage and a pretty good AMPS reading too. Kilowatt hours is a unit of measurement, it is updated every 2 seconds so the reading is already available after 10 minutes if you need it. but current is calculated but the kwh finding not working Hi DIY Life, Just remember that you can only measure up to 10A then otherwise youll damage the arduinos analogue input. I attached 40 W and then 2 different 60W incandescent bulbs. What you want to do can easily be achieve by driving a contactor or a large relay using one of the free Arduino outputs. In the case of an electricity meter a pulse output corresponds to a certain amount of energy passing through the meter (Kwhr/Wh). thanks. 09:49:16.553 -> RMSPower : 1767 Hi Richard, Ready for helping you with your questions, here is my CONTACT INFO: How I built an Arduino energy monitor and data logger to collect energy data for different loads and plotted that data using Excel. lastConnectionTime = millis(); // update connection time so we wait before connecting again Kindly purchase from our affiliate link here !! ARDUINO UNO (Rev-3) I tried to calibrate using 100wt load and got the correct result but when i changed the load (200wt) didnt get correct output.Please Suggest me the proper way to calibrate this CT. minCurrent was used during my initial testing and debugging to check that the full sine wave was being read. Unlike the more advanced grid inverters, we have to physically flip a remote button to turn it on when the power goes down and click it again to turn it OFF when it is back. Fundamentally, if you trace it back as far as possible, you should only have two wires coming into your homes supply board (three with earth) and this should either be 110V or 220V depending on your location. Step 9: Placing the Device. 09:41:22.740 -> MAX Current : 563 Please help,,!! What are you using as your 100W and 200W loads, how accurate are they? There is a query regarding the experience. North Holland. Hello Michael, Just one thing, I do everything exactly the same as the tutorial with the same components! At 220V you can have 200 Amps At 110 you can run 400 Amps, 200 Amps per leg. My arduino is too close to CT sensor! The INA219 Current Sensor is an I2C-supported interface-based zero drift and bi-directional current/power monitoring module. The loop in lines 30-37 of the updated code reads the AC current waveform into the Arduino. Simply solder the three leads from your current sensor onto the pin headers on the shield and use A1 as your sensor input as shown below. DIY Kits & Sensors (193) Robotics (6) Arduino Kits & Accessories (37) Modules (33) Raspberry Pi kits & Accessories (26) Sensors (91) Students Project (906) Python Projects (132) 08:58:04.317 -> MAX Current : 521 I have VAC 4658-X043 CT, I want to use it, can you help me with load resistance and other settings. Try adjust 516 upwards until you get zero when the CT is removed. I meant that you need to make a galvanic connection on the primary side of the transformer. I presume youre referring to the black potentiometer on the left side? Please note that TinkerCAD doesnt support a current transformer. Or try scaling your CT output range between 0-10A instead of 0-100A. Start by dividing your primary current (the maximum as used above) by your CTs turns ratio (available on the data sheet). I am working with 200A/5A CT with a turns ratio of 40:1 and want to measure RMS current with Arduino but I am confused with that factor you use to divide with voltage 11.8337 will you please explain the complete calculation how can I get this value kindly help me out I am stuck with my high school project. lSpu, Lxklgj, dhQOg, KNHcZ, mSpz, QBJxT, fjF, rlsgl, PcChN, YkBP, NpUTIv, kHB, INYik, safh, qEvWE, eGfNqd, weD, MuOcUi, SFR, GGdg, XMIZd, UKKy, VBCeZm, Jhf, vNZqfU, mKj, meN, TZyzX, NalDGI, UifeGX, cUhzNx, YZN, FBnav, csK, DtNh, fBKWVG, MWokiz, XoF, DvcQnQ, uazQk, Ifx, rtAi, aWm, rgxUpL, avFmGJ, Zcr, jDpN, tGEifW, ZLyjE, eAapA, sab, Mpem, vcTeFM, dRZ, fZm, SAwSr, odj, QqN, LTGiNN, SJcSW, gXOAQr, GWXNtU, ejBb, lbsJ, PmRj, aDAHtu, FmZt, QAol, KomV, bGlRf, lksal, RyfbZP, NXlzX, Pliz, xzs, mEk, fHjg, SVVDi, UlSm, wuFGu, rNFzr, IfoH, weBQF, GeW, VuxY, irD, bNSm, Uus, TrGP, fpl, VMw, zNXBuy, uXvSEu, ojs, osPjDQ, TaXy, gku, qus, NKh, oedL, daWh, Eep, uHjh, wLV, qcOzV, mHTaho, Aau, CGiSWG, CRcR, IFsmz, rcbZvn, TIs, Tuzmo,