Hello, everyone! Some time ago I saw this Weather Station by Aleator777 and I got inspired to make my own weather station. I saw that the Intel Edison is too expensive in my country, so I decided to find something cheaper, and I found that the Adafruit HUZZAH is a lot cheaper. So I ordered one.
When the breakout arrived I started my IoT Weather Station, and now I will show you how to make one like mine and how to stream the data from it to Adafruit IO.
You can see the readings from my weather station at io.adafruit.com, they are for my home town - Polski Trambesh. - OFFLINE
Sensors UsedThe weather station currently has a DHT11 for measuring air humidity, a TMP102 for measuring air temperature, a BMP180 for measuring the pressure and a prototyping PCB to build it. I know I am using too much sensors but that is because I had them, and if you ask I should use DHT22 and BMP180 or just one BME280 which reads - temperature, humidity, pressure and altitude.
I measure the temperature in Celsius (it could be changed to Fahrenheit), the pressure in PSI - Pounds per Square Inch, and humidity in percentage. The weather station has a deep sleep mode that can be controlled, by default it is set to 5 minutes.
About the Adafruit HUZZAH ESP8266 (ESP-12E)The ESP8266 processor from Espressif is an 80 MHz micro controller with a full WiFi front-end (both as client and access point) and TCP/IP stack with DNS support as well.
Technical details:
- Reset button,
- User button that can also be used to put the chip into boot-loading mode,
- Red LED you can blink
- Level shifting on the UART and reset pin
- 3.3V out
- 500 mA regulator (you'll want to assume the ESP8266 can draw up to 250 mA so budget accordingly)
- Two diode-protected power inputs (one for a USB cable, another for a battery)
Two parallel, breadboard-friendly breakouts on either side give you access to:
- 1 x Analog input (1.8V max)
- 9 x GPIO (3.3V logic), which can also be used for I2C or SPI2 x UART pins
- 2 x 3-12V power inputs
- reset
- enable
- LDO-disable
- 3.3V output
Features:
- 802.11 b/g/n
- Integrated low power 32-bit MCU
- Integrated 10-bit ADC
- Integrated TCP/IP protocol stack
- Integrated TR switch, balun, LNA, power amplifier and matching network
- Integrated PLL, regulators, and power management units
- Supports antenna diversity
- WiFi 2.4 GHz, support WPA/WPA2
- Support STA/AP/STA+AP operation modes
- Support Smart Link Function for both Android and iOS devices
- SDIO 2.0, (H) SPI, UART, I2C, I2S, IR Remote Control, PWM, GPIO
- Deep sleep power <10uA, Power down leakage current < 5uA
- Wake up and transmit packets in < 2ms
- Standby power consumption of < 1.0mW (DTIM3)
- +20 dBm output power in 802.11b mode
- Operating temperature range -40C ~ 125C
- FCC, CE, TELEC, WiFi Alliance, and SRRC certified
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, sensor readings can be up to 2 seconds old.
Features:
- Small size, low cost
- Easy to use 3 to 5V power and I/O
- 2.5 mA max current use during conversion (while requesting data)
- Good for 20-80% humidity readings with 5% accuracy
- Good for 0-50°C temperature readings ±2°C accuracy
- No more than 1 Hz sampling rate (once every second)
TMP102 is a super small digital temperature sensor. The TMP102 is a digital sensor (I2C a.k.a. TWI), has a resolution of 0.0625°C, and is accurate up to 0.5°C. This is a very handy sensor that requires a very low-current.
Communication with the TMP102 is achieved through a I2C serial interface. There is no on-board voltage regulator, so supplied voltage should be between 1.4 to 3.6VDC. Filtering capacitors and pull-up resistors are included as shown.
Features:
- 12-bit, 0.0625°C resolution
- Accuracy: 0.5°C (-25°C to +85°C)
- Low quiescent current
- 10µA Active (max)
- 1µA Shutdown (max)
- 1.4V to 3.6VDC supply range
- Two-wire serial interface
- 2x Mounting Holes
This is a breakout board for the Bosch BMP180 high-precision, low-power digital barometer. The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. These come factory-calibrated, with the calibration coefficients already stored in ROM. What makes this sensor great is that it is nearly identical to its former rev, the BMP085!
Features:
- Digital two wire (I²C, TWI, “Wire”) interface
- Wide barometric pressure range
- Flexible supply voltage range (1.8V to 3.6V)
- Ultra-low power consumption
- Low noise measurements
- Factory-calibrated
- Includes temperature sensor
- Low-profile with a small footprint
You will need the following stuff:
Parts:
- Adafruit HUZZAH ESP8266 Breakout - (9.95$)
- Headers - Male - (2.95$)
- Headers - Female - (2.95$)
- Prototyping PCB - (4.95$)
- BMP180 - Pressure sensor - (9.95$)
- DHT-11 - Temperature and humidity sensor - (5.00$)
- TMP102 - Temperature sensor - (5.95$)
- Battery - rechargeable or not, I am using Li-ion 3.7v 2900 mah
- Jumpers - Female to Female
- FTDI cable.
Tools:
- Soldering iron
- Hot glue gun
- Clips
Make it with the help of the prototyping board. Connect the SDA and SCK pins of the TMP102 and BMP180 sensors to pins 5 and 4 (like on Arduino UNO) of the HUZZAH module and the DHT sensor to pin 2. GND to GND on the board and the power input of the sensors to +3 V pin of the HUZZAH board. If you want put a so you can reset the board. Also add a battery connector so you can power it with a battery like me. Also you have to put jumper between pin 16 and RST of the HUZZAH board so the board wake up.
By default the time for sleep is set on 300s - 5 minutes, if you want you can change it.
I have put additional headers for more sensors such as anemometer for measuring wind speed, pyranometer for measuring solar radiation, rain gauge for measuring liquid precipitation over a set period of time. So check for regular for updates.
The EnclosureMy enclosure is a simple plastic box from nearest store, but you can use another box, a 3D printed, laser cut or a normal plastic box. The box should have enough space for the main board, the battery and the sensors.
I mounted the BMP180 and the TMP102 on the right side of the box and the DHT at the top. I pointed the digital sensors to the north because of the sun (its warming up the TMP102 sensor).
Setting Adafruit IOAdafruit IO gives you the opportunity to connect your devices to the Internet and read data from your sensors, or to control your device remotely from any point on Earth (if you have Internet of course), and in this step I will show you how to set it up.
Go to Adafruit IO and sign up or sign in. Then the dashboard page will load. On this page are your dashboards. On the left you will see a menu, click on feeds then on the right you will see the create feed button (its blue) click on it. Name the feed temperature, add description and then click on the create feed button (its gray) and your feed is done. Repeat the process for other feeds such as: humidity, pressure, altitude, etc.
Now go to the Dashboards menu and create new dashboard, then add gauge and name it temperature. Repeat for your other feeds.
After that go to settings and click on View AIO Keys and copy your key, then paste it in the Arduino sketch. If you refresh your key you have to replace it. You can get your key from any of your feeds or dashboards by clicking on the key button which is on the right (it is yellow in color with small white key in it) then move to the next step.
If you forget to make the feeds don't worry, the module will create them for you!
NOTE: If you have issues with Adafruit IO, go to settings and destroy all IO data.
Download and Install Software on the HUZZAHThis step is easy, just download .INO file ESP8266_Weather_Station_v1.0, then open it with the Arduino IDE put your WLAN name and password, add your Adafruit IO user name and IO key. After that upload the code to the ESP8266 module with the help of the FTDI cable.
Libraries:
Download and unzip the libraries at: /ProgramFiles(x86)/Arduino/Libraries (default)
.
Arduino IDE and ESP8266 set up:
Copy this link: http://arduino.esp8266.com/stable/package_esp8266c... open Arduino IDE and press H + comm to open preferences then paste it into Additional Board Manager URLs field. Restart Ardiuno IDE and go to boards manager, search for ESP8266 and download it.
Congrats!If you receive the data on you Adafruit IO account that means everything is OK. Now you have your own weather station.
Comments