ESP8266 Weather Station

schematics-bmev2

Introduction

Generally weather stations are very expensive. You need also a computer or a raspberry to upload data on an APRS server. The weather station described here is very simple. Just an esp8266 and a BME280 (Cost 7$). For the moment the station measure temperature, humidity, pressure. In some weeks, I add wind speed and direction. Measurements are uploaded to an APRS server automatically. Weather datas are also logged into esp8266. So you can draw curves with LibreOffice Calc. Time is synchronized with NTP (Network Time Protocol). You don’t need to compil source code. I add configuration menu into ESP8266.

Esp8266 include a little web page to see Weather datas.

Weather station characteristics:

  • Simple design.
  • Upload datas on APRS server
  • NTP sync
  • Data logger
  • BME280
  • ESP8266 (all versions)
  • Can be installed outdoors (power supply and case not described yet)
  • Configuration menu
  • Web page included
  • Wind Speed and direction (in few weeks esp12 only)
  • Cost 7€ max
  • No HAM licence required

weather-ebay-links

aprsfw0383
Weather station FW0383

Two schematics one with ESP01, the other with ESP12E

ESP01

esp01-sch

esp01-prog

Schematic is easy, just 4 wires between esp8266 and BME280. Is more easy to use an adapter to program ESP. Beware to switch inverted on Prog or Uart to run program.

ESP12E

Idem for schematic, just 4 wires between esp8266 and BME280.You don’t need any adapter to program ESP. There is micro USB plug. I prefer to use this model.I will add improvements for standalone mode outside house (power supply with solar cells)

esp12e-pinout

schematics-bmev2


BME280

 

bme_sch

