Arduino Project: Wireless Weather Station using Arduino Due, DHT22 sensor and NRF24L01+ modules!

Arduino Project: Wireless Weather Station using Arduino Due, DHT22 sensor and NRF24L01+ modules!

Dear friends welcome back! This is Nick from and today we are going to build a wireless weather station project using Arduino.
Without any further delay, let’s get started! Today’s project is this. A Wireless Weather
Station with a big 3.2” Color TFT display. As you can see, the project is up and running,
and it displays the current date and time, the indoor temperature and humidity, and the
outdoor temperature and humidity. The readings of the outdoor sensor are updated every second
in order to demonstrate that we have a reliable communication link established with the transmitter
which is outside at a distance of 5m. The readings of the indoor sensor are updated
once every minute. The heart of the project is the fast Arduino Due, and as you can see
there is no flickering of the screen when the values are updated. Let’s now see the
transmitter. The transmitter is much simpler. It consists
of an Arduino Nano, a DHT22 sensor and the NRF24L01 wireless transceiver module. The
transmitter reads the temperature and the humidity every second, and sends them to the
receiver via the NRF24L01 module. This is a one way communication link, we don’t know
if the receiver actually receives the data, but we send new data every second, so in case
we miss a package we are going to receive another one soon. Let’s now see how to build
this project. The parts needed for this project are these:
• An Arduino Due or a Mega • An Arduino Nano
• A 3.2” Color TFT display • 2 DHT22 sensors
• A DS3231 RTC module • 2 NRF24L01 Wireless transceiver modules
• 2 Breadboards • Some header pins
• And some wires The cost of the project is around 40$. You
can find links for all the parts in the description of the video. You can lower the cost of the
project by 5$ if you use the Arduino Mega instead of the Arduino Due. I haven’t tested
it, but it should work fine as well but it will be much slower.
Let’s now connect all the parts together. Before we start I highly recommend you to
watch a couple of videos before attempting to build this project. That’s a difficult
project for beginners, there are many things that can go wrong, so it requires some experience.
That’s the reason I encourage you to build the projects shown in these videos first.
Just click on the card here to watch them. Let’s first build the transmitter. It is
very simple. We connect the output pin of the sensor to digital pin 4 of the Arduino
Nano. We connect the Ground and Vcc and we are ready. All we have to do now is to connect
the NRF24L01 wireless module. Please watch the NRF24L01 tutorial I have prepared in order
to see how to connect it. The receiver part is a bit trickier. We have
to use 7 header pins and bend them like that. Then we have to place them at the following
pins. We need one to Ground and one to 3.3V. We need two at the I2C pins. We need the remaining
3 to digital pins from 6 to 8. We also have to solder three wires to the hardware SPI
pins of the Arduino Due pins. We need MOSI, MISO and SCK. Check the diagram carefully.
We can’t use female wires since the display won’t fit with the wires attached. We connect
the wires to the header pins and we are ready to attach the display.
We connect GND and 3.3V to the breadboard. Next we connect the GND and VCC of the DHT22
module and the DS3231 module to the breadboard GND rail and Vcc rail. Next we connect the
I2C pins of the Real Time clock to I2C wires and the output pin of the DHT22 sensor to
digital pin 8. That’s it, all we have to do now is to connect the NRF24L01 module.
The first pin is GND, so it goes to breadboard GND. The next pin is Vcc so it goes to the
breadboard Vcc. Be careful though, the module will be destroyed if you connect it to 5V
so be sure that you are providing 3.3V to breadboard rail. The next pin goes to digital
pin 6. The fourth pin goes to digital pin 7. The fifth pin goes to the hardware SCK
pin that we have soldered earlier. The 6th pin goes to MOSI, and the 7th to MISO. The
last pin stays unconnected! That’s it, we are now ready to power up
both the transmitter and the receiver! If everything went well, we are going to see
live data on the display. Cool, everything works fine! It wasn’t that difficult, was
it? Let’s now see the code of the project. The transmitter code is very simple. It is
almost identical with the code of the NRF24L01 tutorial. The only thing that it has changed
is that we now send real data that we get from the DHT22 sensor. Please, be sure to
use the correct library for the NRF24L01 module. You can find a link for it in the description
of the video. Let’s now see the receiver code. We need
4 libraries. I now use a different library for the display which works great! You can
download it from a link that can be found in the description of the video. After downloading
the library you have to open the User_Setup.h file comment line 13 and uncomment line 14
because the display we have is using the HX8357C driver. Now we can continue with the 3 other
libraries. We need one library for the Real Time clock, one for the DHT22 sensor and lastly
one for the Wireless module. Let’s see the code now. The first thing
we have to do is to set the time to the real time clock module if it is not already set.
In order to do it, enter the current date and time in this line of code, uncomment this
line of code here and upload the program to Arduino. Now the time is set. But, then we
have to comment this line of code again and upload the program to Arduino once more.
The code of the receiver works like this. In the setup function we initialize all the
sensors and the modules and we print the User Interface. Then at the loop function we continuously
check for new wireless data. If there is new data we save that data in variables and print
them on the display. We read the temperature and the humidity once a minute and we only
update the display if there is a change in the values. This way we reduce flickering
of the display even more! I have also prepared a version of the code with the temperature
displayed in degrees Fahrenheit. As always you can find the code of the project in a
link in the description of the video. As you can see, this project is a great demonstration
of what open source hardware and software is capable of. Within a few hours one can
build such an impressive project! Of course, this is a just the beginning. We can add many
more features to the project. I will soon add a button, so we can display graphs, and
have different modes. We can also add more sensors, data logging, internet connection
and so on. We are using the Arduino Due, so we have plenty of memory to implement many
more things. I would love to hear your opinion on this project. How do you want to see it
evolve? Please post your comments or ideas in the comments section below! Thank you!
If this is your first time here, I would love to have you subscribed. In this channel I
post videos about DIY projects every Saturday. I love making things and I believe that anyone
can make things, anyone can become a maker. That’s why I created this channel, in order
to share my knowledge with the community and learn from the community. I hope you will
join us. Until next Saturday, Watch, Learn, Build! [ Translating these subtitles? Add your name here! ]

82 thoughts on “Arduino Project: Wireless Weather Station using Arduino Due, DHT22 sensor and NRF24L01+ modules!

  1. Great project Nick! Look forward to upgrading to multi-sensors and logging. BTW, what range did you manage with the NRF24? Also it would be neat to include temperature alarm limits that would change colour when the set point is reached (single up/down settting switch?) and this might be transmitted to web via esp8266? I can see this module forming the basis of a comprehensive sensor monitoring system!

  2. I want to get a humidity sensor and I don't know which sensor to choose the DHT11 or DHT22? Should I get the separate sensor or module? Please help me as I will get one soon.

  3. hi there, I want all the data to be logged in the sd card of the ethernet shield and use esp8226 instead of the nrf modules can you help with that?

  4. Hi Nick,
    This is a really great project, your projects keep getting better & better!!
    Have you tried this library for the DS3231? It has 24 & 12 hour time as well as am & pm.
    I have done a couple of projects with the BME280, it does temperature, humidity and barometric pressure all in one small package and there are several good library's for it.
    Thanks for all your hard work

  5. Great project !!!
    Could You make this project using Wifi that I have in my house.
    Using wifi module – that I could get these parameters in whole house.
    It will be useful to many peoples, I think.

  6. Very nice project!

    While I uploading the code it shows many errors. What is the problem?

    Saw this warning:

    WARNING: library TFT_HX8357_Due claims to run on [sam] architecture(s) and may be incompatible with your current board which runs on [avr] architecture(s).

    Thanks so much for your time on this!

  7. Thank you for great channel. Can you make a project which reads data, numbers , from internet and shows those numbers on 7segment or lcd display ? For example here is the amount of your subcribers (made with thingspeak)
    Can you make it visible in arduino ?

  8. hi sir, i have to control the robot car project. Where the rear wheels in the form of a dc motor is controlled with flex sensors and front wheels in the form of a servo motor controlled by the accelerometer sensor. Robot controller with a car connected with nrf24l01. if one of the sensors to control I can. but if it combines both to control I can not. Both sensors transmit data simultaneously . dc motors and servo motors confused receive data so that its movement is chaotic. How should I fix this? can you help me.? Can I send my program to you and you see.? Please. My email: [email protected]

  9. Love the Project got it to work for the most part except the transmitter has to be reset for it reconnect to the receiver. I have a few suggestion for you series one I would love if you would take one of your projects and show step by step how to move it from a breadboard to proto board. I would also love it if you would go more in depth with code of the project explain more about what makes the project work. Thanks and keep the cool projects.

  10. i figured out what the problem with transmitter the ardunio is pulling so little current that the power bank shutoff any advice on how to make it solar

  11. Hi Nick – another excellent project (as usual). I look forwand to you extending it to read atmos pressure, wind direction and wind velocity should you be developing it this far! Cheers, Ian (Down Under)

  12. so I made several modes I made it solar and added a lux sensor the problem that I'm having is when I put the dht22 in a project box it the temp climbs is not accurate is the dht22 ok to have external or will the weather kill it.

  13. C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1529:
    error: 'REG_PIOC_SODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp: In member function 'void TFT_HX8357_Due::pushColor(uint16_t)':
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1550: error: 'REG_PIOC_CODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1552: error: 'REG_PIOC_SODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp: In member function 'void TFT_HX8357_Due::pushColor(uint16_t, uint16_t)':
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1563: error: 'REG_PIOC_CODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1568: error: 'REG_PIOC_SODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp:1570: error: 'REG_PIOC_SODR' was not declared in this scope
    C:UsersRazerDocumentsArduinolibrariesTFT_HX8357_DueTFT_HX8357_Due.cpp: In member function 'void TFT_HX8357_Due::pushColors(uint16_t*, uint8_t)':

  14. Gday Could you please do a arduino project that connects to a computer via USB and reads the temp of CPU , temp of GPU and fan speeds and possibly network data speed and displays on LCD ?

  15. Gday would it be possible to use Arduino to connect a screen and get input from a action cam that only has HDMI out connection ?

  16. Just built one and it works fine. It would be very useful to be able to pick up data from additional remote sensors and have the ability to send a message to a mobile if, for example, the lights come on in a room. This would give some alarm and house management functionality. Please keep this project going and many thanks for your work and advice. Regards Alan

  17. Hi Nick,
    There are a number of very confusing points with this project as you have stated it? Firstly, the 3.2 inch LCD you have said you use is not 3.2" but is 3.0" LCD as confirmed in the link you provided – the really big difference here is that the LCD you use has only 36 pin connector [you can actually count them in your video] and not 40 pins as used on the 3.2" LCD? Additionally, the Arduino Due has only 36 pin connector and not 40? How did you connect your LCD if it was a 40 pin LCD since you do not mention anything about having 4 pins not connected?? Further, your complete code as provided by your site for this project does not compile and shows a number of errors and therefore does not run, as has already been pointed out by a number of your other commenters – which unfortunately you have omitted to comment upon any of them? I do respect all your work and do look forward to each new project you present however, it is not at all helpful to just ignore these very valid issues as it can detract from your proven professionalism. Could I please respectfully suggest you have a look at the issues I raise here and provide your comments?
    If I may also offer another suggestion for to please consider to stop saying "how easy it is etc, etc.", as it is my opinion that you doing so is very greating and particularly so when confronted by the above apparent anomalies. Sincerely, Ian

  18. I loved your video, this excellent

    I wonder if this same project we can implement in a esp8266 d1 or mini

    I think it would be very interesting 🙂

  19. can you please provide me the program for temperature and heart beat transmitting and reciving code using nrf24l01 transceiver
    I am both arduino uno
    please help me

  20. Thanx a lot for the share ! Very Nice and usefull Videos you made , nobody could do it better than you did ! Again thank you !

  21. Please check the attached video and make a tutorial on it to make a temperature and humidity controller with DHT22

    waiting for valuable tutorial

    thanks for support

  22. Hello,
    I got a failure report

    WARNING: library TFT HX8357 Due claiming to working with architecture
    [sam] and may be incompatible with your current board working under
    architecture [avr].

    What can I do about it?

  23. For those having problems compiling, if you are using an IDE version 1.6.2 or newer, you need to load the SAM core into your IDE.

  24. In these project I got adafriut_Sensor.h
    error. and transmiter code are not upload ,
    I got these error "error status 1" Please help mi sir.

  25. Thanks for this tutorial, I have made this project and added a BMP180 AND added pressure, altitude and relative air density to both the transmitter and receiver
    screens. this I needed for my sport to set my engines more precisely. I have made 3D printed cases and it's working great.

    Again, thank you very much 😎

  26. Awesome project. Question: I am considering Due over the Arduino Uno as my first board. The Due has more features but will learning be way harder? What does the Uno have what the Due don´t? The DUE does not have an EEPROM, but Uno has 1. Will I miss that for e.g.? Will Due be harder to learn from the beginning or is it like an Arduino Uno PLUS the extras?

  27. I am wiring the receiver for the Arduino Wireless Weather station. In the instructions you use the 3.3V on the arduino Due. When you attach the 3.2 color TFT display it also used the 3.3V on the arduino Due. How do you work around this? I am not able to get 2 pins into the 3.3V hole.

  28. I want to know Relative Humidity, not just temp and humidity. Is there an Arduino Shield that can provide this information? Also would like it to data log readings.

  29. a really nice video, i need some help, i woud like to use a nerf24l01 and sainSamart 3.2TFT LCD simultaneously on arduino mega. I have tried out but unfortunately it didn't work out. i woud be grateful for your help, thank you in advance. =)

  30. Is it possible to add a feature that shuts down the LCD screen, when you press a button it turns back on for lets say 5-10 seconds?

  31. Great video as always. How long is the battery life with this setup (display, sensors…) with this Xia power bank? (just aprox.) Thanks!

  32. Hey man i have a problem with my project how do you do that only the number that changes does refresh on the screen. i always had to fill.rect on the location from the hole number and than it flickers but at yours it look that its only changing the char who changes

  33. What temperature/humidity sensors can I use outdoors while its raining a lot? I know I have to protect the terminals but what sensors are able to work with water?

  34. here a link to a library taken from banggood.
    this one works perfect with the display and a arduino mega
    for the weatherstation some changes at the code must be done

  35. great project could you add more the 3 NRF24L01. is it possible? please explain how they transmitted and receive data at the same time

  36. i am trying to build a arduino/nFR24L01 with temp sensor so that at a particular set temp it sends a single to another arduino/nFR24L01 with relay to turn on a cooler/heater. what is your thoughts? thanks btw great presentation.

  37. And i liked the projetc, i ask you a thing, is possible to connect an ultrasonic sensor, an arduino, an a arduino wifi shield, to can in a HTML web (I know HTML) or in other web, see the value of the sensor (the distance), or if we can see it in a LCD, Remote, like with wifi or bluethoof transmitter Thanks!

  38. should the transmitted part must be connected with power source like that? Does anybody know how to make a sensor like TPMS. Just sensor in the tire but can communicate with the receiver in the car.

  39. Hi,
    I want to build a real time clock timer however I have some problems to show the time on TFT LCD display- white screen appears. The LCD screen is working fine i.e I can display graphics and text but when it comes to display the time it does not work as it should. I have noticed that when the program executes command t = rtc.getTime() the screen is being wiped out – not sure why ?

    The hardware I have used:
    – 2.8'' TFT LCD display(ILI9341)
    – ds3231 RTC

    Do you know how to fix this problem ?

    Code below:
    #include <Adafruit_TFTLCD.h>
    #include <Adafruit_GFX.h>
    #include <TouchScreen.h>
    #include <DS3231.h>
    #include <Time.h>

    DS3231 rtc(SDA, SCL);
    Time t;

    #define LCD_CS A3
    #define LCD_CD A2
    #define LCD_WR A1
    #define LCD_RD A0
    #define LCD_RESET A4

    #define TS_MINX 141
    #define TS_MINY 140
    #define TS_MAXX 940
    #define TS_MAXY 888

    #define YP A3
    #define XM A2
    #define YM 9
    #define XP 8

    #define BLACK 0x0000
    #define WHITE 0xFFFF


    TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

    boolean buttonEnabled = true;

    void setup() {
    uint16_t identifier = tft.readID();
    tft.drawRoundRect(0,0,320,240,5, WHITE);

    void loop() {

    t = rtc.getTime();
    tft.print("Date: ");

  40. Since I'm not up to speed on Python, I'd like to see a 2nd DHT22 for outdoor Temp. & Humidity. I'd also like to send it to a, (Serial or i2c) LCD. I also would like to do this with a NANO.

  41. Καλησπέρα φίλε εξαιρετικά τα βίντεο σου συγχαρητήρια, για το part που είναι έξω αμα παρεμβάλεται τοίχος ή πόρτα θα υπάρχει πρόβλημα? και επίσης με το power bank ποσο αντέχει το part που θα είναι εξω αν και το arduino nano εχει πολύ μικρή κατανάλωση …. με ένα power bank των 10.000 maH πόσο αντέχει?

  42. can the nrf24 detect the number of people in certain distance?
    im in project must finish, i hope somebody can answer it soon.
    thank you

  43. i have nrf24l01 with antenna and i have one without antenna .. They can not communicate with each other
    Should they be the same type

  44. Tft 1.8 + arduino + NRF24L01 receiver
    Arduino + NRF24L01 transmitter
    Hi am form Poland. 

    I'd like to make a weather station, inside and outside sensor.  I want to show the temperature on the tft 1.8 display.  initially I had oled display 0.96 i2c but it is small.
    can you help tft 1.8 spi + NRF24L01 display connection?  it's difficult to connect to work properly.  do you have any scheme + arduino code transmitter + receiver?  please help.
    Sorry for my English. 

    Best wishes [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *