navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 23, 2012, 11:49:47 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: HalfBee counters in action: 1-2-3-...many  (Read 1608 times)
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« on: February 02, 2011, 05:56:39 PM »

Many thanks to EricW, who sent me two PICs. No, not of the  flyingpig type, but 1-2-3 counters. One of them counts the slow revs of the gas meter, the other has to deal with shorter and more frequent flashes on a 'leccy meter.

Our gas meter has a magnet incorporated into the last roller. Thank you to whoever came up with the "just hold a little compass next to the meter to find the magnet" idea! KenB then mentioned Hall effect sensors to pick up the signal. I found one that incorporates a Schmitt-trigger (Allegro A3214EUA-T, bought from Rapid, but they don't seem to stock it atm), and thus produces nice clean pulses. The output goes low when the magnet is near. And it works with a 5V power supply. Eric's PIC then needs a pull-up resistor (10kOhm), and I put a capacitor (100nF) between the input pins of the PIC (2+3) and ground to catch any noise. Everything goes onto a tiny piece of strip board, with screw terminals for the sensor and one-wire cable.

A similar arrangement works for the LED on the 'leccy meter. Here, the sensor is an LDR, blue-tacked onto the meter, which also seals the sensor against ambient light. The flashes are quite short, so I had to change the RC-circuit to 100kOhm and 10nF.

The first thing was to test whether the counted pulses agree with the meter readings. See the attached plots for a calibration curve. The gas meter produces 100pulses per cube meter (last dial is for 1 litre, full rev is 10L), whereas the electricity meter issues 800flashes per kWh.

Now I'll need to monitor the set-up for some time to make sure it's long term stable. I'll report back...

In the meantime, the counters are incorporated into my 1-wire network, read via owserver which runs on a NLSU2 (a.k.a. slug), saved into an SQLite database, and in parallel are read by munin to produce rolling daily and weekly graphs.

Klaus


* gas_counter.gif (6.92 KB, 379x379 - viewed 545 times.)

* electr_counter.gif (7.8 KB, 379x379 - viewed 543 times.)

* localhost-electricity-day.png (19.48 KB, 495x271 - viewed 548 times.)

* DSCF0212_cropped_low-res.JPG (118.19 KB, 480x407 - viewed 558 times.)
« Last Edit: February 02, 2011, 05:58:39 PM by KLD » Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #1 on: February 06, 2011, 02:08:17 PM »

Nice one Klaus. Seems accurate and stable. My own PIC counters and ADCS have been running happily for months.
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #2 on: February 10, 2011, 01:58:13 PM »

Here is a recent change to the electronic circuit with the LDR:

Eric's PIC provides a dual channel counter. Depending on the selected mode, the counters are re-set to zero after each read. I use the two channels to read at two different periods, counters.A for once-a-day, and counters.B for every 5min. The two input pins are simply connected in parallel to the sensor circuit.

While for the Hall effect sensor this works easily, I had to change the layout slightly for the LDR. When in the initial circuit (as described above) the LDR and the pull-up resistor made a simple voltage divider, one counter worked fine (A, input pin 2), whereas the second channel counted a lot of noise. I solved this by including a transistor "switch" in between the sensor and the input pins.
Now, all is fine!

Klaus


* PIC+LDR_new.jpg (87.77 KB, 1008x550 - viewed 478 times.)

* PIC+LDR_old.jpg (64.53 KB, 768x565 - viewed 474 times.)
Logged
WillemK
Newbie
*
Offline Offline

Posts: 6


« Reply #3 on: February 16, 2011, 12:44:46 PM »

Klaus,

I did build about the same, i had a mechanical kWh meter that i wanted to read with a optical sensor. I enclosed 2 scematics, i used the lower, with the 741. it worked very well, but then the mechanical meter broke down (my luck) and have now an electronic with 1000 pulses per kWu. 

Has somebody use this counter on a pulse-meter yet? and does it work?

Willem.



* debouncer.pdf (28.22 KB - downloaded 87 times.)
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #4 on: February 16, 2011, 08:11:04 PM »

Willem,

my electricity meter is acutally of the type with a flashing LED. In my case it's 800 flashes per kWh. I have used the light-dependent resistor in the above schematics to detect the flash. Works very well so far.

Klaus
Logged
WillemK
Newbie
*
Offline Offline

Posts: 6


« Reply #5 on: February 17, 2011, 06:51:56 PM »

I understood, Klaus,

I forgot to tell you that this set-up also reads a flashing light, so when it is simpeler to build it might help you.

Willem.
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #6 on: March 22, 2011, 10:40:59 AM »

A few weeks on, and the counters behave very well. See the two plots for a comparison between the actual meter readings from both, gas and electricity meters, versus the readings calculated from the counter events. Looks good!

Klaus


* PIC_counter_stability.gif (17.92 KB, 795x379 - viewed 352 times.)
« Last Edit: March 22, 2011, 10:43:22 AM by KLD » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!