Hi! I want to count pulses coming from an energy measurement IC. It produces a pulse proportional to the active power. Energy measurement IC's such as ADE7757 or MCP3905 seems to be quite similar and I'm referring to those kind of IC's. Both have HFout, Fout0 and Fout1 pins. HFout produces a high frequency output proportional to the instantaneous power and Fout0 and F1out produces a frequency output proportional to average active power and can be used to drive mechanical counters. I use the timer1 of PIC16F887 and I want to measure the energy consumption in KWh. My problem is which pin should I use ?
I suppose you will use the output through optoisolator (not for stepper motor)
You can use Timer0 and input on RA4 for counting pulse as so low frequency
with prescaler = 1/16 so 100 pulses per KWH. and interrupt when reach value counting of 100
for 12KVA installation
maxi is 12x1600= 19200 pulse/hour
so 19200/3600=> 5,3Hz
and another timer to average the count with the time
within hour to get direct KwH.
Sorry sir I didn't get what your telling. What should I use to obtain KWh? In another forum one said that I should use Fout0 to obtain the energy in Kwh. I'm bit confused. Have you been involved in this kind of a project?
= HFout produces a high frequency output proportional to the instantaneous power
if you mix your answer with other forum response , it will be difficult to follow your mean.
If you want to use Stepper motor output, it's up to you..
just tell us your final choice.
if you use HF out pin CF on the specsheet drawing trough an optosolator
you can drive RB0 input , and use interupt to count every pulses....
or RA4 intput with timer0 used as a counter ..
if you use also the prescaler 1/16 timer0 will count 1/100 de KWH per count.
After you check timer0 value , for example , every minute to get KWH/60 value
and after 60 minutes you have direct kwh*100 value inside the timer0 .
Don't forget to calibrate the U voltage... see specsheet..
I'm using MCP3905. I'm also confused why calibrating is required. I guess it is to determine the meter constant or set it to the desired meter constant (100imp/Kwh). I'm planing to count the no of pulses for a known load (100W) for a certain time period (about 10s) to determine the meter constant and multiply it with the no of pulses.