Anybody be kind enough to gv me an example of a simple writing for a fire alarm?

I need it for my first DIY fire detector because I'm currently broke and fire broke out next door yesterday so I want to do something for this neighborhood :frowning:

Before you write any code, you need some sensors to detect heat, smoke, etc. What do you have?

if(fire) {
  takeSteps();
}

What steps do you take? Big ones, and lots of them!

MorganS:

if(fire) {

takeSteps();
}



What steps do you take? Big ones, and lots of them!

You missed an important line of code.

if(fire) {
  shout("FIRE!");  // Warn others.
  takeSteps();
}

A fire alarm system is basically reading switches (sensors) and sounding alarm.

What is wrong with the commercial smoke detectors available in any hardware store? This is all that is required to warn of the fire. An Arduino is only useful if you want to notify someone via SMS or control fire fighting equipment.

Weedpharma

I'm probably gonna be using an LM35 temp sensor, is that code enough?

weedpharma:
A fire alarm system is basically reading switches (sensors) and sounding alarm.

What is wrong with the commercial smoke detectors available in any hardware store? This is all that is required to warn of the fire. An Arduino is only useful if you want to notify someone via SMS or control fire fighting equipment.

Weedpharma

Now that's some golden idea!

The trouble with simply measuring the temperature is a fire putting out really lethal amounts of smoke will only just warm the room up a little. The sun coming in the window has more heating effect. That's why smoke detectors are the most commonly used sensor in domestic situations. One sensor in the hallway can protect multiple rooms and there's never any false alarms unless there's real smoke in the air.

The common fire sprinklers you see in commercial establishments are temperature based. Heating up one of those sprinkler heads will cause it to pop off, which triggers all the other sprinklers to come on at the same time. It relies on having enough sprinkler heads all over the protected area that any fire will almost certainly be directly under one of those sprinklers. It also relies on having enough sprinklers that a fire can't hide from every sprinkler - there may be an obstruction which stops one or two sprinklers from hitting it directly but one will always have a direct shot.

For more concentrated fire sources, like the engine of an airliner, fire detectors can use temperature but mostly they use long linear detector lines wound around all the places that fire is likely to appear.

MorganS:
The common fire sprinklers you see in commercial establishments are temperature based. Heating up one of those sprinkler heads will cause it to pop off, which triggers all the other sprinklers to come on at the same time.

I don't think this is right. I have worked on fire alarm systems and with building managers so have some background in this.

The pipes are pressurised and sealed. The heat breaks the glass bulb in the sprinkler in range of the fire. The other sprinklers only come on if they too are heated.

Movies show all coming on for effect. It does not happen in real life. It could cause more damage than the fire!

Weedpharma

Hi,
How much are smoke detectors in your part of the world?

Tom..... :slight_smile:

All right I think I'm gonna consider putting together both LM35 temp sensor and MQ-2 gas sensor in one device, thanks for the inputs guys

A sprinkle costs like 60 bucks in average over here.

Tom asked the price of a smoke sensor, not a fire sprinkler.

Weedpharma

weedpharma:
I don't think this is right. I have worked on fire alarm systems and with building managers so have some background in this.

The pipes are pressurised and sealed. The heat breaks the glass bulb in the sprinkler in range of the fire. The other sprinklers only come on if they too are heated.

Movies show all coming on for effect. It does not happen in real life. It could cause more damage than the fire!

That's how I see it, too. But aren't the bulbs made of a hard wax that melts when heated? I can't see glass being sensitive enough to heat.

http://argusfire.co.nz/types-of-systems/fire-sprinkler-systems.aspx

Weedpharma


Fire sprinkler systems are actually heat activated.
The sprinkler heads must detect a high enough temperature -- usually between 135 and 165 degrees Fahrenheit (57 to 74 Celsius). Most sprinkler heads are equipped with a glass trigger filled with a glycerin-based liquid that expands at the appropriate temperature, breaking the glass and activating the sprinkler head.

A common (radioactive) smoke alarm from ebay doesn't cost more than $5.00, including shipping.
Photoelectric types might be twice that price.
Leo..

Hi,
How much are smoke detectors in your part of the world?

Tom..... :)

weedpharma:
http://argusfire.co.nz/types-of-systems/fire-sprinkler-systems.aspx

Weedpharma

Ah! Thanks, that explains it.
It's not the glass that's sensitive to heat, it's the contents of the glass tube expanding and cracking it.

Life is too important to leave detection to a hobbyist!

Put money toward an accredited fire/smoke detector.

I agree with LarryD

Weedpharma

I think it's acceptable to make your own fire alarm or hack an existing one but only if it's redundant to an unmodified commercial system.