With wind and rainfall data you can estimate how much moist the soil is and you can decide whether your garden needs to be watered or if the rain shower was good enough. The Core Module which is the brain of Weather station also measures temperature.
The online weather prediction is not always accurate to your exact location so with this weather station you can get better idea what is the weather like.
The weather station assembly can be ordered at SparkFun. Czech e-shop has all the parts separately too, and you can also google for:
Rainfall sensor Misol WH-SP-RGWind direction sensor MISOL WH-SP-WDWind speed sensor Misol WH-SP-WS01
Here is the datasheet of the weather station.
Step 1: Build HARDWARIO IoT Kit HardwareStack the HARDWARIO IoT Kit modules on top of each other. Start with a Mini Battery Module and build other modules on top of it. It does not matter on the order which you stack modules on top. HARDWARIO IoT Kit is designed to connect the modules the way you like.
Just be careful that the pins of the other module goest to the Mini Battery Module thru the yellow PCB. You do not damage anything, it just won't work :)
You can cut the wires from the weather station's RJ11 connectors and wire them directly to the screw terminal which comes with Sensor Module. But I would suggest to find some RJ11 jacks and solder wire to them. It is also better in case you thread the cables through the water-tight bushings so you can always disconnect them.
RJ11 connectors can be salvaged from old phones or DSL modems. It is also possilbe to use RJ45 connector and "ignore" the outer 2 pins. I have each of both worlds :)
This is the wiring diagram of both RJ11 connectors
The colors in the image does not match colors on the cable. Correct colors are:
Wind speed - RED (GND), YELLOW (input A)
Wind direction - BLACK (GND), GREEN (input B)
Rainfall - RED (GND), GREEN (input C)
Desoldering of the resistors in the picture below is not needed. All Sensor Modules now have the support for channel C by default.
Wind and rainfall RJ11 connectors
All the hardware
Download HARDWARIO Playground multiplatform GUI tool to your computer. This tool can flash firmware and also contains other features like MQTT and Node-RED with dasboard. You can run and follow this tutorial with the HARDWARIO Playground on your computer. Or you can install prepared HARDWARIO IoT Kit Hub Raspberry Pi image to your SD card. Follow instructions in the docs.
You can also install all the tools to your existing raspbian which is explained in this article.
- Connect Core Module to your PC and wait until the FTDI driver is installed
- Run the HARDWARIO Playground
Go to the Firmware tab and write "wind" to the firmware textbox to filter firmwares, choose bcf-radio-wind-and-rain-station firmware.
- Choose the correct serial COM port and press "FLASH FIRMWARE" button
- After flashing, the Core Module will turn on red LED for 2 seconds
- See troubleshooting section or visit HARDWARIO forum If something goes wrong
The Radio Dongle comes pre-flashed but we suggeest to update it to the latest version. Disconnect the Core Module, connect Radio Dongle and flash it with bcf-gateway-usb-dongle firmware
This step with Raspberry Pi is optional. You can continue using the HARDWARIO playground application that also contains Node-RED (in the Functions tab) and Dashboard. But the weather station and Dashboard will work only when your computer is powered-on and connected to your local network.
Download and copy the bc-raspbian to the micro SD card. You can also install the services manually on clean Raspbian or run them on any Linux single board computer. Follow this documentation.
You can also order completely prepared HARDWARIO IoT Kit Hub with Radio Dongle and microSD card that has already bc-raspbian installed and pre-configured for you.
After flashing, put the card to the Raspberry Pi, plug-in the Radio Dongle, connect network cable and power cable, boot the Rpi up.
You can connect to the HARDWARIO IoT Kit Hub, open in your browser page.
hub.local
in case you used bc-raspbianraspberry.local
in case you installed tools on clean Raspbian- By typing IP address or the Raspi
Detailed documentation of this step is in the documentation.
Step 5: PairingConnect Radio Dongle to Raspberry Pi and then power-up the Raspberry Pi.
If you use your laptop and HARDWARIOPlayground, connect Radio Dongle to your computer and in Devices tab choose the dongle and click Connect.
You need to pair Weather Station Core Module with Radio Dongle:
- Disconnect power (USB and Battery Module) from the Weather Station Core Module
- Go to the Devices tab and click Start Pairing
- Power on the Weather Station Core Module by plugging in batteries
- The newly paired device will appear in the table
- Click Stop Pairing
Check that you have the same "wind-station:0"alias of the module, it has to be the same because we use that name later in MQTT topics. You can rename the node to the right name.
If you switch to the Messages tab you will se incoming MQTT messages from the weather station. Data are send 20 seconds after power-up, then every 15 minutes.
node/wind-station:0/wind/speed/maximal 1
node/wind-station:0/wind/direction/degrees 0
node/wind-station:0/battery/mini/voltage 3.07
node/wind-station:0/thermometer/0:1/temperature 7.38
node/wind-station:0/rainfall/interval/mm 0.00
node/wind-station:0/rainfall/total/mm 10.06
Step 6: Add Dashboard FunctionNow we add the function to read data from Weather Station.
Switch to the Functions
tab whre the Node-RED is and in the top-right menu select Menu > Import > Clipboard
Copy and paste the text from node-red-flow-import.json file. Press Import. You will see something like this.
PressDEPLOY in the top-right corner to apply changes.
You have to press DEPLOY button every time you do changes to the flow to apply your edits.Step 7: See Data
Now switch to the Dasboard tab and see the data coming.
First data are send 20 seconds after power-up, then every 15 minutes.
You can install Openweathermap plugin to the Node-RED and display also weather forecast in the Dashboard.
The Core Module has also button, accelerometer and temperature sensor. You can edit the original source code and extend functionality. If you place it on a gate, you can monitor opening the gate just with accelerometer.
You can also connect Climate Module and measure humidity and air pressure.
External temperature can be measured also with a single or multiple 1-Wire DS18B20 temperature sensors.
You can also easily add Sigfox or LoRa Module and send data using these LP-WaN networks. There already exists a firmwares with same or similar functionality. Radio summary and example projects can be found on developers portal.
See also other HARDWARIO projects on Hackster.io or on their website
- Door Sensor project
- Radio Button Project
- Check out other HARDWARIO projects.
- Take a look at the Module Overview.
- Learn about MQTTand HARDWARIO IoT Kit MQTT topics to control LEDs and relays.
- Try other integrations with Grafana, Blynk, IFTTT, Ubidots and others.
- Use your Raspberry PI or other single board computer (SBC) as a server.
- Flash other firmware or write your own firmware for the Core Module.
- Check the Core Module pinouts and add your own buttons, relays and sensors.
Comments