loading

The Weather station I made is based on the software of Daniel Eichhorn from Switserland . This firmware includes measurement of the inside temperature + humidity, outside temperature + air pressure (fetching data from a 2nd weatherstation connected to thingspeak) and local forecast data from Wunderground (Weather underground) See his blog at http://blog.squix.ch/

I want to make sure for my project that this time I added really everything required to complete my Instructable. If anything is missing let me know!

I thought it would be cool to design my own Weather Station with a larger OLED display (not the original 0.96", I found 2.4") and pay a lot of attention to the looks of the station. So as "enclosure" I used Acrylic sheet which I laser-cutted in the shape of a sun/cloud. My goal was to let the acrylic "glow" depending on the forecast or other criterium: red means its getting warmer, blue means its getting colder, white flashing: thunderstorm expected. Etc. Or perhaps just a pretty color you like?

To do this I used approx. 20cm Adafruit RGB LED Neopixel strip around the OLED display (a total of 12 Neopixels are on the strip). They are very easy to use with their 1-wire connection and built-in LED controller PER LED! Cheaper Chinese clones might work but I wanted to be sure and wanted to use the Adafruit lib.

So I expanded the firmware with Neopixel control (RGB led's on a strip, from Adafruit) and a smooth fading pattern. Depending on forecast data and current readings the Neopixels now fade in a certain color.

I used almost any technique I had at my disposal. Laser cutting, 3d printing thanks to my local FabLab, CAD schematic design + PCB, Arduino programming.

Step 1: Shopping for the parts

Update!

This has been added AFTER I published the instructable and the text following in this step.

I noticed that the USB cable was clearly visible in the images I uploaded. I did not pay attention to it at the time of posting but now it started to annoy me. So I have a solution. Instead of using the USB connector mentioned below in my Electronics Bill Of Materials use this one. Now the USB cable will be pointed backward when plugging it in. This connector however does not fit on the PCB design that I made. To overcome this a slight mechanical finetune was needed. The 2 large metal pins that are on this connector I bent to the sides and solder them to the PCB large ground pads. The 5 USB data pins I had to slightly push towards the PCB so that they touched the PCB and could be soldered. I also added a picture showing how to do that with this Step. It's up to you which connector to use, in the BOM is the one fitting directly on the PCB but the one mentioned in this update makes the station look better!

Files to download

Download the ZIP file I attached to this project, it contains everything: the CAD files for the lasercutter (body + stand) and 3d printer (display bezel), the schematic and Gerber files for the PCB, a Bill of Materials for the electronics and the Firmware

Mechanical

For the mechanical part I used Acrylic sheet. Here in the Netherlands I found a very cheap supplier of real Plexiglas where you can order the smallest sizes you like (just the size you need) in all thicknesses. For Dutch readers click here. For the others you will have to find this locally.

You could use for the base and body any acrylic you like, I show here what I did. But for example the cloud/sun body could also be out of 1 clear sheet instead of the cloud being clear and the sun yellow-clear.

  • 1 sheet of 220 x 220mm and 10mm thickness for the "cloud"
  • 1 sheet of 120 x 120mm for the "sun"
  • some plastics adhesive preferably Acrifix 1R0192 to glue the parts together
  • 1 sheet of 50x200mm for the base/stand (I used blue)
  • (optional 1 sheet of plastic in color of choice, approx. 1mm thick to make the OLED bezel/front plate, I supplied both the 3d print files for the bezel as well as the CAD file to laser-cut a bezel, the choice is up to you which one you prefer)

Electronics

Here is a complete overview of what I used for my project. In the Electronics step further on I'll explain what the parts are used for. You could decide to not use them all depending on what you want the station to show. At minimum you need an ESP8266 and the OLED display!

  • Order my PCB using my Gerber files. I used this very affordable Chinese service and the 5cm x 10cm option over there will fit. You will get 10 boards but for a price where I cannot get even 1 PCB for over here in Europe...)
  • For user using OSHpark service I added a seperate gerber/drill zipfile to this Step called OSHpark_gerber_drill
  • The parts to solder on the PCB I put in a separate pdf BOM list which I attached to the ZIP file to download from this project
  • A micro USB cable for the power and the programming of the firmware
  • A standard 5V USB power adapter like from your smartphone or find one on Ebay.
  • The OLED panel I got from ebay, click here I2C 2.42 128x64 Graphic OLED White Module ( Arduino / PIC / Multi-wii). The cutout in the Acrylic design matches the size of this OLED module.
  • A DHT22 / AM2302 Humidity + Temperature sensor (Ebay is your friend...)
  • Approx. 20cm of Adafruit Neopixel RGBW strip (so it includes W - White, my code is based on that fact). Click here. Others (clones from china) might work as well but I can give no guarantee...
  • An ESP8266 module variant 07 (! important when you use my PCB design). Search at Ebay for ESP-07 like this one.

