ESP8266 Weather Station With Arduino – #1 Hardware

62,386

534

28

Posted in TechnologyArduino

Introduction: ESP8266 Weather Station With Arduino – #1 Hardware

Background

I read about the ESP8266 first in March this year and I didn't know what to do with. And now I'm really fascinated how easy the connection of an Arduino to the Internet can be. Like others I set up a weather station on a breadboard first and sent data to thingspeak.com. This ends up in a highly condensed stripboard layout and the needed software package.

Why stripboarding and not etching a PCB?

There are a lot of good PCB layouts around. But I want to build something that everybody can do easily at home. A soldering stick, stripboards and parts are easy to get. But etching a PCB is often a hurdle. So, my challenge was to make the design on a stripboard within the size and functionality of a etched PCB.

What are the functionalities?

  • measure temperature, humidity, pressure and illuminance (brightness)!
  • send all data to thingspeak
  • ESP8266 can be turned on and off by Arduino for energy saving
  • additional digital IOs
  • Runs on 5 to 12 V
  • and a lot more

Why ESP8266 and Arduino?

Every one of them have its advantages. The Arduino is perfect for dealing with sensors. And the ESP8266 is perfect for the Internet connection. And I can turn off the Internet for energy saving ;).

And the best:

The weather functionalities are only one aspect. You can measure nearly everything with this board because you have the following sensor pinouts of the Arduino:

  • 2x analog
  • 6x digital
  • I2C for WIRE connections
  • 1x reset
  • 1x button

For a short impression:

The temperature and illuminance of the last three days somewhere in Germany: link

This is the hardware part of this project. The software is explained here: link

Step 1: Let's Build: Parts

To build this weather station you need some parts:

  • 1x stripboard 20x15 vertical
  • 1x ESP01
  • 1x Arduino Mini Clone (this layout Arduino Mini, I chose the clone version because the position of A4 and A5 is more stripboard friendly compared to the official one)
  • 1x DHT11 or DHT22
  • 1x BMP180 shield (the one with 4 pins)
  • 1x my temperature and illuminance sensor shield (link)
  • Capacitors:
    • 3x 100 µF (*)
  • Z-diode
    • 1x 3.3 V
  • Resistor:
    • 1x 10 kΩ
    • 1x 360 Ω
    • 1x 150 Ω (for red LED)
  • AMS 1117
    • 1x 3.3 V
    • 1x 5 V (*)
  • LEDs:
    • 1x red
    • 1x green
    • or a bi-color one
  • Headers:
    • 1x 12x1 female
    • 1x 6x1 female
    • 2x 5x1 female
    • 5x 4x1 female
    • 1x 3x1 female
    • 1x 2x1 female
    • 3x 3x1 male (*)
    • 1x 4x1 male
    • 1x 4x1 male 90°
    • 1x 3x1 male 90°

To (*): If you only want a 5V version you can reduce these parts by one.

Step 2: Cutting the PCB

First cut the stripes of the stripboard at the position shown in the drawing. To make this easier use the bottom view image. At the end count your cuts to be sure that you will not have wrong connections.

Step 3: Adding the Headers

Next step is soldering the headers to the board. Take care on the header in the lower right corner. You also have to solder the wire on the left side in the same hole.

Step 4: Wiring

Add all wires to the PCB. The colors are not important. They are only a orientation for me. On the top right corner there is a double usage of one hole. So you have to solder in the resistor in this step, too.

Step 5: Add Some Parts ...

Because the two AMS1117 are surface mounted parts you have to prepare them for through hole mounting. For this solder each to one 3x1 male header. After that you can easily place them together with all resistors, capacitors and the Z-diode on the PCB.

The LEDs are connected to the male header like seen in the image. The resistor is for the green leg.

Step 6: Full Setup With Labels

