Skip to content

Commit f8fe995

Browse files
committed
Moved introduction
1 parent 0f597d4 commit f8fe995

File tree

5 files changed

+53
-33
lines changed

5 files changed

+53
-33
lines changed

5-Show/readme.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# Show
22

3-
In [previous section](../4-Measure) I have shown how to use an inexpensive digital humidity sensor DHT22 with ESP8266 to measure relative humidity. We have been displaying humidity values in Serial Monitor of Arduino IDE.
4-
5-
Now it is time to do next step and use ESP’s Wi-Fi functionality and show humidity values in a web browser. I am really excited to show you that, since it provides freedom to get our measurements online and shown them to the whole world!
6-
7-
Such functionality is also fairly easy to complete. There is an example sketch available in Arduino IDE that demonstrates how to set up a simple web server on an ESP. We will use it to serve a web page with humidity measurement that we or anybody else can open in a web browser :sunglasses:
8-
9-
Let us get started!
10-
113

124
## Table of Contents
135

6+
* [Introduction](#introduction)
147
* [What You Need](#what-you-need)
158
* [Setup Web Server](#setup-web-server)
169
* [Test It](#test-it)
1710
* [Next Step](#next-step)
1811

1912

13+
## Introduction
14+
15+
In [previous section](../4-Measure) I have shown how to use an inexpensive digital humidity sensor DHT22 with ESP8266 to measure relative humidity. We have been displaying humidity values in Serial Monitor of Arduino IDE.
16+
17+
Now it is time to do next step and use ESP’s Wi-Fi functionality and show humidity values in a web browser. I am really excited to show you that, since it provides freedom to get our measurements online and shown them to the whole world!
18+
19+
Such functionality is also fairly easy to complete. There is an example sketch available in Arduino IDE that demonstrates how to set up a simple web server on an ESP. We will use it to serve a web page with humidity measurement that we or anybody else can open in a web browser :sunglasses:
20+
21+
Let's get started!
22+
23+
2024
## What You Need
2125

2226
To implement this part of project you will need the following:

6-Chart/readme.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Chart
22

3-
I think that development of applications for ESP8266 has been made really easy to everybody. This is thanks to [ESP8266 core for Arduino](https://github.com/esp8266/Arduino) developed by [Ivan Grokhotkov](https://twitter.com/i_grr) and [esp8266/Arduino](https://github.com/esp8266/Arduino/graphs/contributors) team. In [previous section](../5-Show) I have shown how easy it is to present measurements online with just couple of simple modifications to existing example sketch.
4-
5-
In this section I would like to make another step - push data to the cloud and present them online on a chart.
6-
7-
![A sample humidity control chart](pictures/humidity-control-chart-1.png)
8-
93

104
## Table of Contents
115

6+
* [Introduction](#introduction)
127
* [Emoncms](#emoncms)
138
* [Setup](#setup)
149
* [Push](#push)
@@ -18,6 +13,15 @@ In this section I would like to make another step - push data to the cloud and p
1813
* [Next Steps](#next-steps)
1914

2015

16+
## Introduction
17+
18+
I think that development of applications for ESP8266 has been made really easy to everybody. This is thanks to [ESP8266 core for Arduino](https://github.com/esp8266/Arduino) developed by [Ivan Grokhotkov](https://twitter.com/i_grr) and [esp8266/Arduino](https://github.com/esp8266/Arduino/graphs/contributors) team. In [previous section](../5-Show) I have shown how easy it is to present measurements online with just couple of simple modifications to existing example sketch.
19+
20+
In this section I would like to make another step - push data to the cloud and present them online on a chart.
21+
22+
![A sample humidity control chart](pictures/humidity-control-chart-1.png)
23+
24+
2125
## Emoncms
2226

2327
There are several cloud services that you can use for such purpose. I am pretty familiar with [ThingSpeak](https://thingspeak.com/) and [Emoncms](http://emoncms.org/) and will refer to them.

7-Control/readme.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
# Control
22

3-
In [previous section](../6-Chart) I have presented how to show your measurements online using Emoncms.org that is powerful web application for logging and visualizing data. We need such data for analysis of performance of our humidity control system. We do not have this system operating yet, but we are just there. In this section I would find a demonstrate how to control our humidifier, so we can then remotely switch it on and off depending on current humidity value.
4-
5-
To do so you will need the following hardware used in section [Measure](../4-Measure/) and in addition:
6-
7-
* RF433 transmitter
8-
* RF433 socket
9-
103

114
## Table of Contents
125

6+
* [Introduction](#introduction)
137
* [Select RF Socket](#select-rf-socket)
148
* [Install Library](#install-library)
159
* [Connect Components](#connect-components)
@@ -21,6 +15,16 @@ To do so you will need the following hardware used in section [Measure](../4-Mea
2115
* [The Next Step - Put it All Together](#the-next-step---put-it-all-together)
2216

2317

18+
## Introduction
19+
20+
In [previous section](../6-Chart) I have presented how to show your measurements online using Emoncms.org that is powerful web application for logging and visualizing data. We need such data for analysis of performance of our humidity control system. We do not have this system operating yet, but we are just there. In this section I would find a demonstrate how to control our humidifier, so we can then remotely switch it on and off depending on current humidity value.
21+
22+
To do so you will need the following hardware used in section [Measure](../4-Measure/) and in addition:
23+
24+
* RF433 transmitter
25+
* RF433 socket
26+
27+
2428
## Select RF Socket
2529

2630
We should start off by finding proper library to control RF433 socket. There is variety of such sockets on the market as well as variety of Arduino libraries to control them. I propose you to start with nice wiki site with [433MHz libraries for Arduino](https://bitbucket.org/fuzzillogic/433mhzforarduino) by [Randy Simons](http://randysimons.nl/88,over-mij/). It provides couple of libraries for 433 MHz devices including mains sockets. The library I found on this site works perfectly with my ORNO socket. It may or may not work for specific socket you have. Therefore before buying particular socket do research on internet if there is a library available for to control it. You may also decipher protocol used for particular socket and this is a subject by its own. Please see below couple of links to give you an idea what you should be looking for:

8-Automate/readme.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Automate
22

3-
Now comes the fun part of joining all the dots we have been discussing and testing in last seven [sections](https://github.com/krzychb/OnlineHumidifier#step-by-step-tutorial). All we need to do now is to write a simple procedure that will compare ambient humidity against set point and switch humidifier on if it is below or on if it is above the set point.
4-
5-
Before you rush to write this procedure think about humidifier being constantly switched on and off for any swing of humidity. To avoid such situation, it is a common practice to add a dead band below and above the set point and do not operate humidifier if ambient humidity is within the dead band. Exactly the same method of control is used in electric iron or in toilet flush.
6-
7-
The dead band range above and below the set point is called hysteresis. An automatic controller that is working as desribed above is called [bang–bang controler](https://en.wikipedia.org/wiki/Bang%E2%80%93bang_control) or hysteresis controller.
8-
93

104
## Table of Contents
115

6+
* [Introduction](#introduction)
127
* [The Hysteresis Controller](#the-hysteresis-controller)
138
* [What Else?](#what-else)
149
* [Let's Get it Work](#lets-get-it-work)
@@ -17,6 +12,15 @@ The dead band range above and below the set point is called hysteresis. An autom
1712
* [Next Step](#next-step)
1813

1914

15+
## Introduction
16+
17+
Now comes the fun part of joining all the dots we have been discussing and testing in last seven [sections](https://github.com/krzychb/OnlineHumidifier#step-by-step-tutorial). All we need to do now is to write a simple procedure that will compare ambient humidity against set point and switch humidifier on if it is below or on if it is above the set point.
18+
19+
Before you rush to write this procedure think about humidifier being constantly switched on and off for any swing of humidity. To avoid such situation, it is a common practice to add a dead band below and above the set point and do not operate humidifier if ambient humidity is within the dead band. Exactly the same method of control is used in electric iron or in toilet flush.
20+
21+
The dead band range above and below the set point is called hysteresis. An automatic controller that is working as desribed above is called [bang–bang controler](https://en.wikipedia.org/wiki/Bang%E2%80%93bang_control) or hysteresis controller.
22+
23+
2024
## The Hysteresis Controller
2125

2226
You can experiment what will happen if you have no hysteresis or if you set it to specific value. At this stage, as a starting point, let us assume a hysteresis of +/- 2% RH. Below is a procedure that implements hysteresis controller:

9-Maintain/readme.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# Maintain
22

3-
In [previous section](../8-Automate) we have completed our goal of implementation of automatic humidity control. Now I would like to discuss supplementary topic of making the changes to the sketch in more convenient way. For sure you have several ides how to improve this project by providing better automatic control strategy, more friendly and feature rich user interface or maybe adding additional sensors to monitor conditions in your house.
4-
5-
If you have been working with Arduino UNO board before, you may noticed that compilation and then uploading a sketch to ESP8266 takes a lot of time. This is due to size of compiled sketch that is likely 10x bigger comparing to Arduino UNO. To upload [OnlinHumidifier-Automate.ino](../8-Automate/OnlineHumidifier-Automate) sketch using a serial port takes about 30 seconds. Fortunately we can improve this time if we upload module using Wi-Fi connection rather than a serial port. Such method of module upload is called OTA (Over the Air) and has some additional benefits. You can get rid of USB/serial cable and can perform the update remotely - there is no limitation how far the module is located assuming that it is reachable over Wi-Fi connection.
6-
7-
There are three basic options to perform OTA uploads and they are discussed in in details in [documentation](https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#introduction) of [esp8266/Arduino] (https://github.com/esp8266/Arduino) repository. Out of these options I would like to implement uploads directly from [Arduino IDE] (https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#arduino-ide).
8-
93

104
## Table of Contents
115

6+
* [Introduction](#introduction)
127
* [Preparation](#preparation)
138
* [Update the Sketch](#update-the-sketch)
149
* [Make First Upload](#make-first-upload)
1510
* [Make Next Uploads Faster](#make-next-uploads-faster)
1611
* [Conclusion](#conclusion)
1712

1813

14+
## Introduction
15+
16+
In [previous section](../8-Automate) we have completed our goal of implementation of automatic humidity control. Now I would like to discuss supplementary topic of making the changes to the sketch in more convenient way. For sure you have several ides how to improve this project by providing better automatic control strategy, more friendly and feature rich user interface or maybe adding additional sensors to monitor conditions in your house.
17+
18+
If you have been working with Arduino UNO board before, you may noticed that compilation and then uploading a sketch to ESP8266 takes a lot of time. This is due to size of compiled sketch that is likely 10x bigger comparing to Arduino UNO. To upload [OnlinHumidifier-Automate.ino](../8-Automate/OnlineHumidifier-Automate) sketch using a serial port takes about 30 seconds. Fortunately we can improve this time if we upload module using Wi-Fi connection rather than a serial port. Such method of module upload is called OTA (Over the Air) and has some additional benefits. You can get rid of USB/serial cable and can perform the update remotely - there is no limitation how far the module is located assuming that it is reachable over Wi-Fi connection.
19+
20+
There are three basic options to perform OTA uploads and they are discussed in in details in [documentation](https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#introduction) of [esp8266/Arduino] (https://github.com/esp8266/Arduino) repository. Out of these options I would like to implement uploads directly from [Arduino IDE] (https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#arduino-ide).
21+
22+
1923
## Preparation
2024

2125
To start with please check documentation what are the [basic requirements](https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#basic-requirements) for performing OTA. If the module you are using meets these requirements then go to the next step.

0 commit comments

Comments
 (0)