Software

  • The code is attached in the ZIP file, there are also some librarier zipped inside the zipfile, you need to install these in the Arduino IDE. How this works can be found on www.arduino.cc
  • You need the Arduino IDE 1.6.5 with the ESP8266 board package installed. (1.6.6 and 1.6.7 had a problem with ESP8266 at the moment I wrote this, I do not know what or why...)
Hi all,<br><br>I just updated step1 with an update section. First update us the USB receptacle. I advised a new model with a 90degree angle. That way the usb cable will point to the back of the station making it look better. It involves slight modifications but they are described and a picture is added. Its worth it! Pcb stays the same for now. Cheers.
<p>Sad,i cannot get OLED light-up with a NodeMCU.I thought the esp8266-07 and 8266-12 are the same.but not anyway.</p>
Check the pinout of the 8266's maybe SCL and SDA lines are switched on them? So try to reverse your SCL and SDA lines<br><br>Best regards<br>Dennis
<p>Dennis,</p><p>Help!</p><p>I got mine working. Looks great. </p><p>Couple of problems.</p><p>Arduino 1.6.5 has to be used since 1.6.8 has an error with the Adafruit Neopixel class. I suppose that is something Adafruit needs to fix.</p><p>I have my Wundergound API key, but not sure what to enter for the City. They have different stations for my city (Dana Point). If I enter the station code, such as KCADANAP6, or the city, such as DANA POINT, no data is displayed.</p><p>Also, I have no idea how to set up the Thingspeak. I have the API key, but what do I enter for a Channel ID (or how does one setup a Weather Channel)?</p><p>I have my settings for IS_Metric = false. But, it appears as though you have the display hard coded to &quot;&deg;C&quot;. I'm pretty sure it is getting the correct temperature from the DHT22 since it is currently showing 77.72 &deg;C, and that would be pretty hot if it were truly celsius.</p><p>I also need to change the time to 12 hour mode. </p><p>I've had Neopixels for a long time now, but this is the first time I've used them. Dang, those things are bright!</p><p>I'll post images as soon as I get everthing working and the parts all glued together.</p><p>Kenny</p>
<p>OK,</p><p>Got Wunderground to work. Took a look at the original Library and Documentaion. For others in the US that might be confused about this, you enter your State and Location like this:</p><p>const String WUNDERGROUND_COUNTRY = &quot;US&quot;;<br>String WUNDERGROUND_CITY = &quot;CA/Dana_Point&quot;;</p><p>Now I have to figure out how to get Thingspeak to work. What is the purpose of Thingspeak anyway? The display says &quot;Outdoor&quot; for Thingspeak, but isn't that what Wunderground is for?</p><p>Kenny</p>
good!<br><br>Thingspeak is sort of double. Of course local wunderground is good enough but I have a thingspeak weather station of my own lying at my doorstep so I included it.<br><br>You can remove it (and its page on the station)? Dont exactly know how but can be done!
Great! Want to see!<br>I'd use indeed 1.6.5, also because of esp issues in the later ones<br>I cannot help with Wunderground, that is a matter of google until you drop, I had the same :(<br>Thingspeak you need the api READ key (watch out that one you need to generate seperate, WRITE is always included from start). Your channel ID is something like this (mine)<br>https://thingspeak.com/channels/50958<br>So a 5digit nr<br><br>The celcius is indeed hardcoded, not sure where the is_metric is for thats from the code of the swiss developer (see my intro to find his blog)<br><br>12hour mode i also do not know, I had a bug with summer/daylight saving time. That one is now patched with UTC_OFFSET=2. Works for now but means in winter I need to redo the firmware. I hope Dani Eichhorn comes up with a patch/fix<br><br>Nice huh those neopixels!! Thats also why I added a fuse, if it goes wrong it takes a lot of current. 12 leds times 4 (RGWB) times 60mA max...problems!<br><br>Cheers, looking forward to your pics or better a video!
<p>Dennis,</p><p>How is the OLED attached?</p><p>Is it supposed to be centered in the cutout and glued or taped to the back of the bezel?</p><p>Also, where do the Neopixels go?</p><p>Thanks,</p><p>Kenny</p>
<p>Hi Kenny</p><p>The OLED I glued to the bezel and the bezel I glued with double sided tape to the Acrylic. The Neopixels I mounted around the edge of the OLED using double sided tape. While I type this I am behind me workbench making a 2nd station, I will update the instructable with some pictures!</p><p>Cheers</p><p>Dennis</p>
<p>Hi Dennis,</p><p>What kind of glue did you use? Acrylic Glue?</p><p>For kicks, I thought I'd print the Bezel since I have some Orange Filament in and wanted to see what it looks like.</p><p>The Printed Bezel doesn't look half as good as the laser cut version, but it's fun trying out different configurations. I did notice, however, that the 3D version needs some modifications (the cutout is too large) and the Pegs that hold it in place actually turn out to be holes (at least that is the way Slic3r renders them). I fixed the pegs and am about to make the cutout smaller.</p><p>Also, I did make a modification to the Printed Circuit board (no FTDI and the ESP8266 mounts in a socket instead of directly soldered to the board). Will let you know how it all works out.</p><p>Kenny</p>
<p>Hi Kenny</p><p>At first, for the sun-cloud I was looking into serious adhesive from Acrifix. In the end I did not use it but took simple Henkel plastic glue! For stand-cloud I used 2component acrylic glue because I wanted it to be strong. Bezel to cloud I used double sided tape but with the 2nd one I am building now I did it different: using my milling machine I machined a 2mm deep chamber in which the lasercut bezel fits in nicely. This I glue in probably with transperent flex kit (I did not yet do it) or acrylic 2comp. The OLED itself I sticked in V1 to the bezel with doublesided tape: does not work great. V2 I glued it with 2comp acrylic.</p><p>Indeed the 3dprinted bezel is not so nice as the lasercut version. I quit that path very soon. So it is correct the bezel in 3d might not be perfect because I stopped working on it! My printed version had pegs not holes so thats probably a slicer error!</p><p>Good to hear about the modifications on the PCB, I want to see it when its done! Very dumb of me...I had mounted an extra 6pin header footprint on which I put 5V gnd and 3.3V just for debugging or simple additions without changing the PCB design. I could simply have routed TX and RX of the ESP to that header as well then there would be a direct connection for an FTDI cable so no need to solder those on the board... Too late :( I did wire this by hand on my second station!</p><p>Cheers</p><p>Dennis</p>
<p>Hi Dennis,</p><p>What kind of glue did you use? Acrylic Glue?</p><p>For kicks, I thought I'd print the Bezel since I have some Orange Filament in and wanted to see what it looks like.</p><p>The Printed Bezel doesn't look half as good as the laser cut version, but it's fun trying out different configurations. I did notice, however, that the 3D version needs some modifications (the cutout is too large) and the Pegs that hold it in place actually turn out to be holes (at least that is the way Slic3r renders them). I fixed the pegs and am about to make the cutout smaller.</p><p>Also, I did make a modification to the Printed Circuit board (no FTDI and the ESP8266 mounts in a socket instead of directly soldered to the board). Will let you know how it all works out.</p><p>Kenny</p>
<p><a href="http://www.instructables.com/member/Dennisv15/" rel="nofollow">Dennisv15</a></p><p>Thanks for such a great project! I've just downloaded everything and have everything I need to build it, except for one thing - instead of an OLED, I have a nice little TFT display I would like to use with UART, I2C, and SPI. I'm fairy new at Arduino programming and ESP's. What would be required to convert the sketch? Would this be do-able, or require a major reworking?</p><p>I was also thinking of hiding the circuit board in the base and just running very thin wires directly to the display. Any reason this wouldn't work?</p><p>Also, I'd love to buy a board or two from you. Do you have any left? I'll PayPal you the the money right away.</p>
<p>Hi chipSteward!</p><p>Thanx!</p><p>First the TFT. I would not recommend it. I am moderate experienced with Arduino but the code for this weather station is made by pro's who do programming for a living. Its quite complicated and you would have to go line by line through the code to see how to port it to the TFT method. For example there is a nice slide effect of the several windows. If you have little experience with Arduino dont start this! Just spend 20 dollar for the Oled. Or you figure out what driver IC is in your TFT and see if there is an Adafruit arduino library for it (or from another developer). That might make it more feasible to do.</p><p>Second, I can send you 1 or 2 pcb's I have 7 spares left. They cost $3 per pcb excluding the shipping cost to you. Where do you live? I can do this very cheap via mail letter since the pcbs are flat and lightweight</p><p>You could build the board in the base. But you require a higher base then 8mm. For example there is a large electrolyte capacitor required for the Neopixels, its 8mm diameter. You could size it down: take 100uF and 10V working voltage that sizes it down. But hey why bother, you still have a hole in the plexiglass for the OLED (or tft) and you still need to locate the neopixels/rgb leds at the display location then why not just mount the pcb there as well? Besides, you need wires then from neopixels to the pcb in the base: that would be visible no matter how thin you choose.</p><p>But surprise me and come up with Revision 2.0!!</p><p>Cheers,<br>Dennis</p>
<p>one more thing about the TFT plan: it might have I2C but controlling it will work entirely different so thats what makes it complicated</p>
<p>Okay, I'll shelve the TFT plans . . . for <br>now. I do have the libraries for the display, though. Still, the TFT's<br> are SO much less expensive, and it would be nice to have color - I <br>wonder if any of the color OLED displays would work?</p><p>I may still <br>pursue the 'lectronics in the base idea, though. I could always use <br>multiple caps in parallel. And since the neopixels touch the base, it <br>seems like you could start / end them there.</p><p>I wonder if I would be able to add a weather alert feature, in which it would flash and/or activate a small piezo beeper when a local weather alert is issued. Could be a valuable feature.</p>
<p>what you want to do: use a tft or choose a color OLED its all possible but then you have yourself a project because the current code is not at all in the shape to just transfer to a TFT. For example all those weather icons are hardcoded in the software in headerfiles, I mean byte arrays with just 0's and 1's. You cannot recognize a cloud or sun in it its just a bunc of numbers!</p><p>If you like to tinker and like to learn arduino/programming its the task for you!</p><p>The neopixels do NOT touch the base, they are glued around the OLED display with double sided tape and the 3wires of them go directly to the PCB.</p><p>The alert you asked about is possible, in fact I already do it: when it gets below 2 degree celsius I make it turn white to warn me. A buzzer would be easy to add!</p>
Very nice design! Looks neat
Tnx!!
<p>Nice project! Maybe for version 2.0, if you can hide the usb cable that would be nice!</p>
<p>Hi jramkisoen</p><p>I'm already working on that! Actually I am building a 2nd one and its just a matter of using an &quot;angled&quot; usb connector. So a slight partlist / Bill of Materials change. I found a connector that almost fits, just a little bending of the pins. The alternative is a PCB redesign. For now I'm not going for that.</p><p>For the station in the instructables I ordered a USB cable with an angled plug. Thats still slightly visible but much better then whats in the pictures. I glued the usb connector to the PCB using 2component heavy glue so there is no way I can exchange the usb socket :(</p><p>Cheers </p>
<p>Another idea would be to engrave some &quot;puffy cloud lines&quot; on your cloud and hide thin wires behind them that go to a USB jack in the base. </p>
No mygoalwas 5V usb all along, also because the coolest look is in the dark with no sun. Feel free to design V2.0!
<p>Have you thought about using solar panels and rechargeable batteries? You could add a TP4056 on your board, hide a LiPo battery of considerable size behind the display, and put some solar panels on the back. It would add minimal cost and allow the unit to free stand anywhere. You could also include a USB jack in parallel with the solar panels to facilitate charging via USB if necessary too.</p>
<p>You should make this a kit people you can buy! It's amazing.</p>
Tnx osky42002!<br><br>I think it would be too expensive, I estimate approx 50dollars if parts are bought in higher volumes.lexiglass and the oled panel are expensive.<br><br>But I got thus comment earlier about bringing it to kickstarter I will think about it!<br>Im afraid that not many people want to spend that much money.<br><br>Cherrs
<p>Beautiful! =D</p>
<p>Tnx!</p>
<p>That my friend is what we call a <strong>Kickstarter</strong> idea... you have a good one there!</p>
Tnx Jerry!<br><br>Its kinda too labour intensive in the state its right now. I'm building a second one now and really notice that. But thanx for the compliment!
<p>very professional work and very nice design !</p>
Thank you!
<p>Link to order boards from OshPark (The Purple Board people!).</p><p><a href="https://oshpark.com/shared_projects/Y4IlIzz6" rel="nofollow">https://oshpark.com/shared_projects/Y4IlIzz6</a></p>
Nice!!
<p>The .DRL file appears to be Binary. OshPark requires that everything be ASCII.</p><p>They have specific instructions for Altium, if that helps. </p><p><a href="http://docs.oshpark.com/design-tools/altium-circuitmaker/cam-setup/" rel="nofollow">http://docs.oshpark.com/design-tools/altium-circui...</a></p><p><a href="http://docs.oshpark.com/design-tools/altium-designer/drill-files/" rel="nofollow">http://docs.oshpark.com/design-tools/altium-design...</a></p><p>Kenny</p>
<p>oh so thats probably it.</p><p>I'll have a look later in the weekend.</p><p>Another option is I have 8 pcb's left: I can send you 1 or 2?</p><p>Are you in the USA? PCB is $1,50 per piece and shipping is $5 per ordinary letter /mail. So If I send you 2 its $8. Do you have paypal?</p>
<p>OK it was not a lot of work so I put at step 2 a second file OSHPark_gerber_Drill.zip</p><p>I hope this helps Kenny!</p><p>And if not then consider this remark that I found on the oshpark instruction site for altium (the link you gave me):</p><p>In some cases, including the binary .DRL file will cause us to reject the board even if you have a .TXT file in NC Drill format. Deleting the .DRL file will resolve that issue.</p><p>Maybe that was it?</p><p>Cheers </p><p>Dennis</p>
<p>step 1!! Not 2</p>
<p>It looks like ITEAD needs an Outline (.GKO or .DO) file as well.</p>
<p><strong>Hi Kenny</strong></p><p>I used altium at my work.</p><p>Itead did not need the GKO file I just used mechanical1 layer (or sometimes they even think the top overlay is ok).</p><p>But I just re-generated the GERBER files. I updated the STEP1 shopping for the parts.</p><p>Let me know if you found the GKO file now, if not we have to think of something else. I could edit the instructable but when I just redownloaded the files I altered I saw the old ZIP. I hope its updated by the time you read this. Otherwise contact me!</p><p>Cheers</p><p>dennis</p>
Very very weird...the ncdrill file (a widely used standard) is among the files and they see no holes....?<br><br>I did not know that I could make it avilable via itead I will see how to do that.<br><br>Cheers<br><br>Dennis
<p>Hi Kenny</p><p>Were you able to order the PCB now that I supplied the GKO file?</p><p>Cheers</p><p>Dennis</p>
Hi Dennis,<br><br>The Outline layer worked, but then OshPark complained about not having any Drill files.<br><br>So, they showed the board and traces correctly, but no holes.<br><br>I gave up.<br><br>Did you make your boards available on ITEAD so we can just go there an order, without having to upload Gerbers that they may or may not accept?<br><br>I'd rather use OshPark but they have some issues with your Altium files.<br><br>Kenny<br><br><br>
<p>I'm trying to get the boards manufactured by OSH Park, but the Gerber files are missing the Board Outline file (.GKO), so they can't manufacture the boards. Can you supply the board outline or, if this was done with Eagle Cad, the BRD and SCH files?</p><p>Kenny</p>
Hi<br><br>Tnx! <br>I chose a straight connector because with r/a you see the wiring through the plexiglas like with the usb connector! And I had it lying around :) First I had directly soldered the wires to the PCB but this was very inconvenient when I had to take the thing apart!<br><br>Yes I soldered it all byhand but I cheated a little : I used a stereo microscope at work :) But its delicate work thats for sure.<br><br>Cheers!
<p>Cool IoT project! I like the custom PCB, but I would make the Neopixel connector a right angle connector, so the mating connector will lay flat on the PCB. Did you surface mount all these components yourself? If so, great job!</p>
<p>I love how this looks! It looks really professional! Great job!</p>
Thanks a lot gabgra11!
<p>No problem! I voted for you in the contests! Good luck!</p>
<p>Hi all,</p><p>I just added a new sketch version because the algorithm that changes the weather station color could be better. I also added a color to indicate temperature below 0 degrees. I just re-opened my garden water tap and my wife had the great idea to let the station glow light blue when it freezes over night. Then I can &quot;save&quot; my water tap from freezing and breaking :)</p>

About This Instructable

19,827views

379favorites

License:

More by Dennisv15:FPGA Robotics Vision for anyone Acrylic sheet RGB glowing Weather station with indoor/outdoor/forecast using ESP8266 
Add instructable to: