Paradox
©
Fisana

Jump to content


- - - - -

Computer temperature data logger


  • Please log in to reply
42 replies to this topic

#1 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 25 April 2008 - 09:31 PM

How to inexpensively turn your computer into a
multi port temperature data logger


http://mycotopia.net...21&d=1209181203

Fairly recently I purchased a few arduino microcomputer boards in an attempt to design an automated growing system, and although my design is far from finished and I am still learning how to use my new tools (I forgot some parts I need, also realized I need other parts and cant afford tor order them right now) so I thought I'd post this for people to use in the meantime.

I was turned on to the arduino by another member here but I cant remember who and I lost his email in my last computer crash (if your are reading this THANK YOU and please contact me again).

I am very impressed with this physical computing platform, it is inexpensive, small, versatile, and easy to use. It is programed through its own interface (usb or serial port) , it uses a c++ like language based on the wiring language. The usb version can even power itself from the usb cable! This thing is really neat-o. If you have the money you can even get a much more costly version that has bluetooth built in for wireless communication with your computer.

The schematic is so simple I wont bother posting it but I do show you how it is done in the library. (the .cpp file)
The only things needed are the arduino board (I will provide sources) DS18B20 digital temperature sensor(s) a 4.7k resistor (for each sensor),
the library I made based on a program I found on the web,
and this software, stamp plot pro running on your computer (it is even free software for home or educational use).

some different forms of the arduino:

USB version
http://mycotopia.net...20&d=1209181203

Bare bones board
http://mycotopia.net...22&d=1209181203

Really bare bones format
http://mycotopia.net...25&d=1209181203

Just to understand the system better I made one on a breadboard
http://mycotopia.net...23&d=1209181203

And the setup for 8 sensors on the prototype shield
(this plugs right on top of the standard arduino)
There is one sensor on board and cable connectors for some of the others.
http://mycotopia.net...24&d=1209181203

The bare bones versions as well as the breadboard version
require a special cable that has the usb chip built into it (ftdi cable).

Ok, enough preliminary on to the how to.

Step one:
Download the Arduino software and unzip it where you want.
It is helpful to put a link to the program on your desktop as well as associate the .pde extension to the software.

Now unzip and move my library to;
drive:\wherever you put\arduino\hardware\libraries

Step two:
(this assumes you have the usb version *Recommended*)
Make sure the little jumper between the usb port and power socket is nearest the usb and plug it in to
your computer's usb port.

It will then load TWO drivers one for the board itself and one for the virtual serial port. both of the drivers are located in the arduino/drivers/FTDI USB Drivers folder.

If you have the serial port version:
you may have to use external power supplied I don't know,
I don't think you need any drivers at all, just use the proper com port in the arduino environment.

If you have linux or mac instructions for installing the software and drivers can be found here
For that matter a much better win install is there along with a WHOLE bunch
of information on how to play with this microcomputer system.

Step three:
Download and install the stamp plot pro software. You can use one of the pre installed interface or design your own. It even has alarms you can set for your temperature limits. In later posts I can even show you how to use this software to control your system's fans, heater and whatnot. (this software was designed for the stamp but it does not matter, it will work with the arduino).

step four:
Start the arduino environment select tools/serial port/(last port in list)
now open one of the examples I wrote for the DS18B20 (file/sketchbook/examples/ds18b20/example#), modify it for the number of sensors you have and make it stream the response in the format you want (F or C). make sure it sends the data on a single line with comma separators. (If you need help with this just contact me). now burn the program to the arduino board (the arrow pointing to the left) sometimes on the first upload it errors saying "couldn't determine sketch size" if you see this just upload it again and it should work.

Step five:
connect your temperature sensor(s) to your arduino board. I recommend using a prototype "shield" available for many of the sources. The sensor has 3 wires ans looks like a transistor. Pins one and three go to ground and the center pin goes to an arduino pin as well as a 4.7K resistor connected to +5 volt (available through the arduino itself).

Step six:
A.) start the stamp plot software and select your desired interface.

B.) press the blue pencil looking thing to the right, in the config popup select the port tab
make sure these settings are selected:
serial button is selected (not tcp), make sure "micro echoes data" is unselected.
port (set to whatever port used in the arduino environment)
baud 9600
bits 8
parity N
stop bits 1
make sure the 3 check boxes below are unchecked
press the set as default button
close the config box

