Gas Meter Pulse Reading

Hi,

I have been looking at building my own openenergymonitor system. I am happy with my plan to log optical pulses from the electricity meter and current usage via CT sensor.

Although theres not much focus on gas monitoring, which was my biggest cost last quarter. I have a popular gas meter, the Actaris U6 which people have used a hall effect sensor stuck to the front to read the pulse. I have since stumbled across and actual pulse block which has an RJ11 connection:

http://www.utilitymeterswarehouse.com/gas-meters/gas-accessories/pulse-b...

Does anyone have any experience with getting the pulses from the pulse block via RJ11 to the emonTX?

 

In my head i would like to install the pulse block and run a RJ11 cable up the wall and into the loft (it's a bungalow) to the emonTX which can be mains powered so there no worry of batteries.

 

I would rather this than sticking a hall effect sensor to the front so the guy that reads the meters doesn't have to take it off to read the meter as well as think that something dodgy is going on. Also that the sensor doesn't come off or move with poor adhesive etc.

 

Thanks,

Mike

electrocoolman's picture

Re: Gas Meter Pulse Reading

Hi Mike,

I also have purchased one of these pulse blocks, but from a different source (BES, Birmingham ), with exactly the same idea in mind.  I was going to go straight in to either an Arduino or RaspPi, but then came across this site and have just ordered an emontx shield. 
It is purely a reed switch inside the block, so providing there is a spare input on the Arduino then I can see no problems. I'll let you know how I get on once I'm up and running.
 
The RJ11 is an American phone connector, readily available. My pulse unit came with a cable. Presumably you have the connections for the unit?
 
Adrian
Robert Wall's picture

Re: Gas Meter Pulse Reading

You might be interested in the comment I've posted at http://openenergymonitor.org/emon/node/1732#comment-10911

E-Mike's picture

Re: Gas Meter Pulse Reading

Hi Guys,

 

Sorry for the late reply, i didn't think anyone had posted anything as i didn't receive and email. 

 

So did you get the pulse block to work with an emonTx adrian? do you know what the pinouts are for the block?

Robert how did you attach the reed switch to the meter? i think blue tac would go crappy due to cold/hot weather and fall off, where glue would destroy the pulse block section and possibly annoy the energy firm.

 

Many Thanks,

Mike

Jérôme's picture

Re: Gas Meter Pulse Reading

I managed to get Reed switch triggered by my meter just as Robert suggested (more details later). Haven't addressed attaching issue yet.

Quick answer for the pinout. Here is how to plug a Hall effect sensor:

 

Tip Vcc
Ring Output
Sleeve GND

For the Reed switch, you would either connect it between Output and Vcc, or activate the pull-up resistor

  pinMode(3, INPUT);   //set the interrupt0  pin3 to input
  digitalWrite(3, HIGH);   // and enable it's internal pull-up resistor

 

and connect it between Output and GND.

I tested the latter but the former should work just fine, I guess.

 

Robert Wall's picture

Re: Gas Meter Pulse Reading

I have not got around to attaching it. All I did was prove the point that a reed switch would work. The meter has two hollow posts that look as if a suitably shaped block (wood, plastic, resin casting?) would fit/locate on, one looks as if it's intended to accept a small self-tapping screw .

E-Mike's picture

Re: Gas Meter Pulse Reading

I think the gas monitoring sector is a bit neglected (even with commercial monitors) Well done though to you all for all the work in the testing to get a proper solution in place.

Does anyone know if the pulse block has the bouncing issue, or has it been possibly addressed in the design of the block?

As well sorry for my lack of electronics knowledge but would there be an issue with a reed switch being over 10 meters of cable? (well technically 20 with the return journey) i'm sure it would be less but just to be on the safe side.

I'm probably going to buy the block anyway even though it's expensive it is a neat job. Plus I'm sure it's better probably being certified intrinsically safe? who knows.

dBC's picture

Re: Gas Meter Pulse Reading

As well sorry for my lack of electronics knowledge but would there be an issue with a reed switch being over 10 meters of cable?

The run from my Elster water meter back to my energy monitor is a good 35m of cat5 cable.  I terminate it into a h/w debouncing device that also gives protection against spikes etc, so I never get to see any noise or bounces.  But for kicks I just scoped it up to see how it looks.  I must say the guys at Elster have done a great job.  I was not able to detect a single glitch or bounce... even as the kitchen tap was barely dripping past the switch close and switch open points.

I tried various sampling rates, and different voltage triggers, but only every saw nice clean transistions.  With long runs of cable and a weak pull-up, the capacitance of the cable becomes significant.  In the attached trace I've accentuated that by running the switch to nothing other than a very weak pull-up (56K) and the scope probes.  AVR pull-ups are spec'd for somewhere between 20K-50K so I deliberately went weaker than you should ever see if you're using the internal pull-ups.

You can see the resultant rise time is close to about 400usecs, and if you do the maths, that's about what theory predicts. The AVR inputs have schmitt-triggers on them, so you may be ok.  You could reduce the effect by adding your own stronger external pull-up. 

 

E-Mike's picture

Re: Gas Meter Pulse Reading

Excellent, i should easily be able to pull off my plan then. I've ordered a full system today, once it's all built and ive learnt everything i need to know i guess ill be buying another emontx and the actaris pulse block to do the gas side. I'm sure by then you guys will be fully monitoring.

Robert Wall's picture

Re: Gas Meter Pulse Reading

If you look very carefully at this picture http://openenergymonitor.org/emon/sites/default/files/uk-gas.jpg it is just possible to make out the locating posts I mentioned earlier. The reed switch I tested was one of these and it was positioned like this and the mounting posts can be seen better here too.

E-Mike's picture

Re: Gas Meter Pulse Reading

The docs on the emonTx say that when using the TSL257 optical sensor not to solder resister R8 on to the board, is this the pull up resister?

So if i was to have a play with the gas meter without buying another emonTx for now i should keep the resister off the board and connect the sensor to output and VCC pin on the 3.5mm jack and i should be able to play with both pulses just by editing the relevent code for each? then to go back to the electricity meter optical pulse just switch the 3.5mm plug and revert the firmware?

Then i can get my head around the bouncing issue and get it ready to get another emonTx and complete the system.

E-Mike's picture

Re: Gas Meter Pulse Reading

I'm sure it will all come together once i get the equipment and actually start experimenting with it. I learn a lot more a lot faster this way.

Jérôme's picture

Re: Gas Meter Pulse Reading

R8 is a pull-down : http://openenergymonitor.org/emon/emontx/make/assemble/buildguide22

The optional pull-up is inside the atmel, software activated (see my code above).

Yes, you should be able to use the same hardware for your tests.

Now that the pull-up/pull-down confusion is out of the way, have another shot at my former message:

For the Reed switch, you would either connect it between Output and Vcc, or activate the pull-up resistor

  pinMode(3, INPUT);   //set the interrupt0  pin3 to input
  digitalWrite(3, HIGH);   // and enable it's internal pull-up resistor

 and connect it between Output and GND.

I tested the latter but the former should work just fine, I guess.

 

Basically, the internal pull-up decides whether normal state for the input pin is 0 (GND) or 1 (Vcc) and you connect the Reed switch between Output and Vcc or GND depending on what you chose for the pull-up, so that closing the switch will change that state. (Obviously, you also need to modify RAISING or FALLING edge accordingly in the sketch.)

If you use a Hall effect sensor it is different. It needs both GND and Vcc connections and you need to activate the pull-up if and only if it is open drain (outputs 0 when a magnetic field is detected).

 

Comment viewing options

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