loading

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

<p>If you put one of these 433MHz Helical antennas on your receiver you'll get improved reception. I just bought some of they seem to make an improvement. Continue to use a straight 17CM wire for the transmitter.</p><p><a href="http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2374313.m570.l1313.TR0.TRC0.H0.TRS5&_nkw=+433MHz+Helical+antenna&_sacat=86720">433MHz Helical antenna Ebay search link</a></p>
<p>I'm reading the &quot;inside temp&quot; with a bmp180 sensor, and I can see the temperature with two decimals, but in the &quot;outside temp&quot; (Ext.) I only have the temperature with no decimals.</p><p>I don't know if this is a limitation of the library... :(</p><p>Manu.</p>
<p>Darkcook you should write an Instructable on how you added the bmp180. Start the article from scratch covering what indigod0g wrote and then add your modifications. It would great. VEL</p>
<p>Volthaus, </p><p>I'm modifying the code because I want to add more nodes and sensors. Also I want to use a LCD Display, it's a big project for me and I home finishing soon.</p>
<p>Hi Manu,</p><p>I'm really glad you liked it. I'm not really sure about the decimals though...</p><p>Your setup looks killer!</p><p>Jim</p>
<p>Hi Indigod0g,</p><p>I'm using a DHT22 sensor in the emitter, that can measure temperature and humidity with two decimals, as you can see it in the serial monitor.<br><br>**********************<br>temperature: 24.40<br>Humidity: 39.20<br>**********************<br>but the emitter only sends the entire part of the data, in this case:<br><br>**********************<br>temperature: 24<br>Humidity: 39<br>**********************<br><br>I think that is not the same 34.99 &ordm;C than 34.00&ordm;C. Because this, I'm searching how I can send all the value, (24.40 &amp; 39.20).<br>Unfortunately, I'm not a programmer, so this is a hard work for me, but this doesn't matter me... I have google and (I hope) the help of the comunity. :)<br><br>I have added a BMP180 sensor for the interior temperature and I have changed the screen with a Blue LCD. Now I'm trying to add a RTC...<br><br>Thanks again for your great work.</p>
<p>Hey, I just noticed and have not tried it, but try making the <strong>temp </strong>and <strong>humi </strong>variables to <b>float </b>type in the receiver, maybe that is why they appear as integers in the screen.</p><p>Hope this solves it for you</p>
<p>hola amigo me puedes pasar el codigo heee gracias</p><p><br></p>
<p>would this work with a DHT22, for more acurate data?</p>
<p>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 (<a rel="nofollow">https://github.com/adafruit/DHT-sensor-library) </a> which allows you to easily swap between the DHT11 and DHT22 sensors.</p><p>I can provide the code but need to find a convenient way to post it. I am new to this posting online stuff :)</p><p>Andre</p>
<p>here's the code:</p><p><a href="https://codebender.cc/sketch:124330" rel="nofollow">https://codebender.cc/sketch:124330</a></p><p>let me know if it works with your setup.</p>
<p>alini I loaded your code into my transmitter and switched out the DHT11 with a 22 and it worked perfectly. Thanks.</p>
<p>I have not tried using a DHT22 on this project, but it should. Please take a look <a href="http://playground.arduino.cc/Main/DHTLib" rel="nofollow">here</a> for the use of libraries for the DHT series.</p>
<p>I had the project working, &quot;Everything was working&quot; 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.</p><p>Even changing out the DHT11 did not change anything, so now I am not sure what it could be? </p>
<p>I know it's been 7 months since your post but I was wondering if you tried adjusting the LCD contrast?</p>
<p>Thanks a lot indigod0g for your project. I've some problems with my weather station, I only receive something like that (see attached image). Any Idea? thanks in advance.</p>
<p>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% ). </p><p>Temp in the room is 72 degrees.</p><p>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.</p>
<p>I was wondering if there is anything that needs to changed with any of both codes for either of the arduino boards?</p>
<p>Hi,</p><p>from what I can tell in the photo, you have connected the DHT11 on digital pin 11, this should be on digital pin 4.</p><p>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.</p><p>[this is noted, I will correct them ASAP, I'm just swamped right now)</p><p>Please do the following:</p><p><br>- 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.</p><p>- 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.</p><p>- 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.</p><p>Lastly, I thought that by saying &quot;stay plugged in&quot; 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).</p><p>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!</p>
<p>Can I change Arduinos UNO for ATTiny85 or Nano without modify nothing? (Sorry I am new in that)</p>
<p>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?</p>
Hi!<br><br>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!<br><br>Hope it helps
<p>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?</p>
Hi there, sorry for the delayed answer!<br><br>Was it for this particular display? Or an other one?<br><br>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.<br><br>Hope this helps! Good luck with your project :)
<p>You did answer my question. Thank you for your assistance.</p>
<p>How should the receiving antenna, number of turns, length and material having a large distance to the transmitter?</p>
<p>Hi, I guess you are trying to make the communication distance bigger?<br>Try reading from these links:<br><a href="http://forum.arduino.cc/index.php?topic=216467.0" rel="nofollow">http://forum.arduino.cc/index.php?topic=216467.0</a><br><a href="http://electronics.stackexchange.com/questions/103884/boost-433mhz-receiver-module-receiving-signal-xy-mk-5v" rel="nofollow">http://electronics.stackexchange.com/questions/103...</a><br><br>Unfortunately, I'm not an expert on this topic :(<br><br>Hope it helps!</p>
<p>hola</p>
<p>hola!</p><p>I know no spanish, and I see an answer is here already, but you can also find the library here:</p><p><a href="https://github.com/adafruit/DHT-sensor-library" rel="nofollow">https://github.com/adafruit/DHT-sensor-library</a></p><p><a href="http://playground.arduino.cc/Main/DHTLib" rel="nofollow">http://playground.arduino.cc/Main/DHTLib</a></p>
<p>Hola ana y richard,</p><p>Est&aacute; puesto un poco m&aacute;s abajo por Alini, este es el enlace.</p><p>https://codebender.cc/sketch:124330#weatherStationTransmitter_allDHT.ino</p>
<p>hola amigo me puede pasar el codigo con dht22 gracias</p>
<p>Your Instructable is a really well done piece of work. Thank you for taking the time to put this together for the community!</p><p>I noticed your tutorial is calling for connecting both the RF433 <br>receiver's data pin and the LCD's Enable pin to digital pin 11 and the <br>LCD RS pin to digital pin 12. It should be LCD Enable pin to Arduino digital pin 6 and the LCD RS pin to Arduino digital pin 7.<br>In the picture of my transmitting station you can see I have setup a boost converter so I can run the Arduino with a 18650 3.7v Li-Ion battery and then I added a Li-Ion battery charging module that gets its power from a 5v solar panel to keep the 18650 charged. When it comes time to put it all into a case I will build a barebones Arduino with no LED to to run the TX. And I hope to add a BMP180 to measure air pressure. Also slow the update time to the RX station to once a minute and use the LowPower library so the Arduino can sleep between updates. Check out deba168's Instructable for more info: https://www.instructables.com/id/SOLAR-POWERED-ARDUINO-WEATHER-STATION/</p>
<p>Hi,</p><p>thank you for noticing the pins, I corrected them.</p><p>Sorry for any inconvenience.</p>
<p>Sure thing indigod0g. Your Instructable is a very fine piece of work and I know writing all that can be confusing. Please keep up the good work my friend.</p><p>VEL</p>
<p>Edit and modified a bit of the code with added RTC and it works! </p><p>Thank you for this post, this one is a good practice</p>
<p>Looks great! Loving the graphics on the LCD :)</p>
<p>A very nice Instructable,<br>I have built this, but with Alini's modifications (thanks Alini) because of I'm using a DHT22 sensor.<br><br>I see that the receiver only shown the temperature in entire numbers, without decimals. <br>Do you think that is possible to send these decimals from emiter to receiver.<br><br>Thanks a lot for your good Work<br><br>Regards.<br><br>Manu.</p>
<p>Hi, I think there is some discrepancy in transmitter code. First you are writing that DHT is connected to pin 11 and transmitter to pin 4, but then in the code you have DHT on pin 4. Where is the transmitter pit defined in the code?</p>
<p>Hi,</p><p>thanks for pointing that out, it was a typo and was been corrected.</p><p>The transmitter pin is predefined in the <a href="https://codebender.cc/library/VirtualWire#VirtualWire.cpp" rel="nofollow">VirtualWire library</a>.</p>
<p>There are a number of typos in the instructions that made it pretty hard to get this to work (at least for a beginner like me).</p><p>Data Pin for DHT11 goes to digital 4 not 11</p><p>Data Pin for RF433 transmitter goes to digital 12 not 4</p><p>Data Pin for RF 433 receiver goes to digital 11 not 12</p><p>Backlight of LCD display needs to be powered: pin 15 to 5V and pin 16 to GND</p><p>Also, the Fritzing diagram for the transmitter is not correct.</p><p>All in all still a great project and an excellent learning experience!!!</p>
<p>Hi alini, </p><p>I'm glad you like the project and thank you for your comment!</p><p>In the written instructions,</p><p>data pin for the DHT11 goes to the digital pin 4,</p><p>the data pin for the RF433 transmitter goes to the digital pin 12 and</p><p>the Data pin for the RF433 receiver goes to digital pin 11,</p><p>all as you say they should be.</p><p>Maybe I miss something in your comment? Please do tell me if that is the case.</p><p>For the Fritzing diagram, I see the DHT11 on pin 11, should be 4, which is unfortunate and will be corrected ASAP. But the transmitter is on pin 12, like on the photo and the typed instructions.</p><p>In order for the backlight to work, you need to connect the pins as you said.</p><p>Jim</p>
<p>Hi Jim,</p><p>it looks like I was using an older version of the instructable that I printed out before your recent revisions (I like to scribble on the instructions). I better be more careful next time!</p><p>Andre</p>
<p>Hello,</p><p>First of all, thank you for creating this intractable, it is really nicely done. Ten to the second little &quot;thing&quot; or problem. Where do I download the Easy Transfer library? The download link in step 4 gets me to a code blender site and whee do I download it from there? Thanks a lot for your help,</p><p>Samuel</p>
<p>Hello and thank you for your interest.</p><p>You can download the library <a href="https://github.com/madsci1016/Arduino-EasyTransfer" rel="nofollow">here</a>. It will also download some other libraries that are in that repository, use what you need :) The library in codebender can de used when you program your project through the site. </p><p>I hope this helps. Feel free to ask anything else you might need.</p><p>Jim</p>
<p>Well done.<br>But if you feel like an Arduino might be a bit of overkill for just temperature and humidity, An Attiny85 can handle a DHT11 and transmitter as well as a receiver and LCD.<br>nevertheless, well done</p>
<p>Thank you!</p><p>You are right. Each may customize this and use whatever he pleases. I used what was in my arsenal at the time :)</p>
<p>Please do not take it as criticism, it wasn't meant that way. In the end, an Arduino, especially as base station will give you a lot of options on how you present the data</p>
<p>and if i may add... a bare attiny will cost around a dollar: a complete arduino pro mini can be found for say 1.80 USD if you buy a couple, so price wize it isnt that much of a savings (unless you use a lot of them), I just have this anal retentive character trait that I don't want to 'underuse' a chip :-)</p>
<p>Cool!</p>

About This Instructable

25,011views

362favorites

More by indigod0g:Mini weather station 
Add instructable to: