Made a meter, but some questions on readings.

Hi,

Thanks to the replies from this forum, I finally made my own Open Energy Meter with seven segment displays as display unit. But, my readings were not matching the readings from standard devices (I requested an engineering college to provide their labs and instruments.) So I calibrated the values and got the voltages and current right but some problems  in power and power factor.

I have attached a log file from the serial monitor. I used resistive load (a rheostat)

Standard values. from the lab equipment are     Voltage 40V Current 3.95A Power 154.8W

Robert Wall's picture

Re: Made a meter, but some questions on readings.

1. You need to tick "List" when you have attached a file, else nobody can see it "List"-ed.

2. If your load is a pure resistance, then a power factor of 0.5 indicates that you have not calibrated PHASECAL. You should do that according to the instructions.

dsantosh's picture

Re: Made a meter, but some questions on readings.

1. Thanks.

2. I tried both inductive and resistive loads, but forgot logging the data from inductive load. Anyway, I think I calibrated all voltage, current and phase_shift values. Let me calibrate the power factor to 1.0 for pure restive load(rheostat ?) and get the results here.

 I have also uploaded the sketch.

dsantosh's picture

Re: Made a meter, but some questions on readings.

Hi, 

After calibrating, I am now getting fairly accurate values, but the values are fluctuating all the time. It is quite difficult since I am using 7 segments for output. Is there a way to get the output somewhat stable? 

(P.S Sorry for late reply, but to get hands on the university labs is not that easy.)

Robert Wall's picture

Re: Made a meter, but some questions on readings.

Fluctuating? How much?  I suspect you need to put a software low pass filter in between reading the power and the display. The Wikipedia article is a good starting point - and you can look at the high pass equivalent in EmonLib - calcVI to see exactly how that is implemented.

dsantosh's picture

Re: Made a meter, but some questions on readings.

I know a little bit of filters. But the software LPF is something new to me, something like this? Will start looking for it. Care to elaborate or some links? 

San.

dsantosh's picture

Re: Made a meter, but some questions on readings.

About fluctuations, I am using a 40W soldering iron for testing, and the value I am getting ranges from 30 to 47 watts and changing rapidly. The reading is actually difficult to read. Any suggestions?

Robert Wall's picture

Re: Made a meter, but some questions on readings.

Is your iron temperature-controlled? Or you might be trying to read power + digital noise from the processor. If your full-scale current is 100 A, it's more likely to be noise. You have a high pass filter in emonLib. All you need to do is copy the way that is done and change the equation into the low-pass equivalent one from the Wikipedia article. You can change the time constant to give you fast readings with some flicker or slow readings with little or no flicker, it's your choice.

High Pass: y[i] := α * (y[i-1] + x[i] - x[i-1])

which in emonLib is  filteredV = 0.996*(lastFilteredV+sampleV-lastSampleV)

Low Pass: y[i] := y[i-1] + α * (x[i] - y[i-1])

so you should end up with something like filteredX = lastFilteredX + 0.001 * (sampleX-lastFilteredX)

dsantosh's picture

Re: Made a meter, but some questions on readings.

No, it is not a temperature controlled. 

As you said I replaced these lines  in Emonlib.cpp:

filteredV = 0.996*(lastFilteredV+sampleV-lastSampleV);   to   filteredV = lastFilteredV+0.001*(sampleV-lastFilteredV);
filteredI = 0.996*(lastFilteredI+sampleI-lastSampleI);  to  filteredI = lastFilteredI+0.001*(sampleI-lastFilteredI);

filteredI = 0.996*(lastFilteredI+sampleI-lastSampleI);  to  filteredI = lastFilteredI+0.001*(sampleI-lastFilteredI);

But now I am getting these values which are nearly identical with(LPF_load.txt) or without load(LPF_no_load.txt), my load being the same 40W soldering iron.

The ouput without the modifications in filters is named HPF_load.txt

 

Robert Wall's picture

Re: Made a meter, but some questions on readings.

You did not understand what you needed to do. You do not replace the lines in emonLib, so put that back as it was.

You are stealing the parts of emonLib that are the software filter to use to filter your power. So you will copy all the bits of emonLib that deal with the filtered voltage, call them filteredPower (or any name that you wish) and put those into your loop( ) in similar places.

Look at emonLib.h  In there, you have the last sample and the last filtered variables declared, so copy those into the sketch where all the other static variables are declared and call them lastPower etc
Look at emonLib.cpp  and in there, find where those same variables are used and put them (with your new names of course) into your loop(  ) before you calculate the power so that you can remember the values from the previous time.
Then, after you've calculated the (flickering) power, add in the line that is the actual filter. The input to the filter - I called it sampleX - is the power you calculated (that flickers), and the filtered output - I called it filteredX - is the power value that you send to your display.

dsantosh's picture

Re: Made a meter, but some questions on readings.

Ok got it. I was all wrong till now. 

Thanks. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.