# DIY - Thermometer



## Skitzmixer (Mar 1, 2013)

I remember reading a while back about someone who was building their own thermometer / thermostat. Does anyone know how that project went?

I'm thinking about starting my own similar project. My plan was to use a credit card sized computer known as the “Raspberry Pi” and attach a GPIO board to read / control the thermometer. This also allows me to hook up quite a number of thermometers (for multiple readings of the same enclosure or multiple enclosures). I’ve done some research and I can get a thermometer (eBay - DHT22) that does humidity as well. Humidity range is 0-100%RH (accuracy: ±2%RH) and the temperature range is -40 to 80℃ (accuracy: ±0.5℃). So in theory I could get a reasonably accurate temperature. 

Because Pi runs on linux it means that I can install other applications such as apache (HTTP web server) to output the readings to a webpage and have some pretty graphs for the day – gives average, highest, coolest etc. I could create email alerts for say if the temperature is over X send a panic alert. Pi connects to the network either through cable or wireless. Once thats up and running i could then forward some ports out to the internet and make the webpage available to view anywhere in the world. 

Would anyone be interested in having something like this? I’m trying to get my hands on all the parts I need but I’m fairly confident I can get this working. What would some other features that you’d like to see?

Its only early stages but for me personally it'd save me a lot of stress if i can just jump on the web and double check the temps of all my enclosures.


----------



## mad_at_arms (Mar 1, 2013)

It was Saximus that had the project
http://www.aussiepythons.com/forum/general-reptile-discussion-42/buy-179799/


----------



## Skitzmixer (Mar 1, 2013)

sweet, thanks. I'll have a chat to him see how its going.


----------



## Zeusy (Mar 1, 2013)

I built my own also using a controller we use at my work which has fully programmable ins and outs. I have 3 sensors and use the one on my heatmat to control a digital output which runs a 4PDT relay that turns my heatmat on and off at an adjustable temperature. I also used the time in it to control another relay to turn the light on at 6am and off at 6pm. 
My controller also has a pwm output which i plan to connect to a solid state relay so i can control the heat using a built in PID controller to control how "on" the heatmat is. I also have an output for an over temp buzzer and a shut off relay which will use the normally closed contacts through to the heatmat relay supply and when turned on, cuts the supply to the heatmat relay, should the contact short on or something. 
It' been fun programming it and testing etc and has worked really well. I use a 2 degree swing on the heat mat which turns it on for about an hr and off for 45 min approx so i think ill drop it to 1 degree. 

I quite like the sound of that Pi computer. Keep me up to date with the project if it goes ahead. I'd find it quite interesting


----------



## solar 17 (Mar 1, 2013)

Which Humidity range does this setup give results in ? solar 17


----------



## ronhalling (Mar 1, 2013)

I suppose if you are going to go to all the trouble and expense of building such an extravegant controller you may as well incorperate multiple lipstick cams to all your enclosures so you can also check on your snakes/lizards well being remotely from any location that has web access....................................Ron


----------



## duckhead (Mar 1, 2013)

What Ron said... But Yeh if you could make this setup affordable then I don't see why people wouldn't want it.


----------



## solar 17 (Mar 1, 2013)

Which Humidity range does this setup give results in ? solar 17


----------



## Zeusy (Mar 1, 2013)

mine would work underwater. The OP mentioned 0-100% (+-2%) for the humidity sensor. I imagine that the temp sensors would work in that too.


----------



## Shaggz (Mar 2, 2013)

All sounds very interesting, Not sure if Ron was a bit tongue in cheek when he mentioned adding cams but that was exactly what I was thinking. I am not up with any of this technical mumbo jumbo but it does sound a little expensive lol

