Introduction: 2.4 TFT Arduino Weather Station With Multiple Sensors
A portable Arduino weather station with a TFT LCD and a few sensors.
Step 1: 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.
Step 2: Parts Needed
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.
Step 3: Hardware Setup
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.
Step 4: 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.
A Small update! Now the Arduino is displaying the dew point!
The heat index is displayed both Celsius and Fahrenheit.
The Mcufriend version is now reporting the values to the Serial monitor.
Step 5: Let's See What We Have Made
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.
Step 6: Compiling Errors
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.
Step 7: Done!
You are done.
Use it as you like.
Thanks for reading my instructable.