I called my natural gas provider one day, and asked if it was possible to get some kind of output port on my gas-meter so I could monitor how much gas I use. They denied. Then I build this passive method to build this meter. You can even use this to monitor your energy meter.
So all I had to do was to find an optical sensor which would be able to spot that zero and I would be in business. A bit of searching landed me on the OPTEK OPB704 (Used to be Fairchild) which is almost perfect for the job.
Inside this device is an infrared LED and a photo-transistor which both point at a spot some 4 mm in front of the device.
The LED just needs some power, up to 50mA but a bit of experimentation showed that even 5mA is plenty for good response. The phototransistor starts conducting current when hit by infrared light reflected of whatever target is in front of the assembly.
Mounting the sensor on the gas meter was easier than I had feared. Obviously anything which could be construed as “permanently attached” to the meter would be reason for the gas-utility to balistic. Fortunately I found that one of those pesky back-panel blanks from PCs was just the right bit of hardware.
The top bit of the blank had a notch to which I could bolt the sensor and after a bit of bending the entire thing could be taped to the outside of the gas-meter with some regular packing tape.
I wired the sensor up with a leftover high-quality RS-232 cable I had lying around, only four wires and a shield were needed so I had no need for the white wire which is why that looks a bit weird on the picture.
Visit Here for more.