Close
0%
0%

YAW - ESP8266

Yet Another Weather station that is updated by internet.
This one runs on a standalone ESP8266 with an OLED display

Similar projects worth following
There are published many weather display projects. Most use an Arduino for the sketch to run on.
These Arduino based projects often use the spartan AT-command set.
This project uses the ESP8266WiFi.h library with the Arduino-ESP8266 IDE add-on
The component count is really very small. Just a ESP8266 and a small Oled display. A few resistors and a capacitor.
Ofcourse you need a 3.3V powersupply or 3 Ni-Mh batteries. Probably a Li-ion battery of 3.6V will be good too. Because a fully charged Li-ion cell will be around 4V a simple diode can be put in series with the cell to bring voltage down to less than 3.6V.

Code can be found on: https://github.com/costonisp/YAW-ESP8266/
  • 1 × ESP8266
  • 1 × 128x64 I2C OLED
  • 2 × resistor 3k3 to 10k pullup resistors for SCL & SDA
  • 1 × tantalium capacitor 2u2 to 4u7 directly soldered on module between Vcc and ground for stability
  • 1 × resistor 10k pull-up resistor for the reset pin

Enjoy this project?

Share

Discussions

co sto wrote 12/08/2015 at 00:38 point

Hi Nick and chiprobot.

Sorry to hear you have problems getting this working.
I downloaded the files from github to check if the sketch is still working and the IP is right. I can confirm that everything is still working so you must make an error somewhere.

Maybe you use the wrong Json library.
Make sure you have the one from this url: "https://github.com/bblanchon/ArduinoJson.git";
Also make sure you have this line in the IDE-preferences as additional Boards manager URL's: http://arduino.esp8266.com/stable/package_esp8266com_index.json.
Recently there is a new release 2.0.0 , uninstall the old one and reinstall the new one with the board manager.
And last if you use a ESP07 or 12 you better change the I2C lines to pin 4 and 5.
Change the line in the setup() for the different pins.
Wire.begin(4,5);   // I2C for ESP-01: (SDA,SCL)

I hope this solves your problems and reset instabilities.

  Are you sure? yes | no

Nick wrote 11/05/2015 at 21:08 point

Thanks for the prompt response. The initial problem was my bad - copying text from web pages sometimes introduces stuff that is not intended. At my age I should have realised...


Your original sketch has the i/p address for the wunderground api as 23.222.152.140. But this currently resolves to a sub-domain of "Akamitechnologies". Your original sketch simply hangs with the serial monitor saying "connecting to 23.222.152.140".

So I changed that line to read "#define HOST "api.wunderground.com"    

It compiles, and starts but when it successfully connects to api.wunderground.com, the ESP chip throws out a lot of digits to the serial consol and then resets - an endless reset loop.

If I change the sketch so that it tries to connect to api.wundergroundy.com (i.e. add one character so that the system will not find the address) and the unit does not reset but simply says "connection faailed" and tries again.

I thought it might be that the increased power drain when the wifi got active may have caused transients on the power lines - but it still does this with a considerably more 'beefy' PSU and more decoupling. In other words, the reset behaviour seems independent of PSU used.


My instincts are that it is a software related glitch AFTER it has successfully pulled data from Wunderground that is causing the internal reset..

My ESP is an ESP07 - I could send the crash output if that would help, but I suspect that still not enough is known about these units for it to make much difference!

(I just realised that in fact the i/p for api.wunderground.com is also an Akamitechnologies address! - but obviously a different one - I guess they changed their network after you published the sketch...?

Is there a reason you hard-coded an i/p addres into the sketch?

Anyway, thanks for any ideas you may have for me to try...


Nick

  Are you sure? yes | no

chiprobot wrote 11/26/2015 at 15:43 point

Hoi Nick....

I too have the same reset problem... using a series 13 ESP.

Error :-

Exception (29):
epc1=0x40207e74 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

and then the >>>stack>>> dumps its long memory strings

I know its not a power supply problem.

My only guess is the ESP's memory buffer is being over_filled... somehow.

... I would really like to duplicate this project too.

I hope co sto has a solution, or can confirm that the code is still working with the wunderground api .

  Are you sure? yes | no

Nick wrote 11/28/2015 at 07:11 point

Thanks for the info... 

Unfortunately I don't have time right now to try some software investigations on the project code. 

But one thing that could be tried would be to play around with the code inside wunderground() function. There is a lot of parsing and string building goes on in there and I suspect that if the api has changedd, then the parsing will break and if not trapped properly could generate an exception.

It is a shame it doesn't work "out of the box" because it is just SO neat!

Feel free to PM me if you maake any discoveries - if i do get time to play furthe and make progress, I will let you know...

Co sto:  any insights as the project developer?

Nick

  Are you sure? yes | no

chiprobot wrote 11/30/2015 at 18:06 point

Ok... I reduced the :-

int num_elements = 3;     for debug    ie instead of 8 as in code 

and switch the json print debug on.

and at least it gets further without the reset crash :-

WiFi connected
IP address:
192.168.178.55
connecting to 23.222.152.140
{"city":"San Francisco","local_time_rfc822":"Mon. 30 Nov 2015 10:26:06

-0800","weather":"Overcast"}

...so we know the url is ok

  Are you sure? yes | no

co sto wrote 11/03/2015 at 11:30 point

tnx for the report.

I compiled it with version 1.6.5 and it compiles fine exept for a few not so important warnings about " deprecated conversion from string constant to 'char* ".

I looked for the variable myDegree and it is not used, instead there is a variable myDregree (the extra 'r' is obviously a mistype) which is used in font.h 

line 179: {SendChar(pgm_read_byte(myDregree+i));}

line 102 in font.h const char myDregree [8] PROGMEM = {
0x00,0x00,0x0C,0x12,0x12,0x0C,0x00,0x00
};

If you change both to the same name it will compile

Make sure font.h is included as a separate file/tab in your sketch.

  Are you sure? yes | no

Nick wrote 11/03/2015 at 10:58 point

Hi.

I am playing with the ESP8266 - using Arduino IDE version 1.6.5  

All the included sample sketches in the IDE for the ESP8266 compile fine.

Bbut when I try to use your sketch I get a bunch of compiler errors. I tried using some other sketches for similar projects and they too throw up compiler errors. As far as I can tell they are NOT simply related to missing libraries.

For example in your sketch, I get a bunch of advisory warinigs:

"YAWD.ino: In function 'void setup()':
YAWD.ino:52:37: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]"

Also this for line 176:

"YAWD:179: error: 'myDregree' was not declared in this scope"

I am guessing that you compiled your sketch on an earlier version of the IDE - could it be that since the IDE was changed, it became more sensitive to deprecated constructions etc?

But this doesn't explain the 'myDregree' missing error 

It's driving me crazy because this seems like such a cool and simple project - any ideas welcome!!

Thanks

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates