simple temperature alarm - The Planted Tank Forum
 
LinkBack Thread Tools Display Modes
post #1 of 12 (permalink) Old 01-05-2015, 05:47 AM Thread Starter
Planted Member
 
PTrader: (7/100%)
Join Date: Mar 2010
Location: Laramie, WY
Posts: 196
simple temperature alarm

I don't even know if this is appropriate here, but i know that this could have aquarium applications too, sooo.. i hope it flies. I'm trying to build a low-temperature alarm using a DS18B20 temperature sensor, a Leonardo Pro Mini with the ATmega32u4, and a 3W Cree LED... I first began with the set up described here:
http://www.instructables.com/id/Quic...ature-Loggers/

but quickly realized that i didn't want to log the temperatures so much as have decision criteria
I have seen things like this:

http://garagelab.com/profiles/blogs/...-with-arduino/

and i imagine that i could use their code for most of what i want to do, but since A) i already bought the mini boards (evilbay # 171195874012) i was hoping to use them. and, i have no desire to have speakers, rather i would like to have the LED light up...

SO, I'm a little ashamed asking for help, as the majority of the threads here are of awesome people doing awesome things... but hey.. i need help! I'm currently mid-build on my iAqua, and i had the brilliant idea to start ANOTHER project..
I'll be honest, this isn't entirely an aquarium application.. I am a property manager, and i would love to be able to give tenants one of these to put in their house when they go on break, so that i can just drive by and see if anyone's pipes are about to freeze! essentially something like this..

http://www.tiptemp.com/Products/Resi...e-Warn-I-Light

eventually i would like to move this onto an UNO and add a wifi shield to be able to get email notifications of temperatures dropping below the threshold, and perhaps even integrate a touch screen, but for now, i would just settle for something to keep any more pipes from freezing!! Thanks for reading my sob story!! you guys on the DIY thread here are seriously the best.
stephenpence is offline  
Sponsored Links
Advertisement
 
post #2 of 12 (permalink) Old 01-06-2015, 02:52 AM
Planted Tank Guru
 
PlantedRich's Avatar
 
PTrader: (2/100%)
Join Date: Jul 2010
Location: United States
Posts: 12,108
Do you really trust a tenant to perform on this high level?
Have you had anybody open the crawlspace door so that the dogs could be warm on a sub-zero night?
As a more helpful idea, do you want this as an interesting project or would a simple way be more suited.
I would go simple and get one of the small digital temperature controllers that would turn an alarm on or off as the temp falls too low. I use them as backup fail-safe on tank heaters but they could turn the light on for you if you wanted. A rotating beacon in the front window for a helpful neighbor to call you?
PlantedRich is offline  
post #3 of 12 (permalink) Old 01-06-2015, 04:34 AM Thread Starter
Planted Member
 
PTrader: (7/100%)
Join Date: Mar 2010
Location: Laramie, WY
Posts: 196
Simple is certainly the goal.. I'll be building the thing, and giving it to tenants when they go out of town. they put it in the designated location ( i will iron out those logistics) and they just have to plug it in and walk away... during Christmas break i have to make the rounds to all the rentals i manage every other day, but at least this way i don't have to get out and go into every property every time... just once to make sure it's set up correctly. then next time i can just keep on driving...
Affordability is key though as well, as most of my owners do not have large amounts of expendable income to burn on gadgets... so if the build costs 30-40 bucks, my odds of getting it pushed through are just that much better than a $60 price tag... although now that i said that, the link you provided was for 2 of them for $60... that's pretty dang reasonable... hmmmmm......

Bump: I don't think those sensors can be set below 68 degrees... I would probably set the alarm for closer to 50 that way the light only goes off in case of emergency.. a ranco or johnson controller that goes lower is already in the $50-70 price range..
stephenpence is offline  
 
post #4 of 12 (permalink) Old 01-06-2015, 06:09 AM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Aug 2014
Location: Edmonton, Alberta, Canada
Posts: 797
Have you seen these, I have one it works great. I got it to shut my heater off if it wasn't needed so it doesn't kill the fishes.

http://www.banggood.com/STC-1000-220...r-p-91676.html

Going this route would be cheaper than an arduino not to mention clean looking. With this you can plug a lamp in with a colored bulb and it will turn on and off based on temps.

Last edited by robsworld78; 01-06-2015 at 06:27 AM. Reason: ..
robsworld78 is offline  
post #5 of 12 (permalink) Old 01-06-2015, 02:25 PM
Algae Grower
 
ac0xr's Avatar
 
PTrader: (2/100%)
Join Date: Aug 2014
Location: Colorado
Posts: 105
Hi,

This looks like a cool project! I have often thought of doing something like this to sound an alarm if my aquarium temperature is too hot or cold. Another use in the aquarium hobby would be to check the temperature of a LED heatsink and sound an alarm or turn off the LEDs if they got too hot.

As far as your project, I have attached a modified version of the code from the instructables.com project you mentioned. I'm not sure it will work, but it should print the temperature to the serial monitor. I basically just took out all the SD logging and RTC parts. If it doesn't work (and I'm not really expecting it to!) post the error and I'll see what I can do.

The DS18B20 temperature sensor is rather difficult to use because it communicates using the OneWire protocol. Some more info is here http://playground.arduino.cc/Learning/OneWire . Near the bottom of that page there is another DS18B20 example that you could try. There are some other temperature sensors that are easier to communicate with such as this one which uses the I2C protocol http://www.adafruit.com/products/1782 . Another good one would be the sensor from the garagelab.com project you had seen.

If you want to use the DS18B20 it is certainly possible, it is just a little harder to work out the communications between the sensor and the arduino.

Anyway, let us know how the project goes! If you need any more help feel free to ask. I've been wanting to do something like this for a while anyway so this is great!
Attached Files
File Type: txt ds18b20_output_to_serial.ino.txt (2.3 KB, 16 views)
ac0xr is offline  
post #6 of 12 (permalink) Old 01-06-2015, 03:59 PM
Newbie
 
PTrader: (0/0%)
Join Date: Jan 2015
Location: Canada
Posts: 2
Hey, just came across this and I think you've got two options for pre-built equipment that I've seen. Both from the same company. They might be more than you're looking to spend but still cheaper than frozen pipes haha.

http://www.absoluteautomation.com/fr...-strobe-light/

http://www.absoluteautomation.com/te...-freeze-alarm/

I like the TempSpot, it'll send me a text if my place drops in temp.
nmcbride is offline  
post #7 of 12 (permalink) Old 01-07-2015, 01:57 AM Thread Starter
Planted Member
 
PTrader: (7/100%)
Join Date: Mar 2010
Location: Laramie, WY
Posts: 196
Yeah i saw a DIY build called FIDO which sends text alerts if your temp falls outside of certain parameters... but even a DIY build for something like that is north of $100...
Robsworld.. thanks for that link.. man that seems like a much more simple solution. I may have to try and build one of these just to see if i can do it.. but when i need to buy 100 of them.. i will probably just go that route!
ac0xr thanks for the code!! i will probably not get to try it out this week, (i know, lame) but work has to take priority. seriously thanks tho, and i will post up my results as soon as i have them!
stephenpence is offline  
post #8 of 12 (permalink) Old 01-07-2015, 01:57 AM
Planted Tank Guru
 
PlantedRich's Avatar
 
PTrader: (2/100%)
Join Date: Jul 2010
Location: United States
Posts: 12,108
I use the little STC-1000 types from the bay for a number of things. First thought is to cut any runaway heaters before they cook a tank full of fish but from there it has crept into a number of uses. They are a switch to turnout on or off AC power either when the temp goes low or high. That fits for turning a heater on in a greenhouse as well as turning on a water circulation pump when the water in the bathroom goes below a set point. My house is built with the water heater at the far end of the house and the pump can kick on to save standing there waiting for the shower to warm. Getting spoiled? YES!
Specs say they will control temps from -58 to +194 so that suits any use I can think of as I don't use them for process like ovens, etc.
PlantedRich is offline  
post #9 of 12 (permalink) Old 01-07-2015, 02:21 AM
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Aug 2014
Location: Edmonton, Alberta, Canada
Posts: 797
Yeah those little controllers are great, so many applications. They seemed to be used lots with the home brewers. It only displays C which I didn't like but I found a firmware update someone did which changes it to F. You update it with an arduino, its really easy to do. If you go that route and want F I can try and find the link.
robsworld78 is offline  
post #10 of 12 (permalink) Old 01-07-2015, 04:16 PM
Planted Tank Guru
 
PlantedRich's Avatar
 
PTrader: (2/100%)
Join Date: Jul 2010
Location: United States
Posts: 12,108
Careful shopping can turn up the Fahrenheit reading as well. I did not want to do the thinking. I was able to wait and find a US shipper with the F but in general at the time I bought, most of them had to be shipped from China. Odd as that would seem to be the opposite.
It also pays to be very careful when looking at which will work best for you. Some will control both heating and cooling but what the ads don't mention is that it has to be rewired as their unit may only have one set of contacts to wire the equipment on the back. Looking at the drawing of the contract points can lead you at which you are buying but you do need to study it.
PlantedRich is offline  
post #11 of 12 (permalink) Old 01-09-2015, 02:25 PM Thread Starter
Planted Member
 
PTrader: (7/100%)
Join Date: Mar 2010
Location: Laramie, WY
Posts: 196
So i finally had time to upload the code Ac0xr! this is the error i got:

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Uno"
sketch_jan09a:16: error: variable or field 'increment' declared void
sketch_jan09a:16: error: 'tmElements_t' was not declared in this scope
sketch_jan09a:16: error: 'tm' was not declared in this scope
sketch_jan09a:16: error: expected primary-expression before 'int'
sketch_jan09a:17: error: 'OneWire' does not name a type
sketch_jan09a.ino: In function 'void setup()':
sketch_jan09a:30: error: 'ds' was not declared in this scope
sketch_jan09a:46: error: 'OneWire' has not been declared
sketch_jan09a.ino: In function 'void loop()':
sketch_jan09a:69: error: 'buff' was not declared in this scope
sketch_jan09a:74: error: 'target' was not declared in this scope
sketch_jan09a:74: error: 'increment' was not declared in this scope
sketch_jan09a.ino: At global scope:
sketch_jan09a:76: error: expected constructor, destructor, or type conversion before '(' token
sketch_jan09a:77: error: expected declaration before '}' token
stephenpence is offline  
post #12 of 12 (permalink) Old 01-09-2015, 05:04 PM
Algae Grower
 
ac0xr's Avatar
 
PTrader: (2/100%)
Join Date: Aug 2014
Location: Colorado
Posts: 105
Well, at least I didn't have great expectations . Why don't you try using the DS18x20_Temperature example from the OneWire library? You should be able to find it in the Arduino program under File > Examples > OneWire > DS18x20_Temperature or File > sketchbook > libraries > OneWire > DS18x20_Temperature . It seems to compile OK and if you are able to get temperature readings with it, I can easily modify it check to see if the temperature is inside a specific range.

I think I will get some DS18B20's as well, then maybe I can be more helpful! It would be easier to get this working if I had a couple to experiment with. And it's a perfect reason to pick some up!
ac0xr is offline  
Reply

Tags
None

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome