Projects/weatherstation

From Hackerspace Amersfoort
Revision as of 08:59, 31 August 2012 by R3boot (talk | contribs)
Jump to navigation Jump to search


Project Weatherstation
Name Weatherstation
Start 2011/09/01
End
Contact User:R3boot
Website https://r3blog.nl
Information An arduino powered weatherstation
Status Test"Test" is not in the list (Alpha, Beta, Production, Finished, Abandoned) of allowed values for the "Project status" property.


Using an arduino together with a couple of sensors, I've created a weatherstation. This page contains (or should contain) all required info to use and maintain this system.

Overview

This weatherstation is based on an arduino pro mini, which has seven different (mostly analog) sensors connected to it. The arduino talks to a soekris over a RS-232 line, which has been modified on the soekris side to provide +5v over a spare wire to provide the arduino with power. I've inserted an PNP transistor inline with this +5v line which is coupled to a GPIO pin on the soekris, providing remote reset functionality. The soekris runs a C application to read the data from the secondary serial port, aggregate it and distribute the aggregated values to both a file-based datalogger and graphite.

System Diagram

TBD

Source Code

The source for this system consists of two parts. One part that is running on the arduino, and one part that is running on a soekris.

Graphs

For now, there are some rudimentary graphs available on stats.bitlair.nl. This is subject to refinement and recalibration in the future. Also, the namespaces for these graphs may change. To see these graphs, follow the link below:

Bugs

The server-side code hasn't been finished yet, and sometimes segfaults. To fix this, I'm running weatherd in a while true loop until I've fixed the code. Furthermore, since weatherd doesn't startup automatically, it needs to be restarted after each reboot or poweroutage. Both zarya and myself have root rights on this box, and can run the following commands (as root) to startup weatherd:

# tmux attach

or

# tmux

followed by:

# cd ~r3boot/weatherd
# ./weatherd -v -g stats:2003:weatherstation