How to Make Pocket Sized IoT Weather Station

28,783

335

32

Introduction: How to Make Pocket Sized IoT Weather Station

About: I'm a 15 yo. student on SPMNDaG.

Hello reader!

In this instructable you will learn how to make small Weather Cube using the D1 mini(ESP8266) which is connected to your home WiFi, so you can look at it's output anywhere from earth, of course as long as you have internet connection. Overall making this project isn't too difficult nor resource heavy, so it will be perfect as your first IoT project. So let's get started.

PS: Keep in mind that this is my first Instructable so not everything will be perfect. :)

Step 1: Resources

As I mentioned in the introduction, this project is very easy to construct and doesn't require too much components. Here is the parts list:

Electronic Components:

WeMos D1mini

BME280

I2C OLED Display(128x64)

1.5mm Brass Rod or Iron Rod

NOTE: If you want more info about theese parts for ex. where to get them, you can look into Step 7!


Tools for prototyping and testing the circuit:

Breadboard

Jumper wires

USB wire - Micro USB Type B to USB Type A

Tools:

Soldering iron

Bench vice - not mandatory

Small hammer - not mandatory


Step 2: Prototyping on Breadboard (Skip to Step 3 If You Want to Go Straight to Code and Assembly)

If you don't have your pins soldered on your D1mini/OLED/BME280, now is the time to do it!

First of all lets place all our components on the breadboard. We will start by placing the D1mini on 2 separate rails(picture no.1). After that we will place the BME280 fair distance from it(picture no.2). And finally we will place the OLED on the opposite side of the BME280(picture no.3). Now, let's connect them together.

Here are all the connections:

D1 pin to SCL/SCKpin on the OLED and SCL/SCK pin on the BME280

D2 pin to SDA pin on the OLED and SDA pin on the BME280

G pin to GND pin on both, the OLED and BME280

3.3V pin to BME280 VCC pin

And finally 5V pin to OLED VCC


Check your connections again before connecting it to your computer and uploading code to it! You don't want to burn anything.

Step 3: IoT Part

This part is really simple. First of all, go to AppStore and download Blynk app. After that, open it and sign up. Next create new project. I called mine WeatherStation but you can name it anything you want. After that, set the device option to ESP8266 and connectivity type to WiFi(picture no.1). Next tap create project. You shoul get an email with your verification token. Now jump into the code(download link below) and replace highlighted parts. After that, jump back into the Blynk app project workspace, tap on the screen to open widget box(picture no.2). Now place 3 labeled value boxes by tapping on them(picture no.3). To set them up, tap on first one and set it's name. I called it temperature(this is not mandatory but it makes everything simpler and more organised). As input select virtual pin 1 and in the label part type "°C"(picture no.4). After that you can go and set up the other labeled values.

Here is small chart:

Labeled value no.2:

Name: Humidity

Input: Virtual pin V2

Label: "%"

Labeled value no.3:

Name: Altitude or pressure - depends on which code you choose

Input: Virtual pin V3

Label: Altitude or pressure - depends on code

If you have done everything correctly, upload your code to D1mini, wait for a little while and then the values should pop up on the OLED and in your Blynk app(picture no.5)(you need to press play button in the top right corner of the screen). If nothing shows up, go to the troubleshooting part.

Step 4: Freeforming the Circuit

Okay, this will be the hardest part so get ready. Prepare your brass rods/iron rods(I will use brass coated iron hooks because I couldn't find brass only rods) and heat up your soldering iron. Now you can form it into anything you want! I will form it into a simple cube. This process requires patience and time, so don't rush it if you don't want to break your whole circuit. You can see the finished circuit in picture no.2. I decided to use 1,5mm rods on the outside, but thinner rods in the insede(1mm) for easier management.

WARNING: Solder only in well-ventilated space, soldering can put out toxic fumes!

TIPS:

For bending rods use bench vice and a small hammer - if you don't have bench vice, nor hammer, pliers and bare hands will be enough.

Use tape or helping hands to hold rods together while you solder them. It's much easier.

OR if you are using iron rods like me, you can use 2 strong magnets to hold them in place(picture no.1).

If your joints don't hold together, unsolder them and roughen them up with sandpaper.

If your solder doesn't flow into the gaps, use a bit of soldering flux or heat up the joint a bit more.

Step 5: Finale

Now the only thing remaining to do is to connect it to 5V 1A PSU. If you have done everything correctly, it should work just fine(don't forget to upload your code if you didn't already). If nothing shows up or something isn't right, jump over to the troubleshooting section.

Step 6: Troubleshooting

Display showing nan: Check your wiring! Your sensor isn't connected propperly.

BME280 outputing 0.0: Check your wiring! Your sensor isn't connected propperly.

Black display/sensor data not showing up: Check your I2C adresses using I2C scanner or check wring.

Device offline in app: Check if you entered your Token/WiFi name/WiFi password correctly. If yes, check your wifi signal. It might be weak or you don't have internet connection.

Still having trouble or you found mistakes in this instructable? Write down in comments and I will get to you ASAP. :)

Step 7: Where to Get Theese Parts?

Are you new in electronics? No problem! Here is brief explanation on some physical parts, how they work and how to get them the cheapest:

1. Where do I get all theese electronic parts?

Aliexpress. By me, Aliexpress is the best site, by far to get all of theese parts for cheap price. The only downside is that basic shipping is usually takes a lot of time (Anywhere from 2 Weeks to 1,5 Months).

2. What is BME280?

BME280 is a sensor that can measure Temperature, Relative Humidity and Atmospheric Pressure. It's really convenient to use in theese small form-factor aplications like pocket sized electronics. More about it here.

NOTE: D1mini, BME280 and OLED display were all ordered from AliExpress.

Pocket Sized Contest

First Prize in the
Pocket Sized Contest

9 People Made This Project!

Recommendations

  • Make It Bridge

    Make It Bridge
  • Big and Small Contest

    Big and Small Contest
  • For the Home Contest

    For the Home Contest

32 Comments

0
Jimmy6847
Jimmy6847

Question 1 year ago on Step 7

Hello,
Great project!
As you can see I made Pocket Sized IoT Weather Station with a IKEA candle for decoration. I would just like to make a small change regarding the display. Indeed I find it sufficient that only one figure is displayed after the dot, like this 24.2, 54.3, 1018.7
Can you send me the modified sketch, because I don't know how.
Thank you very much in advance

Sorry for my very poor english

station météo.jpg
1
MatejHantabal
MatejHantabal

3 years ago

Can this be taken on the go? Seems very fragile and also reliant on an external power source, since there is no battery. It also doesn't seem very weatherproof. Maybe a V2? ;)

1
ViktorDemcak
ViktorDemcak

Reply 3 years ago

1. Yes, it can be taken on the go, total size is about 3cm. 2. It isn’t that fragile, can hold about 3kg on top without breaking or it can survive drop from 1,5m without any problems. 3. Yes, it has to be powered with external power but if you want you can just plug it in your phone or add small battery to it. 3. Weatherproofing can be easily solved by spraying it with shoe water resistance spray, just make sure to cover up main part of display and port. 4. Ill most likely not make V2, maybe something different but in the same style. Thanks.

0
CharlyMo
CharlyMo

2 years ago

Take care not to cram things too close together. I put the sensor about 1-2 cm over the microcontroller and found the readings much noisier than they were in the prototype, where the sensor was on one side. I discovered that the temp reading was abt 1 deg lower and much less noisy if I lay my device on it’s front! Will have to try some remediation ... proposals welcome!

923FF7FF-E953-4430-B90E-D370ED7AA53C.jpeg837B3325-9367-4CB1-8D77-B049E6B59DDE.jpegBB107C27-536A-4351-856F-75B126351CFA.jpeg
0
CharlyMo
CharlyMo

Tip 2 years ago

I had some problems with them Blynk connection dropping. All fine after tweaking the code as per the attached advice on their website 😜

A9DFCF7E-AC71-4FF0-84C6-4FB94EEE0948.jpeg
0
PatrickZ15
PatrickZ15

2 years ago

Hey! Really nice project! I love the free wire circuit. I'm just wondering, if it would also be possible to use the tiny esp8266-01 module in your case as well? That would shrink the device a little bit more. Any ideas?

1
onetruegod
onetruegod

3 years ago

It's a cute build. Well done.

0
ViktorDemcak
ViktorDemcak

Reply 3 years ago

Thank you!

2
alcurb
alcurb

3 years ago

I like the open frame "enclosure". I'm a nerd in that I like to open up devices to see what makes it tick. Your design satisfies that curiosity.

0
DanP231
DanP231

Question 3 years ago

Did you use your mobile to upload the code? If so, did you use an OTG cable or WiFi? I have a NodeMCU8266 I need to upload code to.
Dan LaPine

0
ViktorDemcak
ViktorDemcak

Answer 3 years ago

I used Arduino IDE on my PC.

1
pgs070947
pgs070947

3 years ago

Nice project and useful.
The "frame" is a bit unusual and normally only seen in full size equipment like portable generators and compressors. I've seen compressors where the frame is use to store the compressed air. Clear acrylic is also possible or even Lego Technical.
For stuff like brass rod and sections, look at model-making supplies, typically railways.
Well done and thanks for publishing

1
BerenV
BerenV

3 years ago

Nice design! In the first paragraph, you put "ESP82660" instead of "ESP8266".

0
ViktorDemcak
ViktorDemcak

Reply 3 years ago

Thank you for notifying me. Fixed it!

0
ruth.pershing
ruth.pershing

Question 3 years ago on Introduction

I’d really like to work with my students to build this device. I don’t have much background in electronics and it would really help to have an explanation of the parts and where to get them.