loading

This project, builds on Wunderground weather forecast via the Internet.

Specs:

1. 3 days weather forecast (Low&High temps, probably of precipitation, condition icons)

2. Current weather conditions (Current temp, feelslike temp, humidity, pressure)

3. Current wind directions & speed with analog gauge meter.

4. Indoor temperature with Dallas 18b20 Temperature sensor.

5. NTP time via Wunderground time server.

Step 1: Materials:

1. Arduino Mega 2560,

2. 7" inch TFT display (I used this display Ebay Link )

3. TFT/SD shield (I used this shield Ebay Link )

4. ESP8266 Serial WiFi module,

5. Logic level converter or use voltage divider. ( Sparkfun Link )

6. Dallas 18b20 one wire temperature sensor.

7. 40 pin Male to Female Ribbon cable (Ebay Link )

8. For 7" LCD case. Maybe use this or another case. (Ebay Link )

9. 256mb to 2gb(maximum) SD card for icon storage. (Must be FAT16 formatted).

10. 9v or 12v power supply or usb cable for power connection.

11. Some wires and soldering iron.

Step 2: Connections :

Connections we make, as shown in picture. After making the connections, we are installing a TFT/SD shield.

I use voltage divider instead of logic level converter. But I would definitely recommend using logic level converter.

Step 3: Lcd Brightness Control (If You Want to Skip This Step!)

CAUTION : May damage the TFT Screen. If you dont want to change the brightness, skip this step.

Remove the resistor of LED_A.

Connect cable as in the picture.

And connect Arduino pin 12 (must be connect PWM pin).

Step 4: Icon Files and Libraries

Necessary libraries :

Henning Karlsen UTFT Library - Link

Henning Karlsen TinyFat Library - Link

Henning Karlsen UTFT_TinyFat Library - Link

Time Library - Link

Timer Library - Link

OneWire Library - Link

Dallas Temperature Library - Link

ArduinoJson Library - Link

Unrar Icons.rar file and copy files to "SdCard" root folder.

Step 5: Sketch File Modifications

First of all edit sketch file for your information :

SSID "Your Ap Name" - For example SSID "Tufan_Home"

PASS "Your AP password" - For example PASS "1234567890"

LOCATION ID "Your location name" - For example LOCATION ID "England/London"

GMT Settings this line : "ntpTime = ((longConv) + 7200);" //7200 = +7200 secs = +2 Hour ;)

If you have connected TFT Brightness PWM pin, uncomment this line --- //analogWrite(tftPwmPin, 250);

Have fun!

Edit Note : (I have uploaded last updated files 28.01.2015)

<p>I've tried to compile this with the latest IDE build and using the libraries linked and it is using a huge amount of dynamic memory - how can I reduce this to fit on a Mega ? Its using 150% of available dynamic memory</p>
Hello good project
<p>Very cool project, I can't wait till I get mine complete! I've got it all built (I used a 5&quot; screen from the same supplier so it works with everything, same 800x480 resolution as the 7&quot;) but I'm not getting anything on the screen. When I hooked it up to the terminal I got continuous timeouts trying to connect to api.wunderground.com.</p><p>After investigating I found the ip address given was the problem and changed it to 38.102.136.138 and checked and that ip translates to api.wunderground.com but I'm still getting continuous timeouts when it tries to connect just as the previous poster experienced.</p><p>---------------------------- (I found turkish on your webpage so I translated this in hopes of a response)</p><p>Ben benim tam d&ouml;nene kadar &Ccedil;ok g&uuml;zel bir proje , ben can not wait! Ben ama ekranda hi&ccedil;bir şey alamıyorum inşa t&uuml;m ( &quot;Bu , her şeyi ile 7'ye aynı 800x480 &ccedil;&ouml;z&uuml;n&uuml;rl&uuml;k &ccedil;alışır , b&ouml;ylece aynı tedarik&ccedil;iden ekranı &quot; Ben 5 kullanılır) var. Ben terminale onu bağladım zaman api.wunderground.com bağlanmaya &ccedil;alışıyor , s&uuml;rekli zaman aşımına uğrayan var . <br><br><br>Araştırdıktan sonra ben verilen ip adresi sorun bulundu ve 38.102.136.138 bunu değiştirdi ve kontrol ve o ip api.wunderground.com &ccedil;evirir ama &ouml;nceki poster deneyimli gibi bağlanmaya &ccedil;alıştığında ben hala s&uuml;rekli zaman aşımına uğrayan alıyorum </p>
<p>Thanks for the Turkish language ;) I will try to solve the problem as soon as possible to examine. Would you send messages in the serial window?</p>
<p>Unfortunately, I can't. I'm not getting the timeout issue anymore but I'm still not seeing anything on the display. I think it's having an issue with my network. </p><p>I'm powering the arduino off of an adjustable output ac adapter at 7.5V. When it's connected just to the adapter the blue led on the esp8266 is on (indicating that it's connected from what I understand). I've assigned a static IP address to the mac address of the esp8266 and when I monitor it I get confusing info... I see a very large number of ARP requests but they are all getting dropped by the firewall because of a null source ip address. I'm not very great at coding but it doesn't look like the esp8266 is getting an ip address or anything via dhcp and is getting rejected by the firewall?</p><p>I can't do anything with the terminal as when I connect the usb cable to the arduino the blue led on the esp8266 goes out. I'm guessing when I plug in the usb cable that it can't power the screen and the esp8266 off of the (powered) usb hub that it's connected to. I'm not sure though, is the serial monitor using the same uart as the esp8266 or am I confusing things?</p><p>In both scenarios I can see the screen powered on by the slight glow of the backlight but nothing ever comes up on it. I know the screen works as I ran the demo from the library and it displays just fine.</p><p>--------------------------------------------------------------------------</p><p>Ne yazık ki, ben yapamam. Artık zaman aşımı sorunu alamıyorum ama hala ekranda hi&ccedil;bir şey g&ouml;remiyorum. Ben benim ağ ile bir sorunu yaşadığını d&uuml;ş&uuml;n&uuml;yorum. </p><p> <br>Ben 7.5V bir ayarlanabilir &ccedil;ıkış AC adapt&ouml;r kapalı arduino g&uuml;&ccedil; var. Sadece mavi esp8266 led adapt&ouml;re bağlı olduğunda (ben anladığım kadarıyla bağlantılı olduğunu g&ouml;steren) &uuml;zerindedir. Ben esp8266 mac adresi statik bir IP adresi atanır ettik ve ben kafa karıştırıcı bilgi almak onu izlemek ... Ben ARP istekleri &ccedil;ok sayıda g&ouml;rmek ama hepsi nedeniyle null kaynak g&uuml;venlik duvarı tarafından bırakılan alıyorsanız IP adresi. Ben kodlama &ccedil;ok iyi değilim ama esp8266 dhcp yoluyla bir ip adresi ya da bir şey oluyor ve g&uuml;venlik duvarı tarafından reddedilen oluyor gibi g&ouml;r&uuml;nm&uuml;yor? </p><p>Ben mavi esp8266 led arduino i&ccedil;in usb kablosu bağladığınızda olarak terminalden dışarı gidiyor bir şey yapamaz. Ben ekran ve bağlı oluyor (powered) usb hub kapalı esp8266 g&uuml;&ccedil; olamaz usb kablosu taktığınızda ben tahmin ediyorum. Ben seri monit&ouml;r esp8266 aynı UART kullanan ya da ben bir şeyler kafa karıştırıcı duyuyorum, ama emin değilim? </p><p> <br>Her iki senaryoda da ben arka ışık hafif kızdırma tarafından desteklenmektedir ekranı g&ouml;rebilirsiniz ama hi&ccedil;bir şey &uuml;zerinde &ccedil;ıkageldi. Ben k&uuml;t&uuml;phaneden demo koştu ekran &ccedil;alışıyor ve gayet g&uuml;zel g&ouml;r&uuml;nt&uuml;ler biliyoruz.<br></p>
<p>Actually , even if the connection timeout, image on the screen should be . so we need to resolve this situation before . What were you doing compile with Arduino version ?</p>
<p>1.65, now that you mention it, it wouldn't compile originally. I had to change homett.c and rain.c and refresh.c, they had I think prog_uint16_t for the array type and it was choking on that and I searched the web and found a quick 'fix' to change them to const uint. I'm guessing that's the issue here? </p>
<p>Please try to compile Arduino 1.0.5 IDE (with the original files), i have not tested yet for 1.65. I think the problem will be fixed.</p>
<p>Unfortunately it's still not working =( I compiled and uploaded it in 1.05 (no issues with the .c graphics files this time). It's still not displaying anything. </p><p>Just to verify, all that I changed in the code was putting in my AP, the pw for the AP, I changed the IP to the one I found for api.wunderground.com (38.102.136.138), and I set my location code to the one I found for my zip code (USAZ0166). I'm wondering if the location code is incorrect and that's keeping it from running? </p><p>I'm not seeing anything in the terminal window but when the usb is connected the blue led is off on the esp8266 but it goes on when I disconnect the usb and it's running off the AC adapter. </p>
<p>also, i have the 5&quot; screen from the vendor but it's still the same 800x480 resolution as the 7&quot;, I really don't think that's the problem but I'm really not too sure</p>
<p>If you are using Coldtears 5&quot; , you must change the following line : &quot;UTFT myGLCD(CTE70, 38, 39, 40, 41);&quot; CTE50 should write instead CTE70 .</p>
<p>&lt;addendum&gt; The arduino just completely gave up this morning but not before revealing the power to be the issue, namely the chinese board couldn't do it so I'm ordering a real arduino mega and will report back.</p><p>I unhooked the esp and powered it up on usb power and the display came to life showing the internal temperature just fine. When i reconnected the esp it started to get really hot and then I think something overheated or gave up because now the arduino is totally dead. Go Go China =\</p>
You need a separate regulator for the esp8266 3v3 power as it draws much more current that the arduino 3v3 pin can supply hrnce the overheating of the on board regulator.search ou ams 117 3v3 800ma regulator on ebay.
<p>that makes perfect sense, I have an ld 33v that I'm pretty sure is rated at 800ma. I hook that up to the 5v line on the Arduino mega, correct?</p>
Connect to a 5v supply direct, dont rely on the 5v reg on the mega as that cant supply enough current either if you are using a raw higher voltage to the mega.
<p>do i need to connect the ground on the esp (from it's power supply) to the ground on the arduino (powered via usb)? I'm not exactly clear on what to do with seperate grounds. If I'm powering the arduino from the same power supply do I need to have a wire connecting the grounds then?</p>
<p>do i need to connect the ground on the esp (from it's power supply) to the ground on the arduino (powered via usb)? I'm not exactly clear on what to do with seperate grounds. If I'm powering the arduino from the same power supply do I need to have a wire connecting the grounds then?</p>
<p>I changed it to CTE50 as specified but still not working. </p><p>I just tried the 3.3v line for the esp8266 and nothing changed except the blue light on the esp started flickering as if it was having trouble drawing power so I switched it back to the voltage regulator and the 5v line.</p><p>Does it make sense that I'm not seeing anything, and I mean not a thing on the serial port? Why does the blue light on the esp8266 go out when I plug in the usb port?</p><p>The only thing different from when I first managed to get the timeout errors was the screen wasn't hooked up correctly and I don't think it was drawing power.</p><p>Could it be this arduino mega isn't a good clone? I got it off of ebay and for far less than the retail of a mega so I know its a knock-off. Should I think about replacing the mega? I've noticed this board gets really really hot over by the power pins.</p>
<p><strong>I was not able to make this work with the Spankfun Logic Level Converter with the connection showed by the author so I contacted Sparkfun and this is the reply I got from them.</strong></p><p><strong>My Question:</strong></p><p><strong>FlipFlop </strong>wrote:</p><p>Are the connections to the logic level converter correct in the attached</p><p>pic? I bought 3 of your logic level converters form <a href="http://www.roboticspk.com/" rel="nofollow">www.xxxxxxxxxxx.com</a> in<br>Pakistan, so far I have tried one in this configuration and nothing<br>happens, no lights in the LLC and the esp8266 does not power up. If I<br>connect the same esp8266 with the Chinese version of the LLC both LLC and<br>esp8266 power up and I can see the esp8266 transmitting in my wifi analyser<br>app for android. Will your LLC work with only ground and no VCC connection?<br>Kindly help at your earliest.<br>Thank you<br>FlipFlop</p><p><strong>Sparkfun's reply:</strong></p><p>OCT 05, 2015 | 08:26AM MDT<br><strong>Liz G</strong> replied:</p><p>Hello,</p><p>Thank you for contacting us! The Logic Level Converter also needs connections at the HV (Higher Voltage) and LV (Lower Voltage) pins so that it can accurately shift the signal levels. Without these connections, the board will not work as expected. So, in addition to the connections you have, you will need to connect the HV pin to 5V and the LV pin to 3.3V. For more examples and information about using the LLC, have a look at the Hookup Guide: <a href="https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide" rel="nofollow">https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide</a></p><p>Best regards,<br>Liz<br>&mdash;<br>Technical Support<br>SparkFun Electronics, Inc.<br>6333 Dry Creek Parkway<br>Niwot, CO 80503<br>E-mail: <a rel="nofollow">techsupport@sparkfun.com</a></p>
<p>I got a new mega (genuine, definite differences) but still no luck. Is there any debugging lines I could enable or anything so I could get an idea of whats going on and how far it's getting? </p><p>It displayed properly once, it showed the gui layout and the indoor temperature registered properly too. (The esp8266 was unhooked at the time. This was on the old board)</p>
<p>Thanks to good project</p>
<p>Is it possible to converta sketch to screen 2.8 &quot;?</p>
<p>Yes it is possible but drawings need to be re-coded and replace pictures for different resolutions. I will soon prepare for different resolution versions.</p>
<p>I'm not certain but I think as long as it's compatible with the libraries and the shield I think you'd be ok but I'm not sure if all the graphics would scale with the different screen resolution. The 5&quot; screen I got is the same resolution as the 7&quot;. The ebay seller with the screens and shield has a 2.8&quot; screen here</p><p><a href="http://www.ebay.com/itm/2-8-inch-TFT-LCD-module-320x240-ILI9325-touchpad-SD-arduino-AVR-STM32-ILI9328-/121139469242?pt=LH_DefaultDomain_0&hash=item1c34799bba" rel="nofollow">http://www.ebay.com/itm/2-8-inch-TFT-LCD-module-32...</a></p><p>but I really don't know if it'd work or not?</p>
<p>The display2.8 &quot; image is superimposed</p>
<p>What isthe firmwareused to ESP8266</p>
<p>I used firmware 0.9.2.2</p>
<p>This needs more detailed explanation. Where does the other end of the 40 pin male to female connect? It would have been better if you had given more details on the libraries and icon files. Other than that it's a great project and I am going to try to build it with whatever limited instructions you have provided here. Thanks.</p>
<p>G&uuml;zel bir proje olmuş başarılar...</p>
Teşekk&uuml;r ederim.
<p>Nice project. I'm building very similar project - ESP8266 touch screen thermostat with EasyIoT library, but your graphic display is nicer. I will look in your code to get some ideas :)</p>

About This Instructable

57,209views

173favorites

License:

More by tufantas:Arduino TFT Forecast Weather Station with ESP8266  
Add instructable to: