Computing Projects
Weather Station System Description
Designed by Mark Little
Linux Information
Linux - Wikipedia

Fedora - Operating System

Raspbian - Operating System

SourceForge - Software
Arduino Description
Linux Description
The Weather Station Extension provides a relatively cheap method of adding additional meteorological sensors to a Personal Weather Station (PWS), or to form a stand alone measurement system. The Weather Observation Extension project seeks to add a number of sensors that can be used locally, and/or uploaded to various weather websites.

Overview

Sensors
Arduino Sensor Controller
Mains Power Relays

Operation

A local operator can select the sensors to be viewed on the Liquid Crystal Display (LCD) using the  16-key keypad. This can happen independently of the commands that may be coming from the host computer via the USB serial port.

The LCD backlight can be turned off and on by pressing the "#" key. It is also possible to force the relays off and on via the keypad in case immediate action is needed to turn off the items connected to the keypad. It should be noted that these commands can interact with the commands that may be coming from the host computer.

The description below deals with the automated transactions between the Host COmputer (Linux server) and the Arduino.
Linux Server
Arduino Sensor Controller
Commands
The Host Computer sends requests for sensor data to the Arduino on a periodic basis (generally every minute). Because of the limited memory in the Arduino, the Host makes sure that it does not send too many commands too quickly, as this will overflow the Arduino's receive buffer. Having said that, sending the next command does not require a response to the previous command, as the sending of commands and the reception of readings are not synchronous.
Arduino Sensor Controller
When the Arduino receives a complete command (string bounded by "<" at the start and ">" at the end), that command is processed. If the command is valid, the sensor is interrogated (or if a command, acted upon). The response time varies with the type of sensor being interrogated, and how many are being interrogated in the same command.
Mains Power Relays
Sensors
Commands
Linux Server
Responses
Arduino Sensor Controller
Once the sensor has been read, the sensor reading(s) are returned as a text string that mimics the command message, but with the reading(s) appended to the message. Like the command message, the response begins and ends with "<" and ">" respectively. As stated earlier, the response is not synchronously interleaved with the incoming commands. The Host does not expect sensor messages to be returned in this way and if it does not receive a sensor reading within a certain period, it will re-issue the command. If a response does not occur within a period, the sensor reading will be skipped,
MySQL Database
Linux Server
MySQL Database
Once the sensor readings have been received, the Host will write those values to the MySQL database on the Host for later use. Where a reading could not be obtained from the Arduino, the reading is written to the database as a NULL to indicate that an error has occurred.
Linux Server
Linux Server
MySQL Database
Once the sensor readings have been placed in the database, another program will send the readings to a selection of Internet weather sites, such as the WOW and Weather Underground. It can also be used for on-line queries on the local webserver.
Project Home Page
Web Server