Weather station with the Particle Photon
The weather station records all important weather data such as temperature, humidity, air pressure, wind direction, wind speed, rainfall and soil moisture around your apiary.

Materialliste
Structure and hardware
Weather sensors
The weather station uses the Weather Meter from SparkFun. This weather sensor includes three core components: wind speed, wind direction, and rainfall.
The rain gauge consists of a rocker with two self-emptying baskets, each with a capacity of 0.011 inches of rain. When a basket is full, a button is activated. This means that only the number of pulses per unit of time needs to be determined to determine the amount of rain.
The anemometer (wind speed meter) measures the number of revolutions. With each revolution, a switch is activated. At a wind speed of 1,492 MPH, the switch closes exactly once per second.
The wind direction is determined using a voltage that changes with the wind direction due to the combination of resistors within the sensor. Up to two switches can be activated simultaneously using magnets. This allows 16 different positions to be displayed.
Soil moisture sensor
The Soil Moisture Sensor from SparkFun is used to measure soil moisture.
The two exposed pads act as probes for the sensor, changing their resistance based on soil moisture. The more water in the soil, the greater the conductivity of the pads and the lower the resistance. SIG then provides a higher reading.
The sensor must be connected to the microcontroller board (Photon or Arduino) via VCC (3.3V or 5V) and GND. SIG is connected directly to an analog input of the microcontroller board.
Soil temperature sensor
The DS18B20 temperature sensor is particularly suitable for measuring soil temperature. It is a precise and waterproof temperature sensor with 1-Wire technology. The DS18B20 delivers 9-12 bit (configurable) temperature values via a 1-Wire interface. Besides VCC and GND, only one additional connection to the microcontroller is required.
SparkFun Photon Weather Shield
The SparkFun Photon Weather Shield features a barometric pressure sensor (MPL3115A2) and a humidity and temperature sensor (HTU21D humidity). The wind direction and wind speed sensors, as well as the rain gauge, can be easily connected via two RJ11 connectors. The soil moisture and soil temperature sensors can each be soldered to three solder pads.
The Photon microcontroller board with Wi-Fi module from Particle plugs directly onto the board.
The weather station can be assembled in just a few minutes using the Photon Weather Shield.
Particle Photon
The Photon from Particle is a microcontroller board with an STM32 ARM Cortex M3 microcontroller and a Cypress Wi-Fi chip. It features 1 MB of flash memory and 128 kB of RAM. Its low power consumption makes it particularly suitable for autonomous outdoor applications.
SparkFun Sunny Buddy
The Sunny Buddy from SparkFun is a Maximum Power Point Tracking (MPPT) solar charge controller for single-cell LiPo batteries. This solar charge controller extracts maximum power from the solar cell and efficiently stores it in the LiPo battery. Connecting the solar cell to one side of the board and the LiPo battery to the other is incredibly simple. The Sunny Buddy charges the LiPo battery with a maximum of 450 mA. The recommended input voltage is between 6 and 20 V.
Solarpanel
For the weather station to operate autonomously over an extended period, a solar panel is required. The Sunny Buddy should be operated within a voltage range of 6 V - 20 V, so a 6 V or 12 V solar panel would be suitable. The required power depends on several factors (particularly solar radiation and software).
Installation and programming
The weather station uses the Particle Photon, a microcontroller board with a Wi-Fi module. Particle offers additional cloud services that significantly simplify connecting the devices to other web services, such as the cloud4Bees data server. For this project, I decided to use the Particle Command Line Interpreter (CLI). This makes working with the Photon much easier. The Particle CLI is a Node.js application for working with the Particle Photon and the Particle Cloud. The Particle CLI is used to connect the Photon to the internet and the Particle Cloud.
Install Particle CLI (Windows)
To install the Particle CLI on Windows, you must first install node.js.
1.) Go to https://nodejs.org/de/download/ and download the appropriate (32-bit or 64-bit) installation file.
2.) Double-click the .msi file to start the installation wizard. Follow the wizard's instructions.
After successfully installing node.js on your operating system, you can now easily install the Particle Command Line Interpreter:
1.) Open the Windows command prompt.
2.) nmp install -g particle-cli
Create a free Particle Cloud account
Go to https://build.particle.io/signup to create a new Particle Cloud account.
Setup Photon
1.) Connect the Photon to the PC via a USB cable.
2.) Switch the Photon to Listening Mode (LED flashes blue).
To switch the Photon to Listening Mode, press and hold the SETUP button for at least 3 seconds until the LED flashes blue.
The Photon will now wait for input for the Wi-Fi network.
3.) Open the Windows command prompt.
particle login
4.) Setup Photon
particle setup
Programming Particle Photon
1.) Download the firmware from the Github repository.
2.) Open a Windows command prompt.
3.) Navigate to the folder containing the binary file (.bin).
4.) Connect the Photon to the PC via a USB cable.
5.) Put the Photon into DFU mode (LED flashes yellow). First, press both buttons. Release the Reset button and hold the Setup button until the LED flashes yellow.
6.) Transfer the binary file to the Photon by entering the following command in the Windows command prompt:
particle flash --usb photon_1.0.1_firmware_xxxxxxxxxxxxx.bin
7.) After transferring the program, the Photon automatically reconnects to the internet and the Particle Cloud, and the program starts.