Arduino watches for a kitchen catastrophe

Lead Image © Brett Lamb,

Damage Control!

Using Arduino to monitor for smoke or water damage.

I guess I should start by admitting that this article was inspired by my own stupidity. When I was a kid, I left a frying pan on a lit stove. I was probably confused by the tactile controls on the vitroceramic hob. Unfortunately, I unwittingly turned the stove up to maximum. Thinking I had actually turned it off, I went to watch TV.

Some minutes later, the living room started filling with smoke. To make a long story short: The oil in the pan was on fire and, to make things worse, I tried to put it out by running it under a faucet.

So, I was a dumb teenager, but this kind of thing could happen to anyone. Fortunately, cheap and easy solutions are available for monitoring your home to minimize risks of fires, gas leaks, and damage by water.

This article describes how to create an alarm system on par with commercial home alarm systems (Figure 1). I'll focus on monitoring the kitchen, which is where accidents are more likely to happen.

Figure 1: Conventional fire alarm sold in stores.

Potential Hazards

Sensors are a common theme in articles about Arduino and Raspberry Pi: distance sensors, humidity sensors, luminosity sensors… In this case, I'll focus on sensors that can detect dangers in the home. Because fire is one of the most common and destructive hazards, I'll look at some devices that are normally very small and are commonly used for fire detection.

In the first example, I will build a homemade fire detector with a smoke sensor [1]. This sensor is tiny, as you can see in Figure 2, and it has six pins that allow you to measure the presence of various types of gas, but its main function is to indicate the presence of smoke. Figure 3 shows the schematics of the pins and the basic configuration. I have to feed in 5 volts between pin H (5V and GND) and pump 5 volts into A as well to get the analogical signal proportional to the amount of smoke from B. To adapt the current, place an RL resistor of between 3K and 30K between the signal in B and ground. In this example, I used a 4K7 resistor.

Figure 2: Smoke sensor used for a DIY fire alarm.
Figure 3: Basic schematics for the connection and pins of the smoke detector.

The second example in this article uses a methane sensor [2] to detect possible gas leaks in the kitchen. The methane sensor allows you to detect fires and methane leaks in homes and small workshops. The configuration for the methane sensor is similar to the smoke sensor.

Of course, you can add many other kinds of smoke and gas detectors with similar characteristics. By studying the spec sheets [3], you can see the basic circuits of each, so it shouldn't be difficult to adapt these concepts to your needs. As you can see in the CO2 sensor in Figure 4, for example, the sensors are similar in size and are encapsulated in similar way, so you can develop a very modular system.

Figure 4: The CO2 sensor is one of the many gas sensors available.

Another danger in the home is the possibility of flooding caused by leaks or broken pipes. To detect this kind of hazard, I will use a system [4] that detects water based on the principle that water conducts electricity.

As you can see in Figure 5, along the surface of the sensor are a series of conductive strips, which are activated in the presence of water, delivering an output signal of 1. The code will take the value of 0 as a sign that everything is dry.

Figure 5: The digital water sensor is based on the principle that water is conductive.

Activating the Alarm

The first example requires some sort of indicator device that alerts the user to the danger. For simplicity's sake, I'll use a simple buzzer, but for a real-life situation, I recommend a 12v siren. The noise from one of these sirens definitely would have stopped me from burning down the kitchen.

If you decide to go with a siren, you will also need a transistor. A transistor can serve many roles, but in this case, you'll need it to commute the voltage. The transistor has three zones called Collector, Base, and Emitter. You will need an NPN transistor that has its emitter connected to ground (Figure 6).

Figure 6: A NPN transistor you can use to activate a 12v siren.

You are only working with 12 volts, so you won't need a relay. Set up the transistor as shown in Figure 7: You can commute the voltage and activate the siren using a resistor to limit the electric current reaching the base of the transistor. Your transistor will work as a switch. If you activate the digital signal on pin 13, the siren will fire up. If not, it will switch the siren off, cutting off the voltage.

Figure 7: Schematics which show how to link up a siren that will be activated with an NPN transistor.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content