How many inputs and outputs would you be able to control with such a setup??????? I am in the process of building a Reptile room and plan on having roughly 20 enclosures aswell as hatchie racks and incubator so obviously that adds up to a hell of a lot of thermostats and thermometers which obviously isn't going to cheap either. I suppose though running everything on one controller means that if it malfunctions the whole room malfunctions rather than just an individual enclosure. Obviously there are going to be a few pros and cons to work through but I will be very interested to see how far this project goes.


----------



## Illium (Mar 2, 2013)

Iv considered something similar.
For me it was more as a monitoring system i could use that is web based, a few times a year i travel for a few weeks at time with the wife and kids. While i can get someone to look after the herps for feeding i didn't trust the care factor. (i went away for 2 weeks and didn't get told my filter and pump on the turtle tank failed the day after i left, shell problems occurred.) So im going to look onto the ability to if not change temp setting then at least shut off the the power to each enclosure, and just for visual checks also.


----------



## Skitzmixer (Mar 2, 2013)

solar 17 said:


> Which Humidity range does this setup give results in ? solar 17


Humidity range is 0-100% (accuracy: -+2%) the model number is DHT22, different ones are available as well, there’s a cheaper option but it’s not as accurate.

Thanks for all the input everyone.

I'll be trying my best to keep it under $100. With the ability to add as many thermometers as you'd like. The cost of the thermometer its self is $5, the pi is the most expensive thing at $55. If you needed more than 10 thermometers then an additional board would need to be added. I could have varying lengths of thermometer cable to suit most situations.

Funny you should say that about a cam, pi has a 2x USB input so in theory you could plug a web cam straight into it and have it display on the web as well. If you wanted to put more in, get a powered USB hub and off you go (i found a powered USB hub that supports 20 connections.)

I'd like to try and incorporate a thermostat feature but firstly I’ll get my feet on the ground by just creating the thermometer and see how much it all starts to cost. If it starts to get too pricey then I can see the project failing, I’m going with if I wouldn’t pay that much for it, then neither would anyone else.

Thanks again.


----------



## ronhalling (Mar 3, 2013)

Nah Shaggs, was not tongue in cheek, i thought that if the costs could be kept low enough web cams or lipstick cams could be incorperated, especially for some of the high maintenance projects, so if you did have to go away and trust someone to look after things at least you would still be able to check in on things remotely, i have seen remote pi systems used in some greenhouse tomato and strawberry setups where the person in charge can not only view what is happening in the greenhouses but be able to remotely change settings for heat water flow and air flow remotely from his/her home, i know when i have to be hospitalised for a couple of weeks every year i would like to be able to check up on my reps instead of always having in the back of my mind "are they really being looked after like i want"...................Ron


----------



## Marzzy (Mar 3, 2013)

Use Arduino = D


----------



## Skitzmixer (Mar 4, 2013)

ronhalling said:


> Nah Shaggs, was not tongue in cheek, i thought that if the costs could be kept low enough web cams or lipstick cams could be incorperated, especially for some of the high maintenance projects, so if you did have to go away and trust someone to look after things at least you would still be able to check in on things remotely, i have seen remote pi systems used in some greenhouse tomato and strawberry setups where the person in charge can not only view what is happening in the greenhouses but be able to remotely change settings for heat water flow and air flow remotely from his/her home, i know when i have to be hospitalised for a couple of weeks every year i would like to be able to check up on my reps instead of always having in the back of my mind "are they really being looked after like i want"...................Ron



Ron, I actually think its a great idea and its something i'll certainly look at implementing (shattered i didnt think about it first though!) I'll make sure to keep you updated. 



Marzzy said:


> Use Arduino = D



Oh nice, what books that from? Shame its pretty pricey for the sensor though. I think running 10 of those from the one board would become well out of most people price ranges. Maybe theres a cheaper option?


----------



## Marzzy (Mar 5, 2013)

( Its the Jaycar 2012 Catalogue ) 
You can get normal sensors that do Temp and Humidly I just liked the fact they were IR.


----------



## Skitzmixer (Mar 5, 2013)

Marzzy said:


> ( Its the Jaycar 2012 Catalogue )
> You can get normal sensors that do Temp and Humidly I just liked the fact they were IR.



I could always add an option for a different style of sensor. Everythings been ordered now so hopefully i should have a working model soon.


----------



## andynic07 (Mar 5, 2013)

ronhalling said:


> I suppose if you are going to go to all the trouble and expense of building such an extravegant controller you may as well incorperate multiple lipstick cams to all your enclosures so you can also check on your snakes/lizards well being remotely from any location that has web access....................................Ron


My mate has his home security system cameras accessible via the web. He looks around his house from anywhere via his smartphone.


----------



## Skitzmixer (Mar 5, 2013)

andynic07 said:


> My mate has his home security system cameras accessible via the web. He looks around his house from anywhere via his smartphone.



Its not really that hard to do, its just a matter of finding the right program that will run on pi easy enough. Give it some time, once everything rocks up i'll find a solution


----------



## steampunk (Mar 5, 2013)

I've been looking at using my pi for a humidity controller for my frogs, just something simple like when the humidity drops to a certain level the pi turns the fogger on. But to be honest I have no idea where to start.

I'll be following this thread closely


----------



## Skitzmixer (Mar 5, 2013)

steampunk said:


> I've been looking at using my pi for a humidity controller for my frogs, just something simple like when the humidity drops to a certain level the pi turns the fogger on. But to be honest I have no idea where to start.
> 
> I'll be following this thread closely



Sweet! See i knew there'd be a use for it! I'm getting anxious waiting for the gear to arrive now.


----------



## saximus (Mar 5, 2013)

steampunk said:


> I've been looking at using my pi for a humidity controller for my frogs, just something simple like when the humidity drops to a certain level the pi turns the fogger on. But to be honest I have no idea where to start.
> 
> I'll be following this thread closely



It's pretty easy to do if you use the right type of sensor. The only problem is that the easiest to use sensors are also quite expensive. If you have one that outputs a digital signal, you just need to work out how to read the signal in the Pi then get it to turn on a relay connected to your fogger. Mine was controlling humidity within 10% of my set level which is quite good when you understand how difficult humidity is to control in an open environment like an enclosure


----------



## Skitzmixer (Mar 8, 2013)

delays on my gear  looks like it might be another week.. 

ah well gives me time to plan it all out


----------



## Marzzy (Mar 18, 2013)

What's the G O ?


----------



## Skitzmixer (Mar 19, 2013)

Just got confirmation the Pi was finally sent out!  Should be able to finally start work on it in a few days.


----------



## Zeusy (Mar 21, 2013)

Just a suggestion, and I'm not sure how much memory the Pi has but I've got my system logging temps hourly so when I get home from work I can see how the temps were during the day. I have it automatically clear the logs at midnight each day to prevent the memory being filled.


----------



## T0ken (Mar 21, 2013)

Thanks for the inspiration, now I can combine two of my interests together.


I'd been thinking about taking info from the BOM weather site to drive one of the open source home automation packages to mimic the temps and photo periods for my cages.

Time for some online shopping....


----------



## Skitzmixer (Mar 25, 2013)

Zeusy said:


> Just a suggestion, and I'm not sure how much memory the Pi has but I've got my system logging temps hourly so when I get home from work I can see how the temps were during the day. I have it automatically clear the logs at midnight each day to prevent the memory being filled.



Good thing about this is i can get a 32GB SD card and start logging as much data as i can


----------



## Skitzmixer (Mar 25, 2013)

T0ken said:


> Thanks for the inspiration, now I can combine two of my interests together.
> 
> 
> I'd been thinking about taking info from the BOM weather site to drive one of the open source home automation packages to mimic the temps and photo periods for my cages.
> ...



Have fun, my gears finally arrived, just getting everything i need ready today and ill start soon ... hopefully!


----------



## Marzzy (Mar 25, 2013)

