Go Down

Topic: Temperature & Humidity Webserver with Chart (A (Read 4023 times) previous topic - next topic

sssz3

Dec 08, 2010, 08:42 pm Last Edit: Dec 08, 2010, 08:47 pm by sssz3 Reason: 1
Not soo spectacular like other projects, it's just a SHT10 temperature and humidity sensor + a ethernet shield attached to the arduino.

Temperature is logged for 48h and displayed in a chart.

The webserver and webpage is (besides of the chart) fully on the ardunio. The text basically says the temperature and the humidity, these are real-time-values.

The chart is generated in real-time with the help of google chart api.
If the chart is empty, I just restarted the arduino (cause I dont store the values in eeprom yet.) - please wait some hours and do a refresh...

It's mainly a proof of concept to use external web resources with the arduino.

Click on the link to see... (redirected by dyndns...)

http://huepf.hopto.org

Thanks for watching....
-sssz3

designer2k2

http://www.designer2k2.at

zoomkat

Below is the chart that is produced from the data sent by the arduino:

http://chart.apis.google.com/chart?chxr=0,15,25|1,0,48&chxs=0,676767,11.5,0,lt,676767&chxtc=0,10&chxt=y,x&chs=480x280&cht=lc&chco=3072F3&chds=15,25&chd=t:20.86,20.92,21.05,16.65,19.28,19.05,19.04,18.96,18.87,18.86,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00&chdl=24h-Temp&chdlp=b&chg=10,15&chls=2&chma=5,5,5,25&chtt=Temp
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

sssz3

Hi,
my son stumbled over the network cable, and it got pulled out ^^.

Right, you can feed the google chart api with some measurement values and formatting data, and you will get back an image with the charted measurement data, which would hardly fit into the memory of the arduino.

It is also possible to send the data to a web server ( like here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268145499
), but I wanted an arduino as webserver  ;)

sssz3

#4
Dec 12, 2010, 08:30 pm Last Edit: Dec 12, 2010, 08:39 pm by sssz3 Reason: 1
Unfortunately I can't edit my old posts....

I have a small bug in the code, so if the link above does not work, here is a screenshot of the actual arduino-generated webpage:



Besides that, the absolute accuracy of the temperature (SHT10 sensor is calibrated) is +- 0,5°C, which is quite good compared to other, uncalibrated sensors, and for humidity it is 4,5 %RH (absolute, not 4,5% relative). I just like this sensor, it gives digital values already, no need to convert analog to digital data. However, it can reside on a I2C bus, but doesn't "speak" I2C, unfortunately. However, for the arduino, there is a library fortunately..

Marc Brughmans

Just received my ethernet shield today.
I would like to do the same thing as you, just with a temperature sensor LM35.
I used pachube ( with laptop, no ethenetshield)
Is it possible to see your code, because i am a newbie.
Many thanks

Marc

GordonEndersby

sssz3,
Very nice.

This might be useful to you.

Ive got something similar but had to deal with negative numbers as I had a temp sensor outside in the winter.
Google charts arnt great at negative values in charts but you can set a few values in the query string and get something to work.
Heres a reasonable description.
http://www.kryogenix.org/days/2007/12/08/negative-numbers-in-the-google-chart-api
You have to move the base line and add an offset to your y values.

And what Ive done with the info.
Mine is off line at the moment so heres the basic url with a few negative values added.
There are 2 sensors so 2 lines in the graph. Ive added a few negative values onto the internal sensor line.
I keep 24 hours worth of data. Theres no clock on it so the x axis is numbered for hours back from now.
http://chart.apis.google.com/chart?cht=lc&chs=400x300&chd=t:50.00,40.00,45.00,46.00,47.00,45.00,50.00,55.00,56.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,73.81|50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,50.00,53.00&chco=FF0000,0000FF&chdl=Int|Ext&chxt=x,y&chxl=0:|-24|-23|-22|-21|-20|-19|-18|-17|-16|-15|-14|-13|-12|-11|-10|-9|-8|-7|-6|-5|-4|-3|-2|-1|1:|-50|-40|-30|-20|-10|0|10|20|30|40|50&chg=0,50,1,0

Gordon

Go Up