ESP8266 - 12 Weatherstation

by Michal Choma in Circuits > Wireless

4013 Views, 23 Favorites, 0 Comments

ESP8266 - 12 Weatherstation

IMG_20171106_140453.jpg

This project is about building and testing weather station based on ESP8266 - 12. The concept is based on low powering with charging battery using solar cell. This instructable is based on my previous 2 projects charging system and esp logger.


BOM:

PCB prototype board

http://s.click.aliexpress.com/e/bgL8ra4o

http://s.click.aliexpress.com/e/cZld3Uu0

case

http://s.click.aliexpress.com/e/bnH8vwuC

http://s.click.aliexpress.com/e/cgh1TZZA

6V solar cells:

http://s.click.aliexpress.com/e/boPIbdcU

http://s.click.aliexpress.com/e/P2CdlvQ

http://s.click.aliexpress.com/e/hpaB1es

ESP 8266 12

http://s.click.aliexpress.com/e/uPIsjqu

http://s.click.aliexpress.com/e/c2KA2QyC

Battery. 18650 Lithium - ion battery.
http://s.click.aliexpress.com/e/clq9QQAM

Holder for 18650 battery
http://s.click.aliexpress.com/e/b4BNKhwY

Sensor.

You can choose anything, I like I2C sensors, I choose light sensor MAX44009
http://s.click.aliexpress.com/e/mF3rZpQ (MAX44009)

http://s.click.aliexpress.com/e/mF3rZpQ (BME280 - temperature, humidity and pressure sensor)

or.

DS18B20 1-Wire Temperature Sensor
http://s.click.aliexpress.com/e/bhmyP8ha free shipping:

http://s.click.aliexpress.com/e/bhmyP8ha

2 x Ceramic Capacitor 100 nF
http://s.click.aliexpress.com/e/bFvGcnB6

1x Electrolytic Capacitor47microF (can use 470microFarad)

http://s.click.aliexpress.com/e/bFvGcnB6 *

* capacitor packs

http://s.click.aliexpress.com/e/bFvGcnB6

http://s.click.aliexpress.com/e/bcwvHbiC

1x CP2102 USB to UART Serial module

http://s.click.aliexpress.com/e/btKG0HlO


2x Tactile Pushbutton

http://s.click.aliexpress.com/e/DEGyCsC

2x breadboards long or 1xlong breadboard + 1x short breadboard or 1x pcb (which is better, low capacitance) http://s.click.aliexpress.com/e/DEGyCsC (long)

http://s.click.aliexpress.com/e/DEGyCsC (short)

1x pack of dupont cables (not such good, better buy thicker one, for good connection) http://s.click.aliexpress.com/e/DEGyCsC

Resistors: 3x 10kΩ 2x 4.7kΩ 1x 2.2kΩ 1x 300kΩ 1x 100kΩ

Packs:

http://s.click.aliexpress.com/e/DEGyCsC

http://s.click.aliexpress.com/e/bzLcEtPS http://s.click.aliexpress.com/e/DEGyCsC

Building

IMG_20171106_140342.jpg
IMG_20171106_140108.jpg
IMG_20171106_140426.jpg

I describe just main parts for esp weatherstation, more details on my previous instructable projects.

I use ESP8266 - 12 microcontroller, you can use ESP8266 - 7 with antenna. For working esp chip, you need 3.3 V step down module, which convert voltage from Lithium ion battery to 3.3 V. I use Lithium ion battery from old notebook battery pack.

For charging battery, I use solar cell, basically you need solar cell, which give maximum 7 V (depend on TP4056 charging module) and around 200 mA maximum current from solar cell. Maximum current depend on battery, it is rule C/10 but for lithium batteries, you can charge with 500 mA too (C is capacity of battery).

For measure I use 3 themometers DS18b20, which are based on one wire concept. Also I check universal adress of each individual themoter. Why 3 meters? Check in next slide.

Also ESP can measure with wifi antenna! I measure strength of SSID which I connect. Usually it is in dB units. Also my esp check number of wifi nets around my house. Sometimes are 2, sometimes are 3 or 4.

Measuring

IMG_20171106_140603.jpg

For measuring I use 3 themometers, one measure temperature inside box, where is esp and all hardware. Second themometer measure temperature of air outside. I just attach sensor behind the board on balcony. Third themometer I use for measuring temperature inside bottle. When is sunny, air inside bottle is pretty hot. So it is like solar radiation detector.

Also I measure battery voltage with analog digital convertor (ADC). ESP use ADC with maximum 1 V, so I must divide votlage from Lithium battery to less then 1 V.

Also ESP measure strength of my SSID and number of wifi nets, around my house.

Testing

For testing I use Thingspeak channel (https://thingspeak.com/channels/297517?fref=gc). I create 8 graphs, outside temperature, ADC (values from ADC, which measure voltage of battery), Difference (Temperature outside - temperature in bottle), temperature in box, Strength of wifi, Number of "wifies", Temperature on Sun =in bottle.

My esp send data to thingspeak every 28 minutes (I set on 30 minutes, but internal clock oscillate with a little noise, but basically, time interval is around 28 minutes)

It works pretty good, but last week, I find, that once a day, one value missing. Time interval is longer then 28 minutes = 56 minutes. Maybe Thingspeak server is a little bit problematic.

Also you can create graph from these values and add this graph to another channel on Thingspeak(use tools MATLAB Analysis and MATLAB Visualization). I use it, but maybe it causes a little missing in my values. (Missing values happend also after I delete my new graphs and new channels)

Graphs

It is nice to checking temperature outside and analyse temperature in my bottle, which is like greenhouse. Temperature can reach over 30 °C (86 F) when outside is around 15 °C (59 F). Also my outside temperature is not accurate, on forecast website of my region I check, that outside temperaure which I measure is still higher. Maybe I need better isolation.

temperature outside

temperature at SUN