Skitzmixer said:


> Have fun, my gears finally arrived, just getting everything i need ready today and ill start soon ... hopefully!



Take a picture of what you got show us your electronic poon


----------



## Skitzmixer (Mar 26, 2013)

Well thats all i have to show at the moment. I grabbed the AM2302 cause i found some librarys for it so it'll make my life easier, rather than having to write something for it. Says its for the Arduino board but thats ok, i might grab one of those boards as well and have a play with it, they look pretty fun.


----------



## bohdi13 (Mar 26, 2013)

hows the go with it all? is it working good? can it regulate more than one enclosure?


----------



## Skitzmixer (Mar 26, 2013)

bohdi13 said:


> hows the go with it all? is it working good? can it regulate more than one enclosure?



Well i have the thing booting up and reading temps, i just need to get it to output to a file. It doesnt regulate the temps yet, just records them.. I want to nail this step first before i start introducing other things..


----------



## saximus (Mar 26, 2013)

I know you say it's in the future but have you thought about how you'd like it to control if it does? On/Off control would be super simple if you can get your hands on a 240V relay. Dimming and pulse proportional wouldn't be too much extra work either but might need a specialist PCB to hold the necessary components.


----------



## Skitzmixer (Mar 31, 2013)

Well im pretty happy with the way its going so far.. I've now got it writing the temp & humidity to a google docs file once every 30 seconds  Next is to try and get a live graph + alerts. 

@Sax - I'll start having a think / google around to find the stuff i need. I'm not really sure on how i can manage it, but i'll work it out. Looking forward to adding some more features to it


----------



## saximus (Mar 31, 2013)

Sounds very promising. Congrats on getting so far with it so quickly


----------



## Marzzy (Apr 15, 2013)

Updates ?


----------



## ouroboros (Apr 17, 2013)

Geekgasm! Great ideas  Looking forward to seeing the results.


----------



## Skitzmixer (Apr 18, 2013)

Hi All

Well everything's going really smoothly. Currently I'm looking at ways to add more thermometers to the pi without having to pull everything apart (the pins that read the data are all over the place) and then looking at how I can automatically add it to the already running scripts that collects the data. I'm also starting to develop a front end in the form of a webpage that you can name your thermometers (so you can tell which is which) and starting to add graphs etc. I still haven't looked at turning it into a thermostat as well just yet, i'd prefer to get the thermometer side of things working accurately before attempting anything else. 

I'm getting closer but theres just so much to do and so little time!


----------



## Skitzmixer (Apr 23, 2013)

How often would be the best for gathering temp data? every minute? 2 minutes, 5 minutes? etc.. I think every minute might be alright..


----------



## saximus (Apr 23, 2013)

My datalogger (bought, not made) does it every minute. In something like an enclosure, I don't think there would be much point doing it any more often. How are you programming it? Maybe make it an option/argument so you can change it easily later on depending on your requirements.


----------



## ginji (Apr 23, 2013)

Skitzmixer said:


> How often would be the best for gathering temp data? every minute? 2 minutes, 5 minutes? etc.. I think every minute might be alright..



Faster will mean less fluctuations in temp, but think of it this way, how long for the heat source does it take to make a noticeable/measurable difference? If it takes 5 minutes for it to heat up 1 deg C, then there is no point spending the processing power measuring it every 1 minute, it might be sufficient for you to do every 5 minutes then. Base it on that.


----------



## Skitzmixer (Apr 23, 2013)

ginji said:


> Faster will mean less fluctuations in temp, but think of it this way, how long for the heat source does it take to make a noticeable/measurable difference? If it takes 5 minutes for it to heat up 1 deg C, then there is no point spending the processing power measuring it every 1 minute, it might be sufficient for you to do every 5 minutes then. Base it on that.



Maybe I could make it a users choice (once I've built the settings page for the device).. Thanks for the feedback


----------

