28 July 2010
A link to the sister post documenting the hardware configurations I’ve tested for Pachube and Arduino web service data logging. Tests Seeeduino and DFRduino clones with the Official Ethernet Shield and the DFRobot Ethernet Shield.
25 July 2010
Logging the data to the internet, via Pachube feed 8281.
15 June 2010- New improved circuit, better readings
>> new files (code/fritzing)
- This circuit layout is wrong!! Do not follow
- Arduino and Robotics Supplies in Australia.
Temperature calculation for voltage of board (vB), analog output (a), voltage divisor (vd), millivolts (mV), kelvin (k) and celcius (c).
vB = 4.955
a = analogOutput
vd = 1024/vB
mV = a/vd
k = mv/10
c = k – 273.15
One problem seemed to be my calculations using the assumption of Arduino’s board voltage of 5v. This is true when using the external power, however powering an Arduino Mega with the USB only resulted in a board voltage of 4.79 v. (AREF and 5V out)
The sensor is hooked up backwards!
28 November 2008 – USB Temperature Sensor with Arduino and LM335
- Updated Jun 5 ,2010- SerLCD 2.5 and Arduino 0018 Sketches and Video
- Repost from Nov. 28, 2008 on MOFIB.org (transferring for archival purposes)

–> Processing sketch for (standard firmata arduino 0018)
–> Arduino 0018 sketch
–> SerLCD 2.5 with LM335A Arduino 0018 Sketch (do not upload with SerLCD hooked up to TX pin! It may corrupt the module memory.)
Here is a recent experiment I’ve done with making a cheap temperature sensor connected to my MAC. The sensor itself is quite cheap to make (the orange board), the sensor IC is about 3 dollars, and the rest are some wire jumpers, a 2k trim potentiometer and a resistor. Total cost about $8-10 and some free time.
What you see the temperature board hooked up to is an Arduino, a cheap USB i/o controller available from Sparkfun electronics. I can control about 10 analog inputs (one is being used to monitor the voltage of the temperature sensor) and 10 or so 5V outputs that I monitor/switch from the computer. The neat thing about getting this interfaced to an i/o board is I can use the temperature data to switch devices, sound alarms, etc.

Here is a screenshot of the software. Basically, the temperature sensor takes an input of 5v, and will output a voltage at +10 mV/ Kelvin, which can be easily converted to Celcius as seen in the software. The sensor turns out to be quite accurate and highly responsive — I can breath on the sensor lightly and detect a minute temperature change. Right now it is obviously not waterproof, but that is easily solvable with some heat shrink tubing (this is actually recommended in the IC datasheet by the manufacturer for making waterproof temp. sensors!)

A diagram of the board, and all the parts used. I’m happy to explain how the Arduino board works to any interested, and code examples are available for the brave hearted.
Awesome!
Could you post the actual schematic, just so it is more clear, how the connections on the test board were made.
Also, how cheap is Arduino? Do you know if it is available worldwide?
Is there something similar for digital input/output? I see so much potential use for this gizmo it is mind boggling. ![]()
Also, do you know, how accurate are the readouts from Arduino?
Thanks!
Andy
Andy, the Arduino boards are about $30 USD, I have one I brought from the US from Sparkfun electronics, and I’ve also purchased another one here in Australia (thats why you see two, my temp sensor actually only uses one, but I was playing with getting the two to talk when I took the pictures). They are fairly popular among the physical computing community so you should be able to find them quite easily; if you don’t have any in your country I’m sure you could find an international shipper.
The Arduino board has 13 digital in/out pins that can be used either way, and 6 analog inputs. Each digital pin can also be used for serial TX or RX, and two digital pins are also available for hardware serial TX/RX. Lots more information on these boards is available on the Arduino.cc website. Great little boards and I love them to death.
Your question about accuracy– the accuracy would be as good as your sensor. The temperature sensor I’ve build here depends on the trim pot to make a calibration, which is only as good as the thermometer I’m calibrating to. What I read from my analog input is an integer value from 1-1024, which I’m assuming 1 = 0v and 1024 = 5v in my calculations. I then convert the number to volts, then to kelvin, then to celcius. You can see the original 1-1024 reading as “raw” in my software.
Here is the schematic I used from the LM335Z Temperature Sensor PDF. The trim pot used is actually 5k (10k works, but I found 5k is actually better for the 5V load you get from the Arduino), and the R1 resistor is 2k. Find the LM335z from Mouser or some other electronics supply. I can buy them from my local electronics shop they are that common.



























I would like to know what software application you are using to display the values sent by the Arduino. I am a newbie at all of this and understand the wiring, programming and logic but have not been able to come up with a display app without going to a full blown data acquisition program.
Thanks
Don
Hi Don- the screenshot above is a Processing app. The code is very similar to the Arduino sketch attached in Fritzing above, however I believe Processing does not allow for serial communication (so the SerLCD bits of the code will not work).
You should be able to reuse my analog output to celcius conversion calculation.
I recommend downloading Processing and giving it a try with the initial sketch “Controlling the Sizes of a circle with A Potentiometer”. You’ll find it.
Yep, I found it and have installed it on my MacBook Pro. Now, I just have to figure it all out–that’s the fun part.
Don
Thanks for posting your continued progress with this project. I really like the Pachube idea and plan to use it to post 3 inputs to my web page. (www.canyontraders.com) I don’t know for sure how this will work but am certain there is a way. I may look up your Pachube node and see how the addressing is arranged.
Don
Hello,
I set up a test page on my web site and included a feed from your Palchube #8285. It works very well when addressed with my MacBook Pro and Safari but on my MXP with Firefox machine the logo appears but no data. I downloaded the latest IE version and again no data. Wonder what gives here.
I plan to set up a Pachube feed of 3 or 4 data streams including temp, humidity, wind speed and tank level here. It looks like I will first feed from my state. (Not a big deal but interesting.)
I will post my progress on this site.
TNX
Don
Don
I’ve found pachube quite easy to use. If you have the official arduino ethernet shield , upload the “simple” sketch from the pachube arduino tutorial.
So far I have not gotten the recommended watchdog timer method to work (using a hacked bootloader from lady Ada)
The easiest way to embed the charts in your website is to use the ones generated by pachube (click embed on the feed page next to a graph).
With this method you should be able to use any browser that can display pngs.
Also I have successfully used XML http request to display Ajax readings from my pachube 8281 on a web page–another topic I can elaborate on if you are interested. That’s the beauty of using web services!
What temp sensor are you using?
Also don- my feed is 8281 not 8285
Hope this helps- happy to help further.
O.K.
You have inspired me to use an Arduino 2009 but I am going to be using XBee wireless devices for communication. I plan to pass the data off to Pachube and was testing the system. I used your feed #8285 for the test. It works well with Safari on my OS-X system but on my MXP box only the Pachube logo shows up and no data. (Firefox browser.) I tried IE with the same results.
My plan is to use a LM335AZ temp sensor and a 7 psi differential pressure transmitter. I have a HIH 4000 humidity sensor as well but have not investigated what is needed for it. My temp sensor is presently installed in a Blue Earth 80C32 microcontroller and works very well. I read F, C, K and raw volts. I also can vary the averaging samples up to around 35 and read any of the 10 analog channels. It is a slick little device. I think they are history now.
So, to summarize, I am just beginning to put the hardware together and am experimenting with the software like Pachube. It’s fun to do this stuff.
Don
Don-
Please keep me updated on you progress, always keen to hear about similar initiatives. Will you start a blog post for this?
Chris
Sorry I mistyped the feed #. I have been using 8281.
I found the problem with the feed on the MXP box. I recently had a virus that totally crashed the machine and I had to reload XP. I use this box only for hobby stuff like controllers and radio interfacing. When I reconstructed the OS I did not load Java and the JRE. That is why the MacBook Pro was receiving your feed well but the XP box was hanging up. I downloaded Java last night and bingo! it works.
I have indeed set up a blog on WP. My user name is Cantrade and there is an introductory post there now. I’m not sure how rapidly this project will progress–we are going to have out of town guests for a few days and when that happens things get shelved. Also I have not received my purchases yet from Adafruit but they should get here today. I plan to use their adapter board for the XBee devices.
Thanks for the reply.
Don
Chris,
Take a look at my blog here:http://cantrade.wordpress.com/
I have been getting some success. Photos show the breadboard wiring and I will clean up the system when I know it is working well.
This stuff is fun!!
Don
thnx for the information
Are you using ATMega328?
On one of the drawings you said, x10^(-6) is nano, i’m sure that nano is x10^(-9), and micro is x10^(-6).