So, here you are. All parts are on the PCB. To check if everything works well and not to get short circuits or over voltages do the following tests first (use a multimeter):

    1. Measure the resistance between (1) and (3). Should be around 1 kΩ (not less!).
    2. Measure the resistance from (1) to all ground (GND, G) pins. Except (13)-G all should be 0 Ω.
    3. Connect a 9V battery to pin (1) (GND,-) and pin (3) (+).
    4. Measure 5 V voltages on pins (2), (8)-5, (9)-5, (10)-5, (12) and (14)-5.
    5. Measure 3.3 V voltages on pin (15).

    If the board passed all five tests it's ready to put the components on.

    Step 7: You Need Some Software

    Yes, hardware is one part the software is the other. To explain and publish the software I will create an other instructable. Only few words to the concept:

    The ESP8266 runs on Nodemcu and does the Internet connection. The Arduino does all the sensor related things. The communication between Arduino and ESP8266 is via serial connection whereby the Arduino uses the SoftwareSerial Library.

    There's two modes in the Arduino software: standard and low power. The standard version powering the ESP01 once and sends data regularly (short periods) to thingspeak.com. The low power one sends the date also regularly but within longer periods. Between two sendings the ESP01 is powered down.

    So, follow me for the further instructables.

    If you want to write your own software here are the relevant pins for the Arduino:

    • D2 Softserial TX
    • D3 Softserial RX
    • D4 DHT11 data
    • D11 SW0
    • D12 Connected to ESP8266 CH_PD: HIGH = On, LOW = Off
    • A0 LDR
    • A3 Thermistor

    Share

      Recommendations

      • Casting Contest

        Casting Contest
      • Microcontroller Contest

        Microcontroller Contest
      • Woodworking Contest

        Woodworking Contest
      user

      We have a be nice policy.
      Please be positive and constructive.

      Tips

      Questions

      28 Comments

      Hi! Can you share the schematics for the project? (wiring between components, ESP and Arduino). Thanks!!

      1 reply

      Sorry, but I have nor pure scematic for the project. I designed everything in my head and draw it directly on strip board in Fritzing.

      Why is the Arduino required? Can't the ESP8266 handle those sensors just as well on its own?

      1 reply

      There are different reasons. First, in 2015 the Arduino firmware was really fresh to the ESP8266 and not as stable as today. Second I use 2 analog ports. These are not available on the ESP8266. I work on different other projects right now and I also use one Arduino+ESP8266 combination for one and a single ESP8266 (with Arduino IDE) for the other. Depends more or less on the nedded inputs.

      Really cool project! Thanks for sharing it! And I think that it does make sense to use Arduino for interfacing with the sensors.

      I want to make this project but using a standalone Arduino (instead of Pro mini) so it would be really great if you could give a breadboard schematic as well. Otherwise, I'll try to figure out the connections from the stripboard schematics...

      Thanks for creating this project, it's just what I wanted to build. However, I have had a go at building the project and I'm finding it really hard to solder with any confidence. I find stripboard a real pain. Is there any chance you could provide a prototyping/breadboard schematic that I could try and build to give me some confidence?

      Thanks.

      1 reply

      if you check out the connections on the stripboard it shouldnt be too hard to put it on breadboard. Sure it is a bit tedious but may well be worth it :-)

      Hi, it is a great project, i will go to build my own weather station but i want to add more sensors, like CO, NO2, and noise.

      Hi, you got a neat work there, thumbs up buddy! The USB to TTL converter adapter for your ESP8266 is a nice idea. Anyway, what are the software you used to draw the perfboard design? :D

      2 replies

      thanks. I use fritzing for the design. but to add the notes I exported the stripboard from fritzing as PDF and do the annotation in inkscape.

      Thanks. For the adapter I will write an instructable in the next weeks. For the perfboard design I used Fritzing. To make the drawing I showed in the instructable I exported the layout to pdf file and made all annotations with Inkscape. That's easier than with Fritzing.

      Hello,

      which app you used to design the Strip board ? as fritzing not suport that as i know.

      how much is current you provide to power both ESP-01 and Micro pro

      1 reply

      I use fritzing. it's possible. regarding the power, sorry but I über meassured it.

      Where is the software code ? It looks like an incomplete project !!

      1 reply

      See here: https://www.instructables.com/id/ESP8266-Weather-Station-with-Arduino-2-Software/

      I see that my mini actually deviates a lot in lay out. Well I got to design a new board then :-) keeps me busy

      hi! i've 3 of these mini pro, they are 3.3v and have pins organized a little differently respect your design... can i use one of them? thanks!

      http://www.ebay.it/itm/Mini-Pro-Atmega328-3-3V-8Mhz-ATmega328P-Arduino-Mini-Compatibile-Atmel-328-/121675889030

      2 replies

      Hello,

      the most visible difference between your Arduino board and the one I use is the position of the Pins A4 and A5. On yours these Pins don't fit to the stripboard holes. Therefore I used the clone version. Nevertheless you can use your board and soldering two male headers on the top on pin A4 and A5. Then solder two wires with female end to the positions of A4 and A5 of my layout and plug them to the male headers.

      Regarding the 3.3V version it is more difficult to adapt. You can easily change the AMS1117 5V to a second 3.3V version and run the whole system on 3.3V. The DHT11, the temperature and the illuminance sensors will work. But the version of the BMP180 needs 5V input. You can change this sensor shield to this one

      http://www.aliexpress.com/item/hot-sale-1PC-BMP180-Digital-Barometric-Pressure-Sensor-Board-Module-Free-Shipping/32295424954.html

      which has an 3.3V Vcc pin. But the pin order doesn't fit to my layout and you have to use wires.

      So, easiest is to buy the right Arduino board:

      http://www.aliexpress.com/item/Free-Shipping-1PCS-Pro-mini-module-ATMEGA328P-5V-16M-100-New-Original/2036263039.html

      Regards.

      ohneschuh

      I have some Pro minis from AliExpress (great place) 1.60 a piece that seem stripboard friendly, but still have a slightly different layout than the one you linked to. I am sure I can get it to work, maybe have to reroute some of the strip connections, but I dont have to work with wires coming from A4 and A5.
      Have another Pro mini as well that indeed has A4 and A5 in a slightly awkward position.
      I am so going to make your project, if any for the sheer cuteness of it. Just have to find some time :-)