2.4 TFT Arduino Weather Station With Multiple Sensors

by Lacybad in Circuits > Arduino

29055 Views, 38 Favorites, 0 Comments

2.4 TFT Arduino Weather Station With Multiple Sensors

IMG_20181224_192641.jpg
IMG_20210201_232255.jpg

A portable Arduino weather station with a TFT LCD and a few sensors.

The Story

Recently i had a little free time to play with arduino.

Found a sketch on the internet a few months ago with a TFT LCD with a DHT sensor and a RTC. So i wired it up, made some modifications to the sketch to work. After uploading it was working terrible!! So after 4 hours i realised it is pointless to suffer with it. I thought i will make a weather station for myself that i will use at my home.

Let's start!

Parts Needed

1-unid-sensor-de-intensidad-de-luz-digital-foto-resistencia-para-arduino-sensor-fotoresistor.jpg
51-fjA52JRL._SX425_.jpg
11021-01.jpg
HTB13P0HLpXXXXa.XpXXq6xXFXXX6.jpg
IMG_20181218_145346.jpg
IMG_20181218_145359.jpg

The parts needed:

- Arduino uno or Mega2560 (already had)

- 2.4 tft lcd with Ili932x or 9341 IC (already had)

- DHT11 (already had)

- DS18b20 (already had)

- A 4 pin light sensor LDR (analog and digital)

- Some jumper wires (already had)

- Arduino IDE and the correct libraries

So at this time it was no cost for me.

Hardware Setup

IMG_20181224_175327.jpg

Well it was no big deal. The chinese Arduino clones are not always bad. When the board has a second line where you can solder the pins, that makes a bit more moving space with the wiring.

So i soldered the pins the opposite way (to look down) to make job easier. See the photo.

At this moment we got 3 5V , 3 3.3 V and a couple of GND pins.

You can now connect multiple sensors to the board this way.

The DHT sensor is connected to Digital 11.

Temperature sensor is connected to Digital 10.

LDR is connected to Analog 5.

Digital 12 and 13 is free. So you can still add 1 sensor if you want. (I want)

Because of the LCD no I2C sensors can be connected to the board. Lcd needs the A4 pin for RESET.

Sad, but true.

Software

Download the libraries and the sketch.

I am uploading the libraries for this project.

The SPFD5408 library is very good to drive our 2.4 TFT lcd, but i think it is only good for ILI932X ;9340 ; 9341 IC.

2019.01.05.!!

A Small update! Now the Arduino is displaying the dew point!

The heat index is displayed both Celsius and Fahrenheit.

2019.01.06!!

The Mcufriend version is now reporting the values to the Serial monitor.

Let's See What We Have Made

IMG_20181224_192641.jpg
IMG_20181226_151300.jpg
IMG_20190105_102949.jpg
IMG_20190105_102959.jpg
IMG_20190105_135701.jpg
IMG_20190106_121837.jpg
IMG_20190106_121855.jpg
IMG_20190106_122051.jpg
IMG_20190106_122115.jpg
IMG_20190106_122200.jpg
IMG_20190106_122207.jpg
IMG_20210201_232331.jpg

Our Arduino is diplaying the values from the sensors with 1000ms update rate.

What we see:

- The temperature from the DHT sensor in the ring meter

- Humidity on the upper right corner

- Temperature from the DS18B20 sensor

- Heat index in Fahrenheit

- Light intensity in percentage (still a bit buggy)

- Temperature in Fahrenheit

- Dew point in Celsius

- Absolute humidity calculation

But! We still have 2 digital pins free, so there is still room for a little improving to maximize the capabilities of our Arduino board.

I am planning a few (and visual) upgrades to this weather station in the near future to make it work and look better. As soon as i have enough free time of course......

The 3rd version is for McuFriend compatible displays. I had a 1580 and 5408 IC driver display which i did not use for almost 2 years. So i made some modification to work with them. I uploaded my modified McuFriend library.

Compiling Errors

Error.jpg
No error.jpg

Recently i am having compiling errors with Arduino IDE (and not just me). This is an often returning problem.

If you have a compiling error with this sketch please copy it out to a new Arduino window and try again.

This works for me, hope it will for you too.

Because of the ESP Core i am still sitting on Arduino IDE 1.6.13.

Why not upgrade? Just because this version is very convenient for me.

Done!

You are done.

Use it as you like.

Thanks for reading my instructable.