I am looking to measure Gas pressure in order to turn off Gas Heater when there is low gas. As in Pakistan alot of deaths occur when flame turns off because of low pressure of gas and then gas comes back. People suffocate into CO2. So to measure that gas what kind of sensor should i use with arduino? Thanks
It sounds like death would be caused by gas poisoning, not CO2 (carbon dioxide) or CO (carbon monoxide) poisoning. If the flame goes out and then gas pressure is restored, un-burnt gas would be vented into the room. Unless gas is burning no CO or CO2 would be released. Further, our bodies detect excess CO2 and it causes us to feel short of breath and seek fresh air. CO on the other hand binds to the hemoglobin in our blood and prevents our blood from carrying oxygen, so we suffocate without knowing anything is wrong.
Natural gas is both poisonous and can cause explosions if it is lit with a spark. In most countries there is a scent added to the gas in the lines so we can smell it and know something is wrong. The scent is not enough to wake you up however.
The usual way to handle gas heater safety is with a pilot light and a thermocouple powered valve. The pilot light uses a tiny amount of gas to keep a small flame lit. That flame heats a thermocouple, which generates enough current to keep an electrically controlled gas valve open. If the pilot light goes out, the heat source to the thermocouple is removed, and the valve closes.
If the gas pressure drops enough, the pilot light goes out, the valve closes, and the heater turns off. If the gas pressure is restored, the user has to hold a button down to manually open the valve while re-lighting the pilot light.
In the U.S. gas heaters are required to have safety systems like I describe above. It sounds like the heaters in your country don't have safety systems like this.
Measuring gas pressure would be harder, as others have said in their answers. You'd need a sensor that is approved for use in gas appliances, as well as the fittings to attach it. The same goes for the valve that you would use to turn off the flow of gas when the pressure drops too low.
You'll need a pressure sensor approved for use with the type of gas you are dealing with, and that measures the pressure ranges in your gas lines. We can't know those things from the outside. You could probably find them out from the gas company that provides gas service.
In most countries working on gas lines and gas appliances requires special training and permits, since doing it wrong can cause explosions, fires, and gas poisoning.
This is a fantastic idea, but you should be a bit more informed before you start the project.
I do not think the people suffocate into CO2 because CO2 is not inflammable under normal conditions so it is not used to feed the heaters. It's produced by the heater while it burns. Most probably the heater uses methane (CH4), ethane (C2H6) or propane (C3H8).
To measure the pressure, you have to insert the sensor within the gas pipe. If this is done incorrect, there is much more danger. So you have to find a fool proved method to add the sensor.
The selection of the sensor depends also on the pressure that can be considered as normal. Another value you have to find out is: how much decreases the pressure if the burner (or more burners) are switched on. i.e at which pressure do you assume the burner's flame to go out. This value must be well known.
When you know the max and min pressure values, you can look for a sensor that can safely measure this values. It should also be included in an enclosing that can be attached to the gas pipeline.
Attention: If the pressure drops just for a small moment, the flame might go off and the sensors might not be aware of that event.
Do you know, there are alternatives to measure the pressure?
A Gas Sensor in the room checks, if there is methane, ethane or propane in the air in the room. ( this is the most secure method ) There are cheap gas sensors from china, (e.g. MQ-02), but I do not know much about them. You can also combine them with a CO2 and/or CO sensors to sense whether the chimney is clogged.
A high temperature sensor near the flame recognizes if the flame is out. But this is difficult to accomplish, because you have to build the sensor into the heater.
I want to point you to the comment of @Gerben. Checking the light of the pilot flame or the flame might also be interesting.
Having thought about this a bit, I still find that measuring the air with gas sensors and starting a acoustic signal is the best way of doing it. If you want to close a valve in case you detect gas, the Arduino can start a siren and control the valve.
Attention: Again, working with gas installations is nothing a beginner should do. You want to save life ...