C.) press the connect to stamp on com port button (looks like 2 arms shaking hands),
now press the start plot button (looks like a plot chart).

congratulations you should now see your data being plotted

Sources:
http://www.adafruit....e04e20f1bcb28c0
http://www.wulfden.o...freeduino.shtml
http://www.nkcelectr...om/arduino.html
http://store.makezin...uctCode=MKARDIE
Wulfden also sells the sensors or you can get them from sparkfun, mouser, or futurlec or many other online electronic supply *dont forget the resistors.

Notes:
You can add up to 18 of these sensors using the current configuration (analog input pins may also be used),
But it currently one sensor per pin. It is possible to put up to 8 of them on the same arduino pin but the library would have to be re-writen to make this happen (right now I am not smart enough to do this but eventually I plan to this when I can program much better).

The library I made is in the included zip file.
I also included the datasheet for the sensor in the pdf file.

Cables for RC model airplanes are perfect for this setup, just seal them with silicone or hot glue for use in high humidity environments.

I have a program to run the SHT11 humidity & temperature sensor that could also be plotted this way
As soon as i turn it into a library I will upload it for you to use but these sensors are more expensive than the temp only ds18b20.

Hope this tutorial is at least as clear as mud but if you have any questions don't hesitate to post, pm me or hit me up in chat.
  • dizz1962 likes this

#2 gsmith1981

gsmith1981

    Mycophiliac

  • Expired Member
  • 2,070 posts

Posted 25 April 2008 - 09:46 PM

been waiting for some one to come out with a good tek for one of these can't wait to see finished results:thumbup:



:headbang:

#3 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 25 April 2008 - 10:51 PM

pics broke
This is something I'll leave someone who need to flesh it out
Its just an offshoot of a larger thing i'm working on

It literally is just soldering a few resistors and wires for the sensors.

Attached Thumbnails

  • proto.JPG
  • rbbb.JPG
  • bread.JPG
  • bbb.JPG
  • arduino316.jpg
  • arduino.JPG


#4 Hippie3

Hippie3

    DUNG DEALER

  • Founders
  • 40,642 posts

Posted 25 April 2008 - 11:01 PM

:cool:

#5 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 25 April 2008 - 11:43 PM

I forgot to re add the library and datasheet.

Attached Files



#6 omentheduck

omentheduck

    Wondering about it all

  • OG VIP
  • 2,302 posts

Posted 26 April 2008 - 12:05 AM

whoa, thats some high tech, space age, ubertech stuff!
:bow::bow::bow::bow::bow::bow::bow::bow::bow::bow:

how big of an area can that cover? just one

#7 mydarling

mydarling

    (actual mycologist)

  • Expired Member
  • 4,025 posts

Posted 26 April 2008 - 12:27 AM

:special:

i tried to understand, i really did, but i give up now.

#8 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 26 April 2008 - 01:16 AM

:special:

i tried to understand, i really did, but i give up now.


If you can set up the need to monitor many different areas for temperature then you can probably set up this ;)

how big of an area can that cover? just one


You can add up to 18 of these sensors using the current configuration


theoretically up to 144 if the library is re written.

Other sensors can be added if you can write the program for them.

I need some actual EE and programmers to jump in and help with the big project.
this thread is just bait to troll for them :D

#9 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 26 April 2008 - 04:04 AM

Here is a screen capture of 2 sensors
one left alone the other i put on my cool beverage, pinched it & even put it near fire.

http://mycotopia.net...43&d=1209200579

The alarm is set but not on.
If it was on a script could be added in the plot software to send a data back to the arduino and turn on a fan or heater (code would need to be added to the ariduino as well).

Inexpensive boards to interface DC or AC currents can be found here
Just make sure to pay for the faster shipping or you will be sorry.

Attached Thumbnails

  • capture.gif


#10 GordianHyphae

GordianHyphae

    Holding Tank

  • Expired Member
  • 238 posts

Posted 26 April 2008 - 06:39 AM

that's awesome, glasshopper. nice work! can the ardunio be used to trip relays for thermo and humidistats?

#11 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 29 April 2008 - 05:03 PM

that's awesome, glasshopper. nice work! can the ardunio be used to trip relays for thermo and humidistats?


