Pages: [1]   Go Down
Author Topic: temperature logger  (Read 2189 times)
0 Members and 1 Guest are viewing this topic.
germany, cologne
Offline Offline
Newbie
*
Karma: 1
Posts: 47
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My project is a temperature logger with some nice specials.

The facts:
- 2 temperature sensors (DS18B20+) for indoor and outdoor
 -saving every hour the outdoor temperature => 24 measurements a day
- Memory expansion with an EEPROM 24LC256 (recording over 3 months for 2400 measurements)
- A real-time-clock (DS1307)
- LCD (2x16)
- 3 switches/push buttons to navigate through the menu (start/stop, setting clock, overview screen 1-3)
- Communication via USB-Port to PC
  * to transfer the data from the Arduino to a self-programmed c#-program
  * to save it on harddrive (*.tlg –files)
  * to show it as graph on the screen

I needed over 11 months to realize this project. But it was worth while. Few things are to do.

To do:
- Debugging sketch and C#-program (killing some not used variables)
- Put it in a nice case (done – but no picture).

Thanx to all the people wich developed some libraries (lcd, DS18B20, 24LC256, DS1307) and to the people of this forum. You were a great help!

Pictures: Some label are in german.

You can see all pictures in a higher quality at:
http://www.flickr.com/photos/52602591@N03/sets/72157624627760898/

The sketch and the C#-code will be published, as soon as debugging is finished.

Pictures:

3D-View for a better overview, cables are not showed


Real-view – how it looks real


the c#-program “simple serial”


schematic diagram
Logged

Dresden, Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 15
constantly learning
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, i really like your system !

It´s nice that you can graph the data on the Computer. How did you get the data there? How is it stored?
Maybe you can make a short video introduction to show some features of the display/pushbuttons.

I´m reading 8 DS18B20 at the moment and i store the temperatures in a MySQL-Database.
I will graph the data with a php library, but i could also download the database and graph it in an separate program like yours. That would be awesome smiley-wink

Keep up the good work!
                                          Jan
Logged

germany, cologne
Offline Offline
Newbie
*
Karma: 1
Posts: 47
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi jfkreuter,

here is the structure how the records are saved in the EEPROM and how they will send to the c#-program.

The DS1307 sends the temperature as a float. To save memory and to make the serial communication easier, I convert it to an integer (HIGH-Byte – Number before point / Vorkomma – LOW-Byte – Number after point / Nachkomma). To distinguish between positive and negative values I use the highest bit of the HIGH-Byte. If it is 1 then it is a negative value.

If you have more questions, you can send me an email. (Gerne auch in Deutsch)  smiley-wink

[size=14]EEPROM structure[/size]
Code:
Byte      Description
0      Seconds (Init time)
1      Minutes
2      Hours
3      Day
4      Months
5      Years
6      Free
7      Free
8      Counter records HIGH-Byte
9      Counter records LOW-Byte
10      1. Record (hour of record
11      1. Record (Number before the point) – Vorkomma
12      1. Record (Number after the point) – Nachkomma
13      2. Record …
14      2. Record …
15      2. Record …
[…]
7200      100. Record …

[size=14]Serial communication
[/size]

C#-program
   Sending “D”

Arduino
   Recognizes command “start sending data to PC”
   Sending 8 Bytes
Code:
Byte      Description
0      Seconds
1      Minutes
2      Hours
3      Day
4      Months
5      Years
8      Counter records HIGH-Byte
9      Counter records LOW-Byte
  Waiting

C#-programm
   Sending “W”

Arduino
   Recognizes command “send next data”
   Sending 3 Bytes
Code:
Byte      Description
0      1. Record (hour of record)
1      1. Record (Number before the point) – Vorkomma
2      1. Record (Number after the point) – Nachkomma
  Waiting to command “W” or end of transfer, if no data left.

Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you able to share your c# code for the serial comms and the graphing, as I would like to use that sort of thing for testing and graphing data coming out of my arduino - I could see that being very handy for a number of projects, just to graph data and easily send fixed data to the arduino.

Thanks
Logged

Sydney, Australia
Offline Offline
Full Member
***
Karma: 3
Posts: 230
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice! What did you use to produce the 3D model?


Cheers,
Logged

Is life really that serious...??!

Offline Offline
Full Member
***
Karma: 1
Posts: 200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
the sketch will be interesting to look at.

Any chance of a youtube video of the menus/switches in action?.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 75
Posts: 7272
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice project! Yeah, how did you make your 3D model of your board and how long was your shown data? Very rapid change in temperature I'd say. Your area is not comfortable. Did the temperature sensor get exposed to the sun and have a black coating? That could change reading quite a bit.

By the way, your LCD seems to have one row of 16 connectors but your 3D drawing shows two rows.
« Last Edit: August 05, 2010, 02:24:44 pm by liuzengqiang » Logged


germany, cologne
Offline Offline
Newbie
*
Karma: 1
Posts: 47
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the sketch will be interesting to look at.
Comes as soon as possible - after debugging.

Quote
Are you able to share your c# code for the serial comms and the graphing
No problem. But first debugging  smiley-wink

Quote
Yeah, how did you make your 3D model
I use the open source software blender
http://www.blender.org
It was the easiest way for me. Cause I do 3d-Animation since a long time. The "problem" is that you have to design every part.

Quote
how long was your shown data
over 3 month, every day has 24 measurements.

Quote
Very rapid change in temperature I'd say.
It only seems so. Cause the graphics shows the hole 3 month. On the left side you have look to the measurements per hour.
But by the way, for Testing I didn´t use the best place.

Quote
By the way, your LCD seems to have one row of 16 connectors but your 3D drawing shows two rows.
Two rows of 8 connectors. That´s right.

Logged

Odense
Offline Offline
Jr. Member
**
Karma: 1
Posts: 60
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

If you use eagle for sch and pcb, you can use eagle 3d to make a 3D pic. of the pcb.
Logged

germany, cologne
Offline Offline
Newbie
*
Karma: 1
Posts: 47
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi alm7100,

you´re right. But I was too lazy to install eagle.  smiley-wink So it was faster and easier for me to do it with blender. But eagle will find his way on my pc in the next weeks.
Logged

Pages: [1]   Go Up
Jump to: