Mini Weather Station

35K38652

Intro: Mini Weather Station

In this project, we will be making a mini weather station that measures temperature and humidity and transmits them wirelessly to a ground station, which displays the readings on an LCD display!

It’s a fairly easy project and can be used either on its own or part of something bigger.

STEP 1: List of Materials

For this project, we will be using:

- RF 433 transmitter/receiver module cost: ~2.00 USD

- DHT11 Humidity and temperature sensor cost: ~5.00 USD

- Two Arduino boards

- 16x2 LCD display HD44780 equivalent cost: ~2.00 USD

- 10k linear potentiometer cost: ~1.00 USD

- Jumper wires

- Two breadboards

About the RX433.

This module can make an open air connection up to 500m, depending on the voltage you power it with (operating voltage range: 3.5-12V) and the length of the antenna you provide. Here, 5V are used from the Arduino board to power the RF433. For an antenna, you can solder a simple single-strand wire, like the one you see on the various pictures, which is about 17.2cm long. Depending on the frequency of your model, you should find out the appropriate length for the antenna.

You can calculate it on a website like this: http://www.qsl.net /kd4sai/antencal.html. But if you use a 433MHz transmitter, 17.2cm is the correct antenna length.

STEP 2: Hardware Connections

In general, the connections are very simple. Follow the instructions and images above, and you should have no problems.

Transmitter Side:


Connecting DHT11

Connect:

- the VCC pin on Arduino’s 5V output

- the GND pin to Arduino’s GND and

- the DATA pin to Arduino’s digital pin 4

Connecting RF433 transmitter

Connect:

- the VCC pin on Arduino’s 5V output

- the GND pin to Arduino’s GND and

- the DATA pin to Arduino’s digital pin 12

Receiver Side:

Connecting RF433 receiver

Connect:

- the VCC pin to 5V on Arduino

- the GND pin to Arduino’s GND and

- the DATA pin to Arduino’s digital pin 11

Note: one of the pins will not be connected anywhere.

Connecting the LCD display

To properly connect the LCD display, you will need to connect the following:

- LCD VCC pin to 5V pin

- LCD GND pin to GND pin

- LCD RS pin to digital pin 7

- LCD Enable pin to digital pin 6

- LCD D4 pin to digital pin 5

- LCD D5 pin to digital pin 4

- LCD D6 pin to digital pin 3

- LCD D7 pin to digital pin 2

Connecting the potentiometer

Connect:

- one of the outer pins to Arduino’s 5V output

- the opposite outer pin to Arduino’s GND and

- the middle pin to LCD’s VO

The potentiometer is used to control the LCD’s contrast, so you should fiddle with the pot a bit, when powered up, to find that sweet spot!

Once you have connected everything, it should look something like in the image.

STEP 3: Arduino Programming

We will be using codebender to program our Arduinos. It’s really easy and effortless to make it work. Also, all the necessary libraries are already provided to include in our code straight away, so you will not have to search and download them.

Three libraries have been used and their links are in the resources section, at the end of this Instructable if you need them.

Here is the code for your transmitter Arduino:

To program your arduinos via the embedded link above, you must install the appropriate plugin to your browser, as indicated in the message at the bottom right of the code window. Make sure to choose the correct board and COM port!
And the code for your receiver Arduino:

You can clone and edit the code in any way you prefer.

STEP 4: Enjoy Your Mini Weather Station!

After making sure that everything works smoothly, you can take the project from the breadboard and onto a PCB! Power through batteries or a plug and you’re good to go!

Resources:
Libraries’ links:

DHT11 library

Easy Transfer Virtual Wire library

Liquid Crystal library

38 Comments

would this work with a DHT22, for more acurate data?

Yes, you can use a DHT22 sensor with some minor code modifications. Instead of the DHT11 library I am using Adafruit's DHT-sensor-library (https://github.com/adafruit/DHT-sensor-library) which allows you to easily swap between the DHT11 and DHT22 sensors.

I can provide the code but need to find a convenient way to post it. I am new to this posting online stuff :)

Andre

alini I loaded your code into my transmitter and switched out the DHT11 with a 22 and it worked perfectly. Thanks.

I have not tried using a DHT22 on this project, but it should. Please take a look here for the use of libraries for the DHT series.

I had the project working, "Everything was working" then I noticed that the degrees were in Celsius, so I thought I would change the degrees to Fahrenheit, well when I did that, I did not get any readings, so I changed the code back to Celsius, well that did not change anything back to where it was and I still got no readings, just a blacken in squares on the display of the LCD. I felt stupid and wondering why I did it in the first place and it was curiosity of course.

Even changing out the DHT11 did not change anything, so now I am not sure what it could be?

I have a problem with my project. I entered the codes into the boards and there is no reading on the LCD display ( Temp: 0C and Humi: 0% ).

Temp in the room is 72 degrees.

I also remember you telling me that once I have entered the codes into the boards that the project could power itself without being plugged in and that is not happening as well, it seems like it needs to be plugged in to my laptop.

I was wondering if there is anything that needs to changed with any of both codes for either of the arduino boards?

Hi,

from what I can tell in the photo, you have connected the DHT11 on digital pin 11, this should be on digital pin 4.

I really am sorry for this, as I have not corrected the Fritzing file to match the instructions, please connect the wiring according to the text, the photos and the code, NOT the fritzing sketch.

[this is noted, I will correct them ASAP, I'm just swamped right now)

Please do the following:


- double check your wiring, as some cables are hard to see in the photo, again: connect the wiring according to the text, the photos and the code, NOT the fritzing sketch.

- first on the transmitter arduino: see what data come to your serial monitor via the serial port. See that the DHT11 does give you readings. If not, check it's wiring.

- then on the receiver arduino: see what data the serial monitor shows on this side. If the data are 0, check both the RF433 wiring and make sure your antenna is the correct length.

Lastly, I thought that by saying "stay plugged in" you meant on the computer in order for the code to run. The boards MUST be plugged in some kind of power source to work, either that is a USB or a power adapter (see the arduino page for the board you are using to see what voltage input it can take).

I hope this helps, please feel free to ask anything you might have a problem with, just have in mind that for the next week or so, I will have no easy internet access, but I will get back to you as soon as I can!

Can I change Arduinos UNO for ATTiny85 or Nano without modify nothing? (Sorry I am new in that)

Do both Arduino boards have to stay plugged in, as shown in some of the pictures, after putting in the programming? Or can the project run on its own once you have put the programs into the boards?

Hi!

Once you've flashed (programmed) the boards, the code stays in the microcontroller. So you can unplug it and power it up whenever you need. That causes the code to restart as if you just uploaded it!

Hope it helps

I heard something that the LCD might need some sort of shield, I have no idea what is meant by this, but if there is some sort of shield that has to be included and it deals with the LCD screen, I would be interested to know, since I am building this circuit/project for my project at school?

Hi there, sorry for the delayed answer!

Was it for this particular display? Or an other one?

There are LCD displays that come as a shield for the arduino, but this one, as well as other similar models do not. As you can see, my project is running with the display not as a shield. So, you will be fine using it like this.

Hope this helps! Good luck with your project :)

How should the receiving antenna, number of turns, length and material having a large distance to the transmitter?

More Comments