a script could be added in the plot software to send a data back to the arduino and turn on a fan or heater


Here is the basic setup design:
http://mycotopia.net...22&d=1209505939

The left transistor is set up to switch 5V and the right transistor is set up to switch Vin which is 12V but could be set up to switch 5V. Your setup would be determined by the coil voltage of the relay(s) you are using.

The transistors are 2N2222A and are rated at 800mA (although if you were near max you would need a heatsink). If you needed more current than that you could just use a bigger transistor.
You could also use triacs instead of a relay.


I don't have any relays but...
http://mycotopia.net...23&d=1209505939
The fan is actually on but with the flash you don't see any motion blur.

Give me a few days and I'll bang out the code and script to make this work with the temp sensors.

Attached Thumbnails

  • setup-on.jpg
  • setup01.jpg


#12 Hacxor

Hacxor

    Former Member

  • Banned Member
  • 36 posts

Posted 01 May 2008 - 12:48 PM

nice job man very innovative

#13 spacecake

spacecake

    Mycotopiate

  • Expired Member
  • 4,563 posts

Awards Bar:

Posted 01 May 2008 - 01:13 PM

:thumbup:Thanks for posting this glasshopper !

#14 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 01 May 2008 - 07:44 PM

Ok,
Here is the basic code for 2 sensors.
All I did was make the arduino shut up and also respond to commands to control pins on it.

I still need to write the script for the stamp plot software
But in the meantime you can test it with the arduino terminal
(the box with the circle over it)
T reads the temp
F turns the fan on
f turns it off
L turns the lights on
l turns them off
H turns heater on
h turns it off

Have fun and ill get you the script soon!

Attached Files



#15 kiddo

kiddo

    Haus Of GAGA Presents:

  • Expired Member
  • 200 posts

Posted 02 May 2008 - 12:08 AM

Bump^^

#16 joystik

joystik

    Mycotopiate

  • Free Member
  • 505 posts

Posted 06 May 2008 - 11:55 PM

Wow, this certainly is worth looking at. I got a few ideas where it would come in very handy. Nice work there, GH.

JoY

#17 JohnQShroomer

JohnQShroomer

    Serial Shroomer

  • Expired Member
  • 197 posts

Posted 07 May 2008 - 01:03 AM

:eusa_clap

#18 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 06 June 2008 - 11:49 AM

I have finally had some success in creating the library for the humidity sensor!
I was able to compile it without errors (after many tries). :eusa_clap

After successfully testing it, I will zip it and upload it for you good people to use.

I have not had as much luck with communicating with the sd/mmc card
(for logging data without being connected to a computer),
I have been able to send and read back raw data to the card but
I really want to use fat 32 (or at least fat 16)
so the card can be read and written to in a regular computer.
I think this would be much more useful.
Even though full fat support would just about completely fill the microcontroller chip's memory,
they are only about $4 for the chip and I was thinking about just using 2 of them
(one to handle the sensors and one just for handling the sd/mmc card).

I have found a much more elegant solution that would read & write directly to a thumbdrive
but it is also much more expensive and I really want to keep this project as cheap as possible.
I still may get one and give it a try when I can afford to make another parts order
(who doesn't love new toys :D).


Also I found a module that will allow seamless integration of blue tooth for only $50
this may be another option.

One more thing I have planed on adding a real time clock to this project for time & date stamping the data but
I forgot to buy a crystal for the chip (dough),
so until I order parts again this isn't going to happen. :horse:

Thats all for now

#19 gsmith1981

gsmith1981

    Mycophiliac

  • Expired Member
  • 2,070 posts

Posted 06 June 2008 - 01:11 PM

cant wait to see the final stages of this:thumbup:

if by then ur down to build it for the cost of parts and a fee on you end i will gladly buy

#20 Guest_Glasshopper_*

Guest_Glasshopper_*
  • Guest

Posted 06 June 2008 - 04:36 PM

if by then ur down to build it for the cost of parts and a fee on you end i will gladly buy



Sure LW Id be happy to do that, If you want just the data logging version it won't be too much longer.
But, if you want the full blown automation version it may be a while unless I get help.

I got allot more to learn before I can finish that. :teeth:




Like Mycotopia? Become a member today!