I posted this in the software area but didnt get a response so trying here plus another question:
==================================
Hi Guys,
I am going to try and use my existing Arduino based inverter monitor to also monitor my household consumption. I am planning on basing it heavily on the great work on here. I am currently looking at modifying the "Basic energy monitoring sketch" I have a few questions in relation to that specific script:
I can poll my inverter for the current mains voltage so I don't need the AC-AC adapter solution. Given that I get an accurate mains voltage should I just comment out filteredV and shiftedV and use sampleV all the way down.
I assume that the code in this thread: http://openenergymonitor.org/emon/node/198 is what I would use to calculate the total consumption for the day. I then just need to write a small bit of code to calculate a RMS for real power because the data is uploaded every 5 mins.
EDIT: Also I am using 3 phase power so what is the best way to combine this. (1) Do three analogue reads and add them together for a total sampleI (or does the IRATIO vary too much between CTs?); or (2) Do consecutive calls to the function for each phase and add the real powers at the end; or (3) Something else??
================================
Plus my latest question after having built it is I am finding that my calibration curve isn't linear. I need a ICAL of about 1 for loads around 500W, at 2000W it is 1.25 and at 200w it is 0.66. So any ideas about this. Could it be my power meter? Could it be my circuit (I used 5% resistors)? Has anyone seen this before? I thought I could just get around it by using a simple IF-THEN and using a different ICAL depending on the raw power measurement?
Thanks for any help!
Re: A few questions
Still would appreciate any additonal info but I think I have solved the calibration problem. I had noticed that I was getting 30-40W indicated when I had nothing connected but there were posts elsewhere on this site that said that was normal so I didn;t think anything of it. However it occurred to me that that is a significant proportion of any loads that are a few hundred watts. So I measured the values being returned with nothing connected (which was around 510) and then started subtracting that from the read values so that when nothing was connected I was getting only a couple of watts being shown.
This basically fixed it. My ICAL values are now around 2.6 and am seeing an accuracy of +/-3% of the plug in meter. So pretty happy I might have solved it. Why I am having this problem and no-one else I don't know.
Still would like some opinions on the best way to handle 3 phase power. I have seen the two phase example and note that it uses separate calls for each phase. I think it would be faster to read each pin and add them all together if this would work. Thoughts?
Re: A few questions
Bit disappointed I wasn't able to get any feedback on my questions but for those in the future here is my test sketch that I came up with to get it to work for me. Thanks to those who came up with the initial sketches and circuits but I don't know how others have it working so well without removing the "noise" from the data. Unless mine is more noisy than others. I do have the three current sensing electronics and the voltage sensing all on a tiny breadboard. In any case once I started to remove the false readings I found that acted as a calibration for the low end of the current range and then the ICAL variable did the adjustment for the high end. I have 3 phase power so you will see how I solved that, I only reasonably had the ability to measure voltage on one phase so there will be some inaccuracies there but you will also see the effect that had on the PHASECAL values. Lastly I commented out a bunch of variables as I was trying to get this to work on a UNO which is also doing some other stuff so memory is at a premium. Again this is only a test sketch that I was using as a proof of concept but hopefully someone will find it useful.
Re: A few questions
No expert here, but I found that if the burden resistors on the current transformers are not selected carefully, the resulting voltage sample is not linear over the entire measurement range. My test showed that after a break-over level, the voltage increase was no longer linearly proportional to the current increase when the resistor value was too high.
Re: A few questions
Thanks for the reply. Your link didn't work for me but I used the standard Efergy CTs and a resistor of 56 Ohms which was recommended somewhere on the site. So not sure if that was my problem?