EcoRenovator  

Go Back   EcoRenovator > Improvements > Appliances & Gadgets
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts


Reply
 
Thread Tools Display Modes
Old 10-28-10, 08:01 PM   #1
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default Quick & simple Arduino temperature logger

The other night I threw together a simple temperature data logger with my arduino. I was programming to make the differential controller for the attic fan heat dodad and figured it would be good to log some temperatures while I'm at it.

As the title says, its very simple to make. All you need is:
Arduino
LM35DZ-ND
some wire

The total cost for parts would be less than $40 and you could make a 6 channel logger out of it with a few more sensors and some additional code.


The code is also very simple:

Code:
/* quick temp data logger
*/

// Variable declaration
int temperature = 0;  // variable to keep the actual value 

// Analog pin declaration
int TsensorPin = 1;  // temperature sensor pin

void setup() 
{ 
  Serial.begin(9600);
  pinMode(TsensorPin, INPUT);
} 
void loop() 
{ 
  temperature = analogRead(TsensorPin) * .512;
  Serial.print(temperature);
  Serial.println(",");
  delay(300000);
}

Every 5 minutes the logger just spews the temperatures back to the arduino software on a computer, so you do need a laptop or desktop to connect to. Once you are done logging, you copy the text into notepad and save it as a .csv file which you can then import into excel and make a chart or what have you out of it.

Here is what I ended up with.




Now, there is a slight problem. The temperature does seem to be a bit off. However, I'm working on it.

Attached Thumbnails
Click image for larger version

Name:	temperature.jpg
Views:	15136
Size:	41.0 KB
ID:	1007  
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
The Following 2 Users Say Thank You to Daox For This Useful Post:
ervanerry (05-15-12), skyl4rk (10-30-10)
Old 10-29-10, 04:56 PM   #2
Clev
Wannabe greenie
 
Join Date: Sep 2008
Location: Crestline, CA
Posts: 74
Thanks: 1
Thanked 1 Time in 1 Post
Default

Awesome; let us know if you get the temps figured out. I'd also love to see this store the data in the Arduino for later retrieval.
Clev is offline   Reply With Quote
Old 10-29-10, 05:03 PM   #3
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

Yeah, I'm looking into that idea as well. However, its a bit more complex to do that, and the arduino doesn't have a ton of onboard memory (512k).
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 10-29-10, 06:02 PM   #4
RobertSmalls
Journeyman EcoRenovator
 
RobertSmalls's Avatar
 
Join Date: May 2009
Location: Buffalo, NY
Posts: 344
Thanks: 3
Thanked 17 Times in 15 Posts
Default

This thread got me thinking about a generalized arduino data acquisition system. Maybe something that could log an MPGuino's output to a SD card. Google turned up this, which would be fine for a temperature monitor, but too slow for a car: Arduino playground - UsbMemory
RobertSmalls is offline   Reply With Quote
Old 10-30-10, 02:12 PM   #5
skyl4rk
Helper EcoRenovator
 
Join Date: Sep 2010
Posts: 66
Thanks: 3
Thanked 6 Times in 4 Posts
Default

Thanks for the info on the LM35, I had been using thermistors but the LM35 might be better. Which package do you prefer to use? The TO-92s or the TO-220s?

I have a kit to put together a shield for a datalogger system, I have not yet put it together or even unpacked it. I need to log gps data and NMEA depth sounder data for a work project. I may also try to put together a pothole detector to rate city streets as to bumpiness as the driver experiences it.

It is an inexpensive kit:

Data-Logger Shield for Arduino
skyl4rk is offline   Reply With Quote
Old 11-06-13, 01:49 PM   #6
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I use the TO-92 sensors. However, many of the guys on the forum have been using 1-wire sensors and have been very happy with those. I forget which ones. Hopefully, they'll pop in here and share.
__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Old 11-06-13, 02:44 PM   #7
NiHaoMike
Supreme EcoRenovator
 
NiHaoMike's Avatar
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 1,154
Thanks: 14
Thanked 257 Times in 241 Posts
Default

TO92 is just a package type. It could be digital or analog, a complete sensor chip, or just a diode connected transistor.

It's possible to have the Arduino offload data to a PC (the PC doesn't even have to be on all the time - just often enough to empty the buffer) or you can add a SD card for increased storage.
__________________
To my surprise, shortly after Naomi Wu gave me a bit of fame for making good use of solar power, Allie Moore got really jealous of her...
NiHaoMike is offline   Reply With Quote
Old 11-06-13, 03:48 PM   #8
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,431
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

I love 1-wire sensors now that I have used a few with Arduino controllers.

A generic product page: 1-Wire Devices - Maxim

The DS18B20 is the temperature sensor that is so popular. Besides being a thermometer, you can tell it to be a thermostat, also. They are available in a waterproof package with 1 meter pigtail leads attached for $2.00 or less on ebay/amazon.

The thing i like about the 1-wire sensors over the linear sensors is that you can run a dozen or more sensors all off one line. With the linear sensors, a separate line must be run for each sensor, plus they need to be fed power. If you want to modify something, just splice in or remove a sensor from the data line. The 1-wire sensors can be fed power thru a separate line, but all they really need is a data line and a ground. They grab power for themselves off of the data line while it is inactive.

Last edited by jeff5may; 11-06-13 at 04:34 PM.. Reason: details
jeff5may is offline   Reply With Quote
The Following User Says Thank You to jeff5may For This Useful Post:
Daox (11-06-13)
Old 11-07-13, 09:02 AM   #9
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
Default Simple data logger...

I feel like I'm repeating myself, but the data logger I use is this one:


It is open source, it uses 1-wire sensors (Travis tested it with up to 70 sensors, could have gone higher), it is very reliable, it logs to an SD card (I tried a 16GB card, and it works fine), it is cheap $45 complete and ready to go.

I got mine HERE.

Since it is an Arduino, the code can be modified but you need a cheap FTDI Basic Breakout board to talk to it.

I've had mine for some years now, with no problems at all. It does everything I want it to do.

I'm currently monitoring my whole house with one.

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
The Following User Says Thank You to AC_Hacker For This Useful Post:
Daox (11-07-13)
Old 11-07-13, 09:09 AM   #10
Daox
Administrator
 
Daox's Avatar
 
Join Date: Aug 2008
Location: Germantown, WI
Posts: 5,525
Thanks: 1,162
Thanked 374 Times in 305 Posts
Default

I know you've mentioned it several times AC Hacker, thanks for one more.

Do you have to do anything special with wiring the sensors? When I made my thermal differential controller for my attic heat fan setup, I had issues with RFI messing with my sensor readings. I made a not so great filter with a capacitor, but still have some issues with it. Does this logger incorporate some sort of software filtering, or hardware?

__________________
Current project -
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
&
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Daox is offline   Reply With Quote
Reply


Tags
arduino, logger, temperature


Posting Rules
You may not post new threads
You may not 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

Forum Jump


All times are GMT -5. The time now is 06:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design