Energy measuring with abb c11 meter using gpio

213 views
Skip to first unread message

Niroz Jung Karki

unread,
Mar 4, 2015, 3:15:05 AM3/4/15
to
I need to count the pulse output from my energy meter and log it into my pi where openhab1.6.2 is installed. 
I got single phase ABB C11 meter, which gives pulse output from (20+ and 21-) of 100 imp/kwH with pulse length 200ms, and voltage 5-40 VDC, current 2-100mA. How would be the interface circuit with gpio of pi (model B+). 

I connected positive terminal of meter (20) directly to 3.3v of pi and negative terminal to gpio and resistor of 1o kΩ to ground. I am able to log the pulses from the meter to a log file. I want openhab to monitor that value.  But, Openhab gpio binding supports only Switch and Contact item as per the wiki. Is it possible to count the pulses in gpio and send to openhab for visualization. Any insight for this would so grateful

Thanks, 
Karki

Dancho Penev

unread,
Mar 5, 2015, 12:14:41 PM3/5/15
to ope...@googlegroups.com
If I understand you correctly you need to count the pulses sent by the meter for time interval of 200ms. Definitely GPIO binding isn't designed for what you are trying to accomplish, even I'm not sure that PI is the right choice for hardware either but I'm not very proficient with it so I may be wrong. For me this looks like a task for micro controller based board as Arduino where you don't have the overhead of non-realtime OS. Or some functionality as Beaglebone's PRU if PI have such...
No matter what you will choose, openHAB could be used for the integration part, it isn't appropriate for data collector. Counting pulses from Java application running in JavaVM on preemptive OS isn't the best solution...

Niroz Jung Karki

unread,
Mar 5, 2015, 12:50:12 PM3/5/15
to ope...@googlegroups.com
Hi Dancho,
Thank you very much for the swift response. I had a thought of writing a rule to count the pulse whenever contact item event changes. Rule would be somthing like this but I still have to try. How do yo think if this accomplishes or signifies the event change by 200ms of pulse in contact item.

rule "Energy Measurement"
when Item Gpio23 changed
then var Pulsecount+=1
var EnergyValuse=Pulsecount*0.01
postUpdate(EnergyItem, EnergyValue)

Best Regards,
Karki
Reply all
Reply to author
Forward
0 new messages