-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4dcf91
commit 4170c5d
Showing
49 changed files
with
367 additions
and
26 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,118 @@ | ||
# IoT Case 06: Weather Station | ||
|
||
## Introduction | ||
Level: ![level](images/level2.png) | ||
|
||
## Goal | ||
<HR> | ||
Make a weather station which gets the values from the raindrop sensor, temperature and humidity sensor. The data will be sent to IoT platform - ThingSpeak.<BR><P> | ||
|
||
## Background | ||
<HR> | ||
|
||
<span id="subtitle">What is Thingspeak?</span><P> | ||
ThingSpeak™ is an IoT analytics platform service which provides instant visualizations of data posted by your devices to ThingSpeak. In this case, we will use this platform to update our data to plot instant graphs. <BR><P> | ||
|
||
<span id="subtitle">Weather station operation</span><P> | ||
Collecting temperature, humidity and raindrop consistently and uploading the data by using Thingspeak. This can help us to do analytical work more conveniently as we can refer to the automatically plotted graphs. <BR><P> | ||
|
||
## Part List | ||
<HR> | ||
<table><tr><td> | ||
Electronics: | ||
<ul display='inline-block'> | ||
<li>micro:bit X1</li> | ||
<li>Smarthon IoT:bit X1</li> | ||
<li>OLED X1</li> | ||
<li>USB Wire/Battery Holder </li> | ||
1. Temperature and humidity Sensor (With Module wire)<BR> | ||
2. Raindrop Sensor (With Module wire)<BR> | ||
</ul> | ||
</td></tr> | ||
|
||
<tr> | ||
<td>Model: | ||
<ul> | ||
<li>House Model H1-H2 X1</li> | ||
<li>M4 Screw X4</li> | ||
<li>M4 Nuts X4</li> | ||
</ul> | ||
</td></tr> | ||
<tr><td>Equipment: | ||
<ul><li>ScrewDriver X1</li></ul></td></tr></table> | ||
|
||
![auto_fit](images/Case6/Case6_001.png)<P> | ||
|
||
## Practical operation | ||
<HR> | ||
|
||
<span id="subtitle">Step 1</span><BR><P> | ||
Attach the raindrop sensor to H2 model.<BR><P> | ||
![auto_fit](images/Case6/Case6_002.png)<P> | ||
<span id="subtitle">Step 2</span><BR><P> | ||
Attach the temperature and humidity sensor to H2 model.<BR><P> | ||
![auto_fit](images/Case6/Case6_003.png)<P> | ||
<span id="subtitle">Step 3</span><BR><P> | ||
Put together all the cardboard parts (H1-H2).<BR><P> | ||
![auto_fit](images/Case6/Case6_004.png)<P> | ||
|
||
## Hardware connect | ||
<HR> | ||
|
||
Connect the Raindrop Sensor to P0 port of Smarthon IoT:bit<BR><P> | ||
Connect the Temperature and humidity Sensor to P2 port of Smarthon IoT:bit<BR><P> | ||
![auto_fit](images/Case6/Case6_005.png)<P> | ||
|
||
## IoT (ThingSpeak) | ||
<HR> | ||
|
||
<span id="subtitle">Step 1</span><BR><P> | ||
Go to https://thingspeak.com/, Choose Channels -> My Channels -> New Channel<BR><P> | ||
![auto_fit](images/Case6/Case6_006.png)<P> | ||
|
||
<span id="subtitle">Step 2</span><BR><P> | ||
Input Channel name, Field1 and Field2 , then click “Save Channel”<BR><P> | ||
* Channel name: Smart Weather Station | ||
* Field 1: temperature | ||
* Field 2: humidity | ||
* Freld 3: raindrop | ||
|
||
<span id="subtitle">Step 3</span><BR><P> | ||
Select your channel > “API Keys” ,copy the API key as follows:<BR><P> | ||
![auto_fit](images/Case6/Case6_007.png)<P> | ||
* For more details, please refer to 2.1. Create channel in ThingSpeak and get the key | ||
|
||
## Programming | ||
<HR> | ||
|
||
<span id="subtitle">Step 1</span><BR><P> | ||
Drag on start block from Basic. Drag Initialize WiFi IoT:bit and OLED from WiFi IoT:bit and set WiFi to ssid “wifi_name” and pwd “WiFi_password”.<BR><P> | ||
![auto_fit](images/Case6/Case6_008.png)<P> | ||
<span id="subtitle">Step 2</span><BR><P> | ||
Set variable temperature, humidity and raindrop to 0.<BR><P> | ||
![auto_fit](images/Case6/Case6_009.png)<P> | ||
<span id="subtitle">Step 3</span><BR><P> | ||
Drag forever block from Basic. Snap if statement into forever. If WiFi is connected then, set humidity and temperature to get humidity and temperature values from DHT11 at Pin P2. Also, set raindrop to get raindrop value (percentage) from raindrop sensor at Pin P0.<BR><P> | ||
![auto_fit](images/Case6/Case6_010.png)<P> | ||
<span id="subtitle">Step 4</span><BR><P> | ||
Show string Temperature, humidity and raindrop on the OLED by using join from text.<BR><P> | ||
![auto_fit](images/Case6/Case6_011.png)<P> | ||
<span id="subtitle">Step 5</span><BR><P> | ||
Drag Send Thingspeak with key (paste thingspeak key) from WiFi IoT:bit.. Set field 1 to temperature, set field 2 to humidity and set field 3 to raindrop.<BR><P> | ||
![auto_fit](images/Case6/Case6_012.png)<P> | ||
<span id="subtitle">Step 6</span><BR><P> | ||
Pause for 11000ms after sending data to Thingspeak.<BR><P> | ||
![auto_fit](images/Case6/Case6_013.png)<P> | ||
|
||
## Result | ||
<HR> | ||
|
||
When micro:bit is connected to WiFi, it will check weather information (temperature, humidity from Temperature and humidity Sensor and raindrop from raindrop sensor). Then, those data will be sent to ThingSpeak and pause for 11 seconds for another update.<BR><P> | ||
![auto_fit](images/Case6/Case6_014.png)<P> | ||
We can find three graphs on Thingspeak including temperature, humidity and raindrop (field1, field2, field3) respectively by collecting data using different sensors.<BR><P> | ||
![auto_fit](images/Case6/Case6_015.png)<P> | ||
|
||
## Think | ||
<HR> | ||
|
||
Q1. How can we upload other module values (i.e. noise) to Thingspeak?<BR><P> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.