Features: (source https://www.sparkfun.com/products/13676)

  • Operation Voltage: 3.3V
  • I2C & SPI Communications Interface
  • Temp Range: -40C to 85C
  • Humidity Range: 0 – 100% RH, =-3% from 20-80%
  • Pressure Range: 30,000Pa to 110,000Pa, relative accuracy of 12Pa, absolute accuracy of 100Pa
  • Altitude Range: 0 to 30,000 ft (9.2 km), relative accuracy of 3.3 ft (1 m) at sea level, 6.6 (2 m) at 30,000 ft.

Software

ESP can be programmed with BME280 plugged.

https://github.com/f4goh/Weather

Two ways for programming esp8266

  • Use nodemcu 0.9 programmer (bme_V06_esp01.bin or bme_V06_esp12E.bin)
    • switch inverter to prog with esp01 inserted,
    • plug usb adapter
    • launch nodemcu 0.9 programmer
    • load your firmware
    • flash esp8266
    • when finished unplug adapter
    • switch inverter to uart
    • plug usb adapter
    • launch serial terminal (115200 bps)
    • type m key to get the config menu (m key with Line Feed)

pgmesp

//Wire.begin();

with

Wire.begin(0,2);  //sda 0 , scl 2

  • Load bme_V06.ino
  • According to esp, configure your model
  • Program ESP
  • launch serial terminal (115200 bps)
  • type m key to get the config menu (m key with Line Feed)

 

If this is the 1st time esp is programed, config menu starting, type ‘m’ if it doesn’t appears

prog-esp


CWOP callsign

Before configure, you need a callsign for your weather station

cwop_logo

http://wxqa.com/

http://wxqa.com/SIGN-UP.html

cwop

Complete this form, you will receive a callsign by email.

http://www.findu.com/citizenweather/cw_form.html


Configuration

———–

Config menu

0 Quit menu

1 format file system

2 config wifi access point

3 config weather station

4 test ntp

5 test bme 280

6 test server upload

7 print weather data logger (historic)

8 create and erase weather data logger

———–

1 st format file system then go to config wifi access point

———–

Config wifi access point menu

0 Save and exit access point menu

1 ssid list

2 set ssid

3 set ssid password

4 show ssid config

5 test ssid

———–

Print ssid list then retype your AP in “set ssid” option and your password in “set ssid password”

 

scan start

scan done

5 networks found

1: Livebox-67E0 (-88)*

2: orange (-87)

3: orange (-92)

4: orange (-83)

5: Livebox-0x00 (-61)*

your wifi ssid config is

Livebox-0x00

xxxxxxxxxxxxx(password)

Check ssid connexion and exit menu

Connected to Livebox-0x00

IP address: 192.168.1.32

Go to Config weather station

———–

Config weather station

0 Save and exit weather station menu

1 set callsign station

2 set longitude

3 set latitude

4 set server address

5 set server port

6 set transmit delay

7 logger enable

8 show weather config

———–

Configure all items like this (do not use this GPS coordinates it is mine 🙂

callsign : FW0383

longitude : 00012.21E

latitude : 4759.75N

server address : cwop.aprs.net

server port : 14580

tx delay : 15  (in minutes)

logger enable : 1 (save weather datas into esp at each server upload)

 

Save config and Perform this tests

4 test ntp

5 test bme 280

6 test server upload

8 create and erase weather data logger

0 Quit menu


Sample tests print screen

Connected to Livebox-0x00

IP address: 192.168.1.32

Waiting for NTP packet

82.197.164.46

sending NTP packet…

 

NTP packet received, length=48

2017-2-18-7 17H 43M 37S

->>>>> next tx at : 17:58:00

Program Started

Starting BME280… result of .begin(): 0x60

Displaying ID, reset and ctrl regs

ID(0xD0): 0x60

Reset register(0xE0): 0x0

ctrl_meas(0xF4): 0x27

ctrl_hum(0xF2): 0x1

Displaying all regs

0x80:8F 50 89 34 2E 14 F6 06 6F 6F 39 67 32 00 F0 8C

0x90:B2 D5 D0 0B 0F 1A E6 FF F9 FF AC 26 0A D8 BD 10

0xA0:00 4B 20 00 00 00 00 00 00 00 00 00 33 00 00 C0

0xB0:00 54 00 00 00 00 60 02 00 01 FF FF 1F 4E 08 00

0xC0:00 40 27 FF 00 00 00 00 01 00 00 00 00 00 00 00

0xD0:60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0xE0:00 6C 01 00 13 0A 00 1E 07 41 FF FF FF FF FF FF

0xF0:FF 00 01 0C 27 00 00 55 6D 00 7E 95 00 73 5E 80

Displaying concatenated calibration words

dig_T1, uint16: 28527

dig_T2, int16: 26425

dig_T3, int16: 50

dig_P1, uint16: 36080

dig_P2, int16: -10830

dig_P3, int16: 3024

dig_P4, int16: 6671

dig_P5, int16: -26

dig_P6, int16: -7

dig_P7, int16: 9900

dig_P8, int16: -10230

dig_P9, int16: 4285

dig_H1, uint8: 75

dig_H2, int16: 364

dig_H3, uint8: 0

dig_H4, int16: 314

dig_H5, int16: 0

dig_H6, uint8: 30

 

Temperature: 19.59 degrees C

Temperature: 67.03 degrees F

Pressure: 101544.86 Pa

%RH: 51.78 %

Connected to Livebox-0x00

IP address: 192.168.1.32

Waiting for NTP packet

195.186.4.101

sending NTP packet…

NTP packet received, length=48

2017-2-18-7 17H 44M 16S

->>>>> next tx at : 17:59:00

FW0383>APRS,TCPXX*:@174416z4759.75N/00012.21E_…/…g…t067r…p…P…h52b10156

# javAPRSSrvr 3.15b08

# logresp FW0383 unverified, server CWOP-4

closing connection


 

To draw your curves just paste datas show on terminal into LibreOffice calc.

====== read logger file =========

date;time;temperature;humidity;pressure

14/02/2017;19:33:00;062;59;10178

14/02/2017;19:48:03;063;58;10179

14/02/2017;19:49:04;063;59;10180

14/02/2017;19:50:02;062;59;10179

14/02/2017;19:51:02;062;60;10179

14/02/2017;19:52:02;062;60;10179

14/02/2017;19:53:02;062;59;10179

14/02/2017;19:54:02;062;59;10179

14/02/2017;19:55:03;062;60;10180

14/02/2017;19:56:02;062;60;10179

14/02/2017;19:57:02;062;60;10180

14/02/2017;19:58:03;062;59;10180

14/02/2017;19:59:02;062;60;10180

calcimport

calcgfx

Conclusion:

Making this little weather station was a good learning path on software aspects.

I discover SPIFFS, NTP and CWOP

I add wind speed and direction soon, but only with esp12

73 Anthony F4GOH

 

bmelocalpage

Publicités
ESP8266 Weather Station

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s