Introduction: Frozen Pipe Alarm

Picture of Frozen Pipe Alarm

Winter is coming. So it is time to make preparations. If you live in a colder climate, you need to be concerned about the possibility of your pipes freezing. There are a lot of preventative measures that you can take such as insulating your pipes and leaving the water dripping. But for a little extra peace of mind, I designed a simple alarm that will notify me if the pipes are getting too cold and are in danger of freezing.

Step 1: Watch the Video

Here is a video walkthrough of the project.

Step 2: Materials

Picture of Materials

Here are the materials and tools that you will need for this project.

Materials:

Arduino Microcontroller

Thermistor

10 kohm Resistor

Jumper Wires

LED

Piezo Buzzer

Project Enclosure

Printed Circuit Board

Glass of Ice Water

Plastic Bag

Tools:

Soldering Iron

Knife

Step 3: Construct the Temperature Sensor

Picture of Construct the Temperature Sensor

The temperature sensor is made by connecting a thermistor (temperature dependent resistor) and a fixed resistor in series. These two resistors form a voltage divider. As the temperature changes, so does the resistance of the thermistor. This causes the voltage between the two resistors to change. This change in voltage can be measured by a microcontroller such as an Arduino.

Connect one lead of the fixed resistor to the GND pin on the Arduino. Then connect the other lead to an analog input pin. Connect one lead of the thermistor to the 5V pin. Then connect the other lead of the thermistor to the same analog input pin. You can now use the AnalogRead function to measure the voltage changes.

In order to insert the thermistor into the wall were the pipes are, I connect the thermistor with a pair of long jumper wires.

Step 4: Arduino Code

Picture of Arduino Code

//Here is some sample code that you can use for your sensor

int AlarmOneInputPin = 0; // sensor connected to analog pin 0
int AlarmOneOutputPin = 9; // Alarm connected to digital pin 9 int AlarmOneInputValue = 0; // variable to store the value read int AlarmOneTriggerValue = 350; // alarm set value

void setup() { pinMode(AlarmOneOutputPin, OUTPUT); // sets the digital pin as output Serial.begin(9600); // setup serial }

void loop() {

AlarmOneInputValue = analogRead(AlarmOneInputPin); // read the input pin Serial.println(AlarmOneInputValue); // debug value

if(AlarmOneInputValue < AlarmOneTriggerValue) //flash the alarm if the sensor value is below the trigger value { digitalWrite(AlarmOneOutputPin, HIGH); // turns the alarm on delay(1000); // waits for a second digitalWrite(AlarmOneOutputPin, LOW); // turns the alarm off delay(1000); // waits for a second } else { digitalWrite(AlarmOneOutputPin, LOW); // turns the alarm off delay(1000); // waits for a second }

}

Step 5: Calibrate the Sensor

Picture of Calibrate the Sensor

Before you can use the sensor, you need to calibrate it. You can do this with a simple glass of ice water. Insert the thermistor into a small plastic bag. Then submerge it in the ice water. The water should be just above the freezing point.

Now use the AnalogRead function on the Arduino to measure the voltage at the connection between the two resistors. The result will be displayed on a scale between 0 and 1023 (which represents the range of 0V to 5V). With my sensor it measured at about 300. So I know that the sensor will read about 300 when it is almost freezing. This will be the value that we set to activate the alarm.

To set the alarm temperature, open up the code file and set the value of the "AlarmOneTriggerValue" variable to 300 (or your chosen value).

Step 6: Construct the Alarm

Picture of Construct the Alarm

For the alarm, I am using a simple LED and piezo buzzer. I connected them in parallel so that I could activate both of them with a single digital pin from the Arduino. Whatever kind of alarm you decide to use, be sure that you don't exceed the 40ma maximum output of the digital pins. If you need more power than that, then you should set up a driver circuit with a relay or a power transistor.

First I prototyped the alarm on a breadboard. Then I soldered it to a small piece of perf board. I connected the negative terminal of the alarm to the GND pin on the Arduino. I connected the positive terminal of the alarm to digital pin 9.

Once, I had the alarm working on its own circuit board I mounted it inside a small project enclosure. To fit the parts inside, I drilled a hole in the center for the LED and I cut a slot in the side for the wires.

Step 7: Insert the Temperature Sensor Into the Wall

Picture of Insert the Temperature Sensor Into the Wall

Now you need to insert the temperature sensor into the wall near the pipes. If there is already a hole in the wall around your pipes, you can just slide the sensor in there. If not, then you will need to drill a small hole.

Select a drill bit that is just big enough for your sensor. Drill the hole as close as possible to the middle of the pipe. Then insert the temperature sensor into the wall and try to position it close to the pipes. If necessary, place a piece of tape over the hole to help hold it in place.

Step 8: Use the Sensor to Monitor Your Pipes

Picture of Use the Sensor to Monitor Your Pipes

The last thing that you have to do is mount the alarm some place noticeable. You can now use your sensor to help you monitor your pipes in the winter.

You can add as many sensors as you have analog input pins on your microcontroller. This would allow a single Arduino Uno to monitor up to six sensors.

You can also use this kind of a sensor to automatically control an electric pipe heater. All you need is a relay driver or a PowerSwitch Tail.

Comments

deswiger (author)2016-02-26

Now this I can use. Great idea.

EthanD5 (author)2015-06-05

Can somebody please explain in more details(preferably with photos), on how to set up the final printed circuit board. I understand that there arent too many parts to it but it is hard to see what goes where and I really want to build this.

diy_bloke (author)EthanD52015-10-14

Not sure if you already found out how to do it, but in case you didnt, it is really well described in the ibble (nope sorry, I dont have pictures, didnt even build it), and it is also very clear in the code.
Take your fixed resistor and connect it between ground and A0. Those pins are clearly indicated on yr arduino.
Take your NTC and connect it between +5Volt and that same A0
That is your sensor input
Your alarm pin is digital pin 9. He uses both an LED and a piezo buzzer.
You have to make sure the current does not exceed 40mA.
Suppose you would only use an LED then get a resistor of 1kohm and attach one end to D9 on yr Arduino and connect the other end to the anode of your LED (usually the anode is the long leg). Connect the kathode (usually the short leg) to Ground and you are set.

if you want to add a buzzer this ibble puts that parallel to the LED, but you may have to take a lower value for the resistor. but make sure you do not draw more than 40mA

iam_maker_leo (author)2014-11-19

Great Project....

How about sell it with heat cable with connect relay.

I think there are many who need it.

More Cowbell (author)2014-11-11

Great build. My family has been using a thermostatic controlled outlet in the well house (very small insulated shed) for a few decades. It automatically turns on a 100w light bulb to raise the temp enough to keep the water flowing.

http://www.amazon.com/Farm-Innovators-TC-3-Thermostatically-Controlled/dp/B0006U2HD2

wilgubeast (author)2014-11-11

I LOVE THIS PROJECT. It's an excellent entry in the Winterize contest, and it was pretty much exactly what I was looking for when I launched that competition.

Nice work.

MsSweetSatisfaction (author)2014-11-11

That's so clever, and very necessary is some parts of the world! Looks like it works great and the instructable is easy to understand!

About This Instructable

15,447views

188favorites

License:

Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:36 Things to Cook in a Coffee MakerHow to Make a Festivus PoleAdd Wings to an Infant's Halloween Costume
